about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorCase Duckworth2024-06-05 12:51:57 -0500
committerCase Duckworth2024-06-05 12:51:57 -0500
commitfc9496f66e213dcc48f80b41dff0e0252c1846e6 (patch)
tree4e0b6fb0f0101c34b31300610724952103986aee /Makefile
parentCorrect path stuff for build/ building (diff)
downloadscramble-fc9496f66e213dcc48f80b41dff0e0252c1846e6.tar.gz
scramble-fc9496f66e213dcc48f80b41dff0e0252c1846e6.zip
Improve!
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/Makefile b/Makefile index 7ecdf53..9d87ce2 100644 --- a/Makefile +++ b/Makefile
@@ -2,30 +2,33 @@
2 2
3NAME = scramble 3NAME = scramble
4CSC = /usr/bin/csc 4CSC = /usr/bin/csc
5CSC_OPTIONS = -setup-mode -host -I $(PWD) -C -I$(PWD) 5CSC_OPTIONS = -setup-mode -host -I $(BUILD) -C -I$(BUILD)
6CSC_LIB_OPTIONS = -D compiling-extension -emit-all-import-libraries -dynamic -regenerate-import-libraries 6CSC_LIB_OPTIONS = -D compiling-extension -emit-all-import-libraries -dynamic -regenerate-import-libraries
7CSC_OPTIONS_EXTRA = -X utf8 7CSC_OPTIONS_EXTRA = -X utf8
8CSI = /usr/bin/csi 8CSI = /usr/bin/csi
9BUILD = $(PWD)/build 9BUILD = $(PWD)/build
10TESTS = $(PWD)/tests 10TESTS = $(PWD)/tests
11TEST_ENV = env BUILD=$(BUILD) TESTS=$(TESTS) 11TEST_ENV = env BUILD=$(BUILD) TESTS=$(TESTS)
12TEST_ENV_EXTRA = TEST_USE_ANSI=0
13ARTEFACTS = *.build.sh *.install.sh $(NAME) *.import.scm *.so *.link *.o
12 14
13.PHONY: all test clean install uninstall 15.PHONY: all test clean install uninstall
14all: build/scramble 16all: build/scramble
15test: $(BUILD) 17test: all
16 cd $(BUILD) && $(TEST_ENV) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME) 18 cd $(BUILD) && \
19 $(TEST_ENV) $(TEST_ENV_EXTRA) \
20 $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME)
17clean: 21clean:
18 -rm -rf $(BUILD) *.build.sh *.install.sh $(NAME) *.import.scm *.so *.link *.static.o 22 -rm -rf $(BUILD) $(ARTEFACTS)
19install: 23install:
20 chicken-install -s 24 chicken-install -s
25 @-rm -rf $(ARTEFACTS)
21uninstall: 26uninstall:
22 chicken-uninstall -s 27 chicken-uninstall -s $(NAME)
23 28
24# scramble 29# scramble
25 30
26$(BUILD): 31build/scramble: scramble.scm
27 -mkdir $(BUILD) 32 @mkdir -p $(BUILD)
28build/scramble: scramble.scm $(BUILD) 33 $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@
29 cd $(BUILD) && \ 34 @test -f scramble.import.scm && mv scramble.import.scm $(BUILD)/ ||true
30 $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F)
31 @if test -f scramble.import.scm;then mv scramble.import.scm $(BUILD)/;echo mv scramble.import.scm $(BUILD)/; fi