-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
106 lines (78 loc) · 2.34 KB
/
Makefile
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.PHONY: clean install scat macro pic18 doc staapl
PACKAGE_ROOT = staapl
PACKAGE = staapl.plt
all: dev
# MZSCHEME=racket
MZSCHEME=mzscheme
# multiple tasks doesn't seem to make it faster, and -v doesn't work.
# RACO_MAKE=raco make -j 4 -v # 20s
# RACO_MAKE=raco make -v
# FIXME: racket's macro implementation changed in a way incompatible
# to some workaround in staapl. Currently version is kept at the last
# working racket release. 6.2 has the breaking change.
RACKET_VER=6.1.1
#RACKET_VER=6.2
RACKET_BIN=/usr/local/racket-$(RACKET_VER)/bin
RACO_MAKE=$(RACKET_BIN)/mzc -vk
RACO_PKG=$(RACKET_BIN)/raco pkg
unlink:
$(RACO_PKG) remove staapl
link:
cd $$(readlink -f .)/.. ; $(RACO_PKG) install --link staapl
gitbuf:
$(RACO) pkg install github://github.com/zwizwa/staapl/master
# run after updating plt or on fresh local install of staapl dev tree
dev:
make pic18
install:
$(MZSCHEME) -l staapl/install
# Compile all .ss files found in the package tree. This mimicks what
# setup-plt does, and is a quick way to prevent problems when packaging.
all-modules: planet-version.txt
cd staapl && $(RACO_MAKE) `find -name '*.rkt'`
cd app && $(RACO_MAKE) `find -name '*.fm'`
pic18:
$(RACO_MAKE) arm/arm.rkt
$(RACO_MAKE) pic18/pic18.rkt
$(RACO_MAKE) pic18/pic18-dtc.rkt
$(RACO_MAKE) pic18/sim.rkt
$(RACO_MAKE) live.rkt
$(RACO_MAKE) staaplc.rkt
$(RACO_MAKE) pic18/live.rkt
$(RACO_MAKE) pic18/live-dtc.rkt
# use planet instead
install-collects:
sh bin/install
clean:
find -name 'compiled' -exec rm -rf '{}' ';' || echo -n
find -name '*~' -exec rm -rf '{}' ';' || echo -n
rm -rf .*~ *.plt *.tar.gz *version.txt staapl/prj/version.rkt
make -C doc clean
make -C app clean
doc: all
make -C doc
snapshot:
sh bin/release -d
release:
make test
make clean
make release-unclean
test:
make clean
make unsafe_test
unsafe_test:
make dev
make -C app test
# Run this before making the planet package. It will build all scheme
# files, not just those that are actually used, and is much faster
# than the package compiler.
all_files:
mzc -vk `find staapl -name '*.rkt'`
all_exp_files:
mzc -vk `find staapl-exp -name '*.rkt'`
%.html: %.scrbl
cd $(dir $<) ; raco scribble $(notdir $<)
zwizwa: staapl/scribblings/staapl.html www/index.html
cp -av www/* ~/www/zwizwa.be/staapl/
cp -av staapl/scribblings/* ~/www/zwizwa.be/staapl/
# planet