-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
71 lines (61 loc) · 2.52 KB
/
Copy pathmakefile
File metadata and controls
71 lines (61 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
SFLAGS = --compile-imported-libraries --optimize-level 3
Scheme = boot/rcis
Ver = a6le
Pos = $(PWD)/boot/${Ver}
# if this can not be executed in your device then install the chezscheme and change S into 'scheme'
S = ${Pos}/chez-scheme -b ${Pos}/petite.boot -b ${Pos}/chez-scheme.boot
defalut: scripts/boot.ss clean-exec init
@bash scripts/boot.sh $S $< -q # makeing boot file -> boot/rcis.boot
@((test -f $(PWD)/${Scheme}.boot) || (printf "\r* booting file...\033[31;1mfailed\033[0m\n" && exit 1)) && \
printf "\r* booting file...ok\n";
@echo "#! /bin/bash" >> ${Scheme}
@echo '$S --program ${PWD}/${Scheme}.boot "$$@"' >> ${Scheme}
@chmod 555 ${Scheme}
@((test -f ${Scheme}) || (printf "\r* produce executable...\033[31;1mfailed\033[0m\n" && exit 1)) && \
printf "\r* produce executable...ok\n";
@(echo 'Executable at $(Scheme)')
install: scripts/boot.ss clean-exec init
@bash scripts/boot.sh scheme $< -q # makeing boot file -> boot/rcis.boot
@((test -f $(PWD)/${Scheme}.boot) || (printf "\r* booting file...\033[31;1mfailed\033[0m\n" && exit 1)) && \
printf "\r* booting file...ok\n";
@echo "#! /bin/bash" >> ${Scheme}
@echo 'scheme --program ${PWD}/${Scheme}.boot "$$@"' >> ${Scheme}
@chmod 555 ${Scheme}
@((test -f ${Scheme}) || (printf "\r* produce executable...\033[31;1mfailed\033[0m\n" && exit 1)) && \
printf "\r* produce executable...ok\n";
@(echo 'Executable at $(Scheme)')
cors: scripts/start.ss compiler/cors.ss init
@mkdir -p build/
@$S $<
test: scripts/test.ss init
@mkdir -p build/
@$S $<
test-all: init
@mkdir -p build/
@echo "(output-file \"build/t\")) (test-all)" | $S scripts/test.ss -q
test-%: init
@mkdir -p build/
@echo "(output-file \"build/t\")) (scheme-optimize-level \"$*\") (test-all)" | $S scripts/test.ss -q
test-driver: init
@mkdir -p build/
@echo "(output-file \"build/t\") (test-driver)" | $S scripts/test.ss -q
test-driver-%: init
@mkdir -p build/
@echo "(output-file \"build/t\")) (scheme-optimize-level \"$*\") (test-driver)" | $S scripts/test.ss -q
init: compiler/options.in
@if ([ compiler/options.in -nt compiler/options.ss ] || [ ! -f compiler/options.ss ]); \
then \
echo -n "* configure options.ss..."; \
cp $< compiler/options.ss; \
sed -i 's|__PWD__|$(PWD)|g' compiler/options.ss; \
([ -f compiler/options.ss ] || (echo "\033[31;1mfailed\033[0m" && exit 1)) && \
printf "\r* configure options.ss...ok\n"; \
fi
.PHONY: clean
cl: clean
clean: clean-exec clean-so
@$(RM) -rf build/ compiler/options.ss
clean-exec:
@$(RM) -f ${Scheme}.boot ${Scheme}
clean-so:
@$(RM) -r */*.so