1 .PHONY: all check clean default distclean help install release
4 .config.make: configure GNUmakefile
10 CFLAGS:=-std=c99 -O3 -finline-functions
12 #CFLAGS:=-pg -std=c99 -O0
13 #CFLAGS:=-std=c99 -O0 -g
16 include make/install.make
18 CPPFLAGS+=-DPREFIX='"$(PREFIX)"'
19 CPPFLAGS+=-DVERSION='"$(VERSION)"'
28 all: mes module/mes/read-0.mo
32 mes.o: mes.c mes.h mes.i mes.environment.i mes.symbols.i
33 mes.o: lib.c lib.h lib.i lib.environment.i
34 mes.o: math.c math.h math.i math.environment.i
35 mes.o: posix.c posix.h posix.i posix.environment.i
36 mes.o: reader.c reader.h reader.i reader.environment.i
39 rm -f mes mes.o *.environment.i *.symbols.i *.environment.h *.cat a.out
44 %.h %.i %.environment.i %.symbols.i: %.c build-aux/mes-snarf.scm
45 build-aux/mes-snarf.scm $<
47 check: all guile-check mes-check
53 tests/quasiquote.test\
66 tests/let-syntax.test\
72 BASE-0:=module/mes/base-0.mes
73 MES-0:=guile/mes-0.scm
75 # use module/mes/read-0.mes rather than C-core reader
82 set -e; for i in $(TESTS); do ./$$i; done
84 scripts/nyacc-calc.mes
86 module/mes/read-0.mo: module/mes/read-0.mes mes
87 ./mes --dump < $< > $@
89 dump: module/mes/read-0.mo
92 set -e; for i in $(TESTS); do\
93 $(GUILE) -s <(cat $(MES-0) module/mes/test.mes $$i);\
98 MAIN_C:=doc/examples/main.c
101 scripts/mescc.mes $(MAIN_C)
102 ./a.out; r=$$?; [ $$r = 42 ]
104 mescc.cat: all $(MES-0) module/rnrs/bytevectors.mes module/mes/elf.mes module/mes/libc-i386.mes module/language/c/lexer.mes module/language/c/parser.mes module/language/c/compiler.mes
105 echo '(compile)' | cat $(filter %.scm %.mes, $^) - > $@
107 guile-mescc: mescc.cat
109 cat $(MAIN_C) | $(GUILE) -s $^ > a.out
111 ./a.out; r=$$?; [ $$r = 42 ]
116 GUILE_GIT:=$(HOME)/src/guile-1.8
117 GUILE_COMMIT:=ba8a709
118 psyntax-import: module/mes/psyntax.ss module/mes/psyntax.pp
120 module/mes/psyntax.%: $(GUILE_GIT)/ice-9/psyntax.%
121 git --git-dir=$(GUILE_GIT)/.git --work-tree=$(GUILE_GIT) show $(GUILE_COMMIT):ice-9/$(@F > $@
133 Usage: make [OPTION]... [TARGET]...
136 all update everything
138 clean remove all generated stuff
139 dist create tarball in $(TARBALL)
140 distclean also clean configuration
141 mescc compile cc/main.c to a.out
142 install install in $$(PREFIX) [$(PREFIX)]
143 release make a release
144 update-hash update hash in guix.scm