Skip to content

Commit

Permalink
Use "Smalltalk makefiles"
Browse files Browse the repository at this point in the history
  • Loading branch information
janvrany authored and shingarov committed Dec 4, 2023
1 parent 2eab938 commit c5598e4
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 244 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "makefiles"]
path = makefiles
url = https://github.com/janvrany/smalltalk-makefiles.git
62 changes: 0 additions & 62 deletions gt.gmk

This file was deleted.

27 changes: 0 additions & 27 deletions gt/GNUmakefile

This file was deleted.

1 change: 1 addition & 0 deletions makefiles
Submodule makefiles added at de0d44
83 changes: 0 additions & 83 deletions pharo.gmk

This file was deleted.

36 changes: 18 additions & 18 deletions pharo/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
PROJECT=MachineArithmetic

-include GNUmakefile.local

# Pharo version to use. Currently, only 8.0 is supported,
# Pharo 9.0 and later is known to crash when using Z3.
PHARO_VERSION ?= 80

# Metacello group to load.
GROUP ?= default

all: GNUmakefile.local $(PROJECT).image check
all: build

include ../pharo.gmk
../makefiles/%.gmk:
git submodule update --init --recursive $(dir $@)

-include GNUmakefile.local
include ../makefiles/pharo.gmk
include ../makefiles/git.gmk

$(PROJECT).image: $(PHARO_VM) $(PHARO_IMAGE) ../src/*/*.st
$(PHARO_VM_HEADLESS) $(PHARO_IMAGE) save $(dir $(abspath $(firstword $(MAKEFILE_LIST))))/$(PROJECT)
$(PHARO_VM_HEADLESS) $@ eval --save "(IceRepositoryCreator new location: '..' asFileReference; createRepository) register" || rm $@
$(PHARO_VM_HEADLESS) $@ metacello install tonel://../src BaselineOf$(PROJECT) --groups=$(GROUP) || rm $@
build: prereq $(PROJECT).image check
@echo ""
@echo "To open Pharo $(PROJECT) image run:"
@echo ""
@echo " $(PHARO_VM) $(PROJECT).image"
@echo " make run"
@echo ""


$(PROJECT).image: ../src/*/*.st
$(call pharo-copy-image, $(PHARO_IMAGE), $@)
$(call pharo-load-local, $@, $(PROJECT), ../src)

run: build
$(PHARO_VM) $(PROJECT).image

check:: check-deps

check-deps: $(PROJECT).image $(PHARO_VM)
Expand All @@ -48,9 +49,8 @@ LibZ3-generated.st: ../apigen.py | $(Z3_SOURCE_DIR)
update-Z3-API: $(PROJECT).image $(PHARO_VM) LibZ3-generated.st update-Z3-API.st
$(PHARO_VM_HEADLESS) $< update-Z3-API.st

clean:
rm -f $(PROJECT).image $(PROJECT).changes test-reports *.fuel
rm -rf pharo-local
clean::
rm -f $(PROJECT).image $(PROJECT).changes
rm -f LibZ3-generated.st

mrproper:: clean
Expand Down
45 changes: 0 additions & 45 deletions stx.gmk

This file was deleted.

17 changes: 8 additions & 9 deletions stx/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
PROJECT=MachineArithmetic

-include GNUmakefile.local
all: build

all: GNUmakefile.local build
../makefiles/%.gmk:
git submodule update --init --recursive $(dir $@)

include ../stx.gmk
-include GNUmakefile.local
include ../makefiles/stx.gmk
include ../makefiles/git.gmk

build: $(STX)
build: prereq
@echo "To run Smalltalk/X with $(PROJECT) loaded, run:"
@echo ""
@echo " $(STX) --package-path .. --load BaselineOf$(PROJECT)"
@echo ""
@echo "or use shortcut:"
@echo ""
@echo " make run"
@echo ""

Expand All @@ -36,7 +35,7 @@ LibZ3-generated.st: ../apigen.py | $(Z3_SOURCE_DIR)
update-Z3-API: $(STX) LibZ3-generated.st update-Z3-API.st
$(STX) --package-path .. --load BaselineOf$(PROJECT) --execute update-Z3-API.st

clean:
clean::
rm -f *Test.xml
rm -f LibZ3-generated.st

Expand Down

0 comments on commit c5598e4

Please sign in to comment.