about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--scramble.scm7
2 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile index 2ac521f..7ecdf53 100644 --- a/Makefile +++ b/Makefile
@@ -11,11 +11,11 @@ TESTS = $(PWD)/tests
11TEST_ENV = env BUILD=$(BUILD) TESTS=$(TESTS) 11TEST_ENV = env BUILD=$(BUILD) TESTS=$(TESTS)
12 12
13.PHONY: all test clean install uninstall 13.PHONY: all test clean install uninstall
14all: /home/acdw/src/scramble/build/scramble 14all: build/scramble
15test: $(BUILD) 15test: $(BUILD)
16 cd $(BUILD) && $(TEST_ENV) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME) 16 cd $(BUILD) && $(TEST_ENV) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME)
17clean: 17clean:
18 -rm -rf $(BUILD) *.build.sh *.install.sh $(NAME) *.import.scm *.import.so *.link *.static.o 18 -rm -rf $(BUILD) *.build.sh *.install.sh $(NAME) *.import.scm *.so *.link *.static.o
19install: 19install:
20 chicken-install -s 20 chicken-install -s
21uninstall: 21uninstall:
@@ -25,6 +25,7 @@ uninstall:
25 25
26$(BUILD): 26$(BUILD):
27 -mkdir $(BUILD) 27 -mkdir $(BUILD)
28/home/acdw/src/scramble/build/scramble: /home/acdw/src/scramble/scramble.scm $(BUILD) 28build/scramble: scramble.scm $(BUILD)
29 $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ 29 cd $(BUILD) && \
30 $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F)
30 @if test -f scramble.import.scm;then mv scramble.import.scm $(BUILD)/;echo mv scramble.import.scm $(BUILD)/; fi 31 @if test -f scramble.import.scm;then mv scramble.import.scm $(BUILD)/;echo mv scramble.import.scm $(BUILD)/; fi
diff --git a/scramble.scm b/scramble.scm index 7af5282..79d6874 100644 --- a/scramble.scm +++ b/scramble.scm
@@ -119,14 +119,15 @@
119 119
120(define (rule c) 120(define (rule c)
121 (let ((deps (alist-ref c (dependency-graph)))) 121 (let ((deps (alist-ref c (dependency-graph))))
122 (sprintf "~a: ~a $(BUILD)\n\t~a\n\t~a" 122 (sprintf "~a: ~a $(BUILD)\n\t~a\n\t~a\n\t~a"
123 (relativize (output-of c)) 123 (relativize (output-of c))
124 (string-join (cons (relativize (source-of (car deps))) 124 (string-join (cons (relativize (source-of (car deps)))
125 (map (o relativize output-of) (cdr deps)))) 125 (map (o relativize output-of) (cdr deps))))
126 "cd $(BUILD) && \\"
126 (string-append "$(CSC) $(CSC_OPTIONS)" 127 (string-append "$(CSC) $(CSC_OPTIONS)"
127 (if (eq? (car (find-component c)) 'extension) 128 (if (eq? (car (find-component c)) 'extension)
128 " $(CSC_LIB_OPTIONS)" "") 129 " $(CSC_LIB_OPTIONS)" "")
129 " $(CSC_OPTIONS_EXTRA) $< -o $@") 130 " $(CSC_OPTIONS_EXTRA) ../$< -o $(@F)")
130 (string-append "@if test -f " (->string c) ".import.scm;" 131 (string-append "@if test -f " (->string c) ".import.scm;"
131 "then mv " (->string c) ".import.scm $(BUILD)/;" 132 "then mv " (->string c) ".import.scm $(BUILD)/;"
132 "echo mv " (->string c) ".import.scm $(BUILD)/;" 133 "echo mv " (->string c) ".import.scm $(BUILD)/;"
@@ -163,7 +164,7 @@
163 "$(TEST_ENV) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME)") 164 "$(TEST_ENV) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME)")
164 (print "clean:\n\t-rm -rf $(BUILD)" 165 (print "clean:\n\t-rm -rf $(BUILD)"
165 " *.build.sh *.install.sh $(NAME)" 166 " *.build.sh *.install.sh $(NAME)"
166 " *.import.scm *.import.so *.link *.static.o") 167 " *.import.scm *.so *.link *.static.o")
167 (print "install:\n\tchicken-install -s") 168 (print "install:\n\tchicken-install -s")
168 (print "uninstall:\n\tchicken-uninstall -s") 169 (print "uninstall:\n\tchicken-uninstall -s")
169 (newline) (print "# " (egg-name)) (newline) 170 (newline) (print "# " (egg-name)) (newline)