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