Mercurial > urweb
comparison Makefile.am @ 1132:d4cd54a4ea06
First attempt to switch to Automake, to get shared libraries built in OSX
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Jan 2010 09:56:08 -0500 |
parents | Makefile.in@94e83c5533d2 |
children | 482815817e99 |
comparison
equal
deleted
inserted
replaced
1131:94e83c5533d2 | 1132:d4cd54a4ea06 |
---|---|
1 BIN := @BIN@ | |
2 LIB := @LIB@ | |
3 INCLUDE := @INCLUDE@ | |
4 SITELISP := @SITELISP@ | |
5 | |
6 LIB_UR := $(LIB)/ur | |
7 LIB_C := $(LIB)/c | |
8 LIB_JS := $(LIB)/js | |
9 | |
10 all-local: smlnj mlton | |
11 | |
12 SUBDIRS = src/c | |
13 | |
14 .PHONY: smlnj mlton package | |
15 | |
16 smlnj: src/urweb.cm | |
17 mlton: bin/urweb | |
18 | |
19 clean-local: | |
20 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \ | |
21 src/urweb.cm src/urweb.mlb | |
22 rm -rf .cm src/.cm | |
23 | |
24 src/urweb.cm: src/prefix.cm src/sources | |
25 cat src/prefix.cm src/sources \ | |
26 >src/urweb.cm | |
27 | |
28 src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb | |
29 cat src/prefix.mlb src/sources src/suffix.mlb \ | |
30 | sed 's/^\(.*\).grm$$/\1.mlton.grm.sig:\1.mlton.grm.sml/; y/:/\n/' \ | |
31 | sed 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \ | |
32 >$@ | |
33 | |
34 %.mlton.lex: %.lex | |
35 cp $< $@ | |
36 %.mlton.grm: %.grm | |
37 cp $< $@ | |
38 | |
39 %.mlton.lex.sml: %.mlton.lex | |
40 mllex $< | |
41 | |
42 %.mlton.grm.sig %.mlton.grm.sml: %.mlton.grm | |
43 mlyacc $< | |
44 | |
45 MLTON := mlton | |
46 | |
47 #ifdef DEBUG | |
48 # MLTON += -const 'Exn.keepHistory true' | |
49 #endif | |
50 | |
51 #ifdef PROFILE | |
52 # MLTON += -profile $(PROFILE) | |
53 #endif | |
54 | |
55 bin/urweb: src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \ | |
56 src/urweb.mlton.lex.sml \ | |
57 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml | |
58 $(MLTON) -output $@ src/compiler.mlb | |
59 | |
60 install-exec-local: | |
61 mkdir -p $(BIN) | |
62 cp bin/urweb $(BIN)/ | |
63 mkdir -p $(LIB_UR) | |
64 cp lib/ur/*.urs $(LIB_UR)/ | |
65 cp lib/ur/*.ur $(LIB_UR)/ | |
66 mkdir -p $(LIB_JS) | |
67 cp lib/js/*.js $(LIB_JS)/ | |
68 mkdir -p $(INCLUDE) | |
69 cp include/*.h $(INCLUDE)/ | |
70 mkdir -p $(SITELISP) | |
71 cp src/elisp/*.el $(SITELISP)/ | |
72 ldconfig | |
73 | |
74 package: | |
75 hg archive -t tgz -X tests /tmp/urweb.tgz | |
76 |