comparison Makefile.am @ 1906:0d2fdc2cc46c

Allow building in a separate build directory Signed-off-by: Anders Kaseorg <andersk@mit.edu> --- Makefile.am | 30 +++--- src/c/Makefile.am | 2 +- src/compiler.mlb | 2 +- src/sources | 302 +++++++++++++++++++++++++++--------------------------- 4 files changed, 168 insertions(+), 168 deletions(-)
author Anders Kaseorg <andersk@mit.edu>
date Fri, 22 Nov 2013 09:36:14 -0500
parents 686fa4e7f397
children cb57ba73a61d
comparison
equal deleted inserted replaced
1905:cd1cfecc8c72 1906:0d2fdc2cc46c
24 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \ 24 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
25 src/urweb.cm src/urweb.mlb xml/parse xml/entities.sml 25 src/urweb.cm src/urweb.mlb xml/parse xml/entities.sml
26 rm -rf .cm src/.cm 26 rm -rf .cm src/.cm
27 27
28 src/urweb.cm: src/prefix.cm src/sources 28 src/urweb.cm: src/prefix.cm src/sources
29 cat src/prefix.cm src/sources \ 29 cat $^ > $@
30 >src/urweb.cm
31 30
32 src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb 31 src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb
33 cat src/prefix.mlb src/sources src/suffix.mlb \ 32 sed -e 's/^\(.*\).grm$$/$$(BUILD)\/\1.mlton.grm.sig:\1.mlton.grm.sml/' -e 'y/:/\n/' \
34 | sed -e 's/^\(.*\).grm$$/\1.mlton.grm.sig:\1.mlton.grm.sml/' -e 'y/:/\n/' \ 33 -e 's/^\(.*\).lex$$/$$(BUILD)\/\1.mlton.lex.sml/' \
35 -e 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \ 34 $^ > $@
36 >$@
37 35
38 src/urweb.mlton.lex: src/urweb.lex 36 src/urweb.mlton.lex: src/urweb.lex
39 cp $< $@ 37 cp $< $@
40 src/urweb.mlton.grm: src/urweb.grm 38 src/urweb.mlton.grm: src/urweb.grm
41 cp $< $@ 39 cp $< $@
54 52
55 #ifdef PROFILE 53 #ifdef PROFILE
56 # MLTON += -profile $(PROFILE) 54 # MLTON += -profile $(PROFILE)
57 #endif 55 #endif
58 56
59 bin/urweb: xml/entities.sml \ 57 bin/urweb: src/compiler.mlb xml/entities.sml \
60 src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \ 58 src/urweb.mlb $(srcdir)/src/*.sig $(srcdir)/src/*.sml src/config.sml \
61 src/urweb.mlton.lex.sml \ 59 src/urweb.mlton.lex.sml \
62 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml 60 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
63 $(MLTON) $(MLTONARGS) -output $@ src/compiler.mlb 61 mkdir -p bin
62 $(MLTON) $(MLTONARGS) -mlb-path-var 'SRC $(abs_srcdir)/src' -mlb-path-var 'BUILD $(abs_builddir)/src' -output $@ $<
64 63
65 xml/entities.sml: xml/parse xml/xhtml-lat1.ent xml/xhtml-special.ent xml/xhtml-symbol.ent 64 xml/entities.sml: xml/parse xml/xhtml-lat1.ent xml/xhtml-special.ent xml/xhtml-symbol.ent
66 $^ > $@ 65 $^ > $@
67 66
68 xml/parse: xml/parse.sml 67 xml/parse: xml/parse.sml
69 $(MLTON) $(MLTONARGS) xml/parse.sml 68 mkdir -p xml
69 $(MLTON) $(MLTONARGS) -output $@ $<
70 70
71 install-exec-emacs: 71 install-exec-emacs:
72 if USE_EMACS 72 if USE_EMACS
73 mkdir -p $(DESTDIR)$(SITELISP) 73 mkdir -p $(DESTDIR)$(SITELISP)
74 cp src/elisp/*.el $(DESTDIR)$(SITELISP)/ 74 cp $(srcdir)/src/elisp/*.el $(DESTDIR)$(SITELISP)/
75 endif 75 endif
76 76
77 install-exec-local-main: 77 install-exec-local-main:
78 mkdir -p $(DESTDIR)$(BIN) 78 mkdir -p $(DESTDIR)$(BIN)
79 install bin/urweb $(DESTDIR)$(BIN)/ 79 install bin/urweb $(DESTDIR)$(BIN)/
80 mkdir -p $(DESTDIR)$(LIB_UR) 80 mkdir -p $(DESTDIR)$(LIB_UR)
81 cp lib/ur/*.urs $(DESTDIR)$(LIB_UR)/ 81 cp $(srcdir)/lib/ur/*.urs $(DESTDIR)$(LIB_UR)/
82 cp lib/ur/*.ur $(DESTDIR)$(LIB_UR)/ 82 cp $(srcdir)/lib/ur/*.ur $(DESTDIR)$(LIB_UR)/
83 mkdir -p $(DESTDIR)$(LIB_JS) 83 mkdir -p $(DESTDIR)$(LIB_JS)
84 cp lib/js/*.js $(DESTDIR)$(LIB_JS)/ 84 cp $(srcdir)/lib/js/*.js $(DESTDIR)$(LIB_JS)/
85 mkdir -p $(DESTDIR)$(INCLUDE) 85 mkdir -p $(DESTDIR)$(INCLUDE)
86 cp include/urweb/*.h $(DESTDIR)$(INCLUDE)/ 86 cp $(srcdir)/include/urweb/*.h $(DESTDIR)$(INCLUDE)/
87 87
88 install-exec-local: install-exec-local-main install-exec-emacs 88 install-exec-local: install-exec-local-main install-exec-emacs
89 -ldconfig 89 -ldconfig
90 90
91 uninstall-emacs: 91 uninstall-emacs: