1 # ------------------------------
3 # ------------------------------
7 SUMMARY := $(ROOT)/summary.log
8 BUILD := $(ROOT)/build.log
9 UNIT := $(ROOT)/unittest.log
10 INTEGRATE := $(ROOT)/integrate.log
12 INSTALL := $(ROOT)/install.log
15 @/bin/echo -n "checking $1 ... "
16 @if which $1 > /dev/null; then \
19 /bin/echo "not found"; \
25 (/bin/echo -n "$1 ... "; \
29 /bin/echo "not found"; \
33 # ------------------------------
34 .PHONY: check build build__ unit unit__ integrate integrate__ install install__ swf swf__ web all code clean
36 all : code build unit integrate install swf web twitter
39 $(call check_prog,git)
40 $(call check_prog,ocaml)
41 $(call check_prog,ocamlfind)
42 $(call check_prog,omake)
43 $(call check_prog,avmplus)
44 $(call check_prog,swfmill)
48 git clone --depth 1 git://github.com/mzp/scheme-abc.git $(SRC)
51 $(MAKE) -f $(ROOT)/Makefile --directory=$(SRC) build__ ROOT=$(ROOT)
55 omake config PREFIX=$(DEST)
56 omake all | tee $(BUILD)
60 mv unittest.log $(UNIT)
63 $(MAKE) -f $(ROOT)/Makefile --directory=$(SRC) unit__ ROOT=$(ROOT)
67 $(MAKE) -f $(ROOT)/Makefile --directory=$(SRC) integrate__ ROOT=$(ROOT)
69 omake integrate-detail
70 mv integrate.log $(INTEGRATE)
73 cd $(SRC) && omake install
74 $(MAKE) -f $(ROOT)/Makefile --directory=$(DEST) install__ ROOT=$(ROOT)
77 $(call check_file,bin/habc) | tee $(INSTALL)
78 $(call check_file,bin/habc-scm) | tee -a $(INSTALL)
79 $(call check_file,bin/habc-xml) | tee -a $(INSTALL)
80 $(call check_file,lib/habc/std.ho) | tee -a $(INSTALL)
81 $(call check_file,lib/habc/stub.stub.ho) | tee -a $(INSTALL)
82 $(call check_file,lib/habc/flash.stub.ho) | tee -a $(INSTALL)
83 $(call check_file,share/habc/template.xml) | tee -a $(INSTALL)
84 $(call check_file,share/habc/example) | tee -a $(INSTALL)
87 $(MAKE) -f $(ROOT)/Makefile --directory=$(DEST)/share/habc/example swf__ ROOT=$(ROOT)
90 $(DEST)/bin/habc binaryClock.scm -o $(SWF)
91 mv $(SWF).swf /var/www/vhosts/happyabc/htdocs/snapshot
94 ruby makeweb.rb > /var/www/vhosts/happyabc/htdocs/snapshot/index.html
97 grep -i 'fail\|error' *.log && twtr up -m '@mzp hey! Something wrong! see http://happyabc.org/snapshot.html'