adamc@1141
|
1 ACLOCAL_AMFLAGS = -I m4
|
adamc@1141
|
2
|
adam@1760
|
3 BIN = @BIN@
|
adam@1760
|
4 SRCLIB = @SRCLIB@
|
adam@1760
|
5 INCLUDE = @INCLUDE@
|
adam@1760
|
6 SITELISP = @SITELISP@
|
adam@1760
|
7 VERSION = @VERSION@
|
adamc@378
|
8
|
adam@1760
|
9 LIB_UR = $(SRCLIB)/ur
|
adam@1760
|
10 LIB_C = $(SRCLIB)/c
|
adam@1760
|
11 LIB_JS = $(SRCLIB)/js
|
adamc@1095
|
12
|
adamc@1132
|
13 all-local: smlnj mlton
|
adamc@378
|
14
|
adamc@1132
|
15 SUBDIRS = src/c
|
adamc@378
|
16
|
adamc@1133
|
17 .PHONY: smlnj mlton package reauto
|
adamc@378
|
18
|
adamc@378
|
19 smlnj: src/urweb.cm
|
adamc@378
|
20 mlton: bin/urweb
|
adamc@855
|
21
|
adamc@1132
|
22 clean-local:
|
adamc@378
|
23 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
|
adam@1592
|
24 src/urweb.cm src/urweb.mlb xml/parse xml/entities.sml
|
adamc@378
|
25 rm -rf .cm src/.cm
|
adamc@378
|
26
|
adamc@378
|
27 src/urweb.cm: src/prefix.cm src/sources
|
adamc@378
|
28 cat src/prefix.cm src/sources \
|
adamc@378
|
29 >src/urweb.cm
|
adamc@378
|
30
|
adamc@378
|
31 src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb
|
adamc@378
|
32 cat src/prefix.mlb src/sources src/suffix.mlb \
|
adamc@1159
|
33 | sed -e 's/^\(.*\).grm$$/\1.mlton.grm.sig:\1.mlton.grm.sml/' -e 'y/:/\n/' \
|
adamc@1159
|
34 -e 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \
|
adamc@791
|
35 >$@
|
adamc@378
|
36
|
adamc@1154
|
37 src/urweb.mlton.lex: src/urweb.lex
|
adamc@378
|
38 cp $< $@
|
adamc@1154
|
39 src/urweb.mlton.grm: src/urweb.grm
|
adamc@378
|
40 cp $< $@
|
adamc@378
|
41
|
adamc@1154
|
42 src/urweb.mlton.lex.sml: src/urweb.mlton.lex
|
adamc@378
|
43 mllex $<
|
adamc@378
|
44
|
adamc@1154
|
45 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml: src/urweb.mlton.grm
|
adamc@378
|
46 mlyacc $<
|
adamc@378
|
47
|
adam@1760
|
48 MLTON = mlton
|
adamc@378
|
49
|
adamc@1132
|
50 #ifdef DEBUG
|
adamc@1132
|
51 # MLTON += -const 'Exn.keepHistory true'
|
adamc@1132
|
52 #endif
|
adamc@378
|
53
|
adamc@1132
|
54 #ifdef PROFILE
|
adamc@1132
|
55 # MLTON += -profile $(PROFILE)
|
adamc@1132
|
56 #endif
|
adamc@507
|
57
|
adam@1592
|
58 bin/urweb: xml/entities.sml \
|
adam@1592
|
59 src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \
|
adamc@378
|
60 src/urweb.mlton.lex.sml \
|
adamc@378
|
61 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
|
adamc@791
|
62 $(MLTON) -output $@ src/compiler.mlb
|
adamc@378
|
63
|
adam@1592
|
64 xml/entities.sml: xml/parse xml/xhtml-lat1.ent xml/xhtml-special.ent xml/xhtml-symbol.ent
|
adam@1592
|
65 xml/parse >xml/entities.sml
|
adam@1592
|
66
|
adam@1592
|
67 xml/parse: xml/parse.sml
|
adam@1592
|
68 $(MLTON) xml/parse.sml
|
adam@1592
|
69
|
adam@1441
|
70 install-exec-emacs:
|
adam@1441
|
71 if USE_EMACS
|
adam@1441
|
72 mkdir -p $(DESTDIR)$(SITELISP)
|
adam@1441
|
73 cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
|
adam@1441
|
74 endif
|
adam@1441
|
75
|
adam@1441
|
76 install-exec-local-main:
|
adam@1440
|
77 mkdir -p $(DESTDIR)$(BIN)
|
adam@1733
|
78 install bin/urweb $(DESTDIR)$(BIN)/
|
adam@1440
|
79 mkdir -p $(DESTDIR)$(LIB_UR)
|
adam@1440
|
80 cp lib/ur/*.urs $(DESTDIR)$(LIB_UR)/
|
adam@1440
|
81 cp lib/ur/*.ur $(DESTDIR)$(LIB_UR)/
|
adam@1440
|
82 mkdir -p $(DESTDIR)$(LIB_JS)
|
adam@1440
|
83 cp lib/js/*.js $(DESTDIR)$(LIB_JS)/
|
adam@1440
|
84 mkdir -p $(DESTDIR)$(INCLUDE)
|
ezyang@1739
|
85 cp include/urweb/*.h $(DESTDIR)$(INCLUDE)/
|
adam@1441
|
86
|
adam@1441
|
87 install-exec-local: install-exec-local-main install-exec-emacs
|
adamc@1134
|
88 -ldconfig
|
adamc@427
|
89
|
adam@1441
|
90 uninstall-emacs:
|
adam@1441
|
91 if USE_EMACS
|
adam@1441
|
92 rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
|
adam@1441
|
93 $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
|
adam@1441
|
94 endif
|
adam@1441
|
95
|
adam@1441
|
96 uninstall-local-main:
|
adam@1440
|
97 rm -f $(DESTDIR)$(BIN)/urweb \
|
adam@1440
|
98 $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \
|
adam@1440
|
99 $(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \
|
adam@1440
|
100 $(DESTDIR)$(LIB_UR)/char.ur $(DESTDIR)$(LIB_UR)/listPair.ur $(DESTDIR)$(LIB_UR)/list.ur \
|
adam@1440
|
101 $(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \
|
adam@1440
|
102 $(DESTDIR)$(LIB_JS)/urweb.js \
|
adam@1440
|
103 $(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \
|
adam@1441
|
104 $(DESTDIR)$(INCLUDE)/urweb.h
|
adam@1441
|
105
|
adam@1441
|
106 uninstall-local: uninstall-local-main uninstall-emacs
|
adam@1399
|
107
|
adamc@427
|
108 package:
|
adam@1520
|
109 hg archive -t tgz -X tests "/tmp/urweb-$(VERSION).tgz"
|
adamc@1132
|
110
|
adamc@1133
|
111 reauto:
|
adamc@1135
|
112 -autoreconf
|
adamc@1133
|
113 libtoolize -cf
|
adamc@1133
|
114 automake --add-missing --force-missing --copy
|
adamc@1133
|
115 autoreconf
|