adamc@1141: ACLOCAL_AMFLAGS = -I m4 adamc@1141: jgross@1837: BIN = @BIN@ jgross@1837: SRCLIB = @SRCLIB@ jgross@1837: INCLUDE = @INCLUDE@ jgross@1837: SITELISP = @SITELISP@ jgross@1837: VERSION = @VERSION@ jgross@1837: MLTONARGS = @MLTONARGS@ adamc@378: adam@1760: LIB_UR = $(SRCLIB)/ur adam@1760: LIB_C = $(SRCLIB)/c adam@1760: LIB_JS = $(SRCLIB)/js adamc@1095: adamc@1132: all-local: smlnj mlton adamc@378: adamc@1132: SUBDIRS = src/c adamc@378: adamc@1133: .PHONY: smlnj mlton package reauto adamc@378: adam@1847: smlnj: src/urweb.cm xml/entities.sml adamc@378: mlton: bin/urweb adamc@855: adamc@1132: clean-local: andersk@1908: rm -f bin/urweb src/urweb.mlton.* \ adam@1592: src/urweb.cm src/urweb.mlb xml/parse xml/entities.sml adamc@378: rm -rf .cm src/.cm adamc@378: adamc@378: src/urweb.cm: src/prefix.cm src/sources adam@1910: cat $^ | sed -e 's/$$(SRC)\///g' > $@ adamc@378: adamc@378: src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb andersk@1906: sed -e 's/^\(.*\).grm$$/$$(BUILD)\/\1.mlton.grm.sig:\1.mlton.grm.sml/' -e 'y/:/\n/' \ andersk@1906: -e 's/^\(.*\).lex$$/$$(BUILD)\/\1.mlton.lex.sml/' \ andersk@1906: $^ > $@ adamc@378: adamc@1154: src/urweb.mlton.lex: src/urweb.lex adamc@378: cp $< $@ adamc@1154: src/urweb.mlton.grm: src/urweb.grm adamc@378: cp $< $@ adamc@378: adamc@1154: src/urweb.mlton.lex.sml: src/urweb.mlton.lex adamc@378: mllex $< adamc@378: adamc@1154: src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml: src/urweb.mlton.grm adamc@378: mlyacc $< adamc@378: adam@1760: MLTON = mlton adamc@378: adamc@1132: #ifdef DEBUG adamc@1132: # MLTON += -const 'Exn.keepHistory true' adamc@1132: #endif adamc@378: adamc@1132: #ifdef PROFILE adamc@1132: # MLTON += -profile $(PROFILE) adamc@1132: #endif adamc@507: andersk@1906: bin/urweb: src/compiler.mlb xml/entities.sml \ andersk@1906: src/urweb.mlb $(srcdir)/src/*.sig $(srcdir)/src/*.sml src/config.sml \ adamc@378: src/urweb.mlton.lex.sml \ adamc@378: src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml andersk@1906: mkdir -p bin andersk@1906: $(MLTON) $(MLTONARGS) -mlb-path-var 'SRC $(abs_srcdir)/src' -mlb-path-var 'BUILD $(abs_builddir)/src' -output $@ $< adamc@378: adam@1592: xml/entities.sml: xml/parse xml/xhtml-lat1.ent xml/xhtml-special.ent xml/xhtml-symbol.ent andersk@1904: $^ > $@ adam@1592: adam@1592: xml/parse: xml/parse.sml andersk@1906: mkdir -p xml andersk@1906: $(MLTON) $(MLTONARGS) -output $@ $< adam@1592: adam@1441: install-exec-emacs: adam@1441: if USE_EMACS adam@1441: mkdir -p $(DESTDIR)$(SITELISP) andersk@1906: cp $(srcdir)/src/elisp/*.el $(DESTDIR)$(SITELISP)/ adam@1441: endif adam@1441: adam@1441: install-exec-local-main: adam@1440: mkdir -p $(DESTDIR)$(BIN) adam@1733: install bin/urweb $(DESTDIR)$(BIN)/ adam@1440: mkdir -p $(DESTDIR)$(LIB_UR) andersk@1906: cp $(srcdir)/lib/ur/*.urs $(DESTDIR)$(LIB_UR)/ andersk@1906: cp $(srcdir)/lib/ur/*.ur $(DESTDIR)$(LIB_UR)/ adam@1440: mkdir -p $(DESTDIR)$(LIB_JS) andersk@1906: cp $(srcdir)/lib/js/*.js $(DESTDIR)$(LIB_JS)/ adam@1440: mkdir -p $(DESTDIR)$(INCLUDE) andersk@1906: cp $(srcdir)/include/urweb/*.h $(DESTDIR)$(INCLUDE)/ adam@1441: adam@1441: install-exec-local: install-exec-local-main install-exec-emacs adamc@1134: -ldconfig adamc@427: adam@1441: uninstall-emacs: adam@1441: if USE_EMACS adam@1441: rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \ adam@1441: $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el adam@1441: endif adam@1441: adam@1441: uninstall-local-main: phurst@1972: rm -f $(DESTDIR)$(BIN)/urweb $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/datetime.urs \ phurst@1972: $(DESTDIR)$(LIB_UR)/listPair.urs \ $(DESTDIR)$(LIB_UR)/list.urs $(DESTDIR)$(LIB_UR)/monad.urs \ phurst@1972: $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs $(DESTDIR)$(LIB_UR)/char.ur \ phurst@1972: $(DESTDIR)$(LIB_UR)/datetime.ur $(DESTDIR)$(LIB_UR)/listPair.ur $(DESTDIR)$(LIB_UR)/list.ur $(DESTDIR)$(LIB_UR)/monad.ur \ phurst@1972: $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur $(DESTDIR)$(LIB_JS)/urweb.js \ phurst@1972: $(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \ andersk@1907: $(DESTDIR)$(INCLUDE)/urweb.h $(DESTDIR)$(INCLUDE)/types_cpp.h $(DESTDIR)$(INCLUDE)/urweb_cpp.h adam@1441: adam@1441: uninstall-local: uninstall-local-main uninstall-emacs adam@1399: adamc@427: package: adam@1520: hg archive -t tgz -X tests "/tmp/urweb-$(VERSION).tgz" adamc@1132: adamc@1133: reauto: adam@1910: ./autogen.sh adam@1895: andersk@1909: EXTRA_DIST = demo doc lib/js lib/ur xml \ andersk@1909: src/coq src/*.sig src/*.sml src/*.mlb src/config.sml.in src/elisp src/*.cm src/sources src/*.grm src/*.lex \ andersk@1909: CHANGELOG LICENSE urweb.ebuild include/urweb/*.h bin