annotate Makefile.am @ 1487:290de2dcecf6

Add client-side Basis.now and pretty-printing of times
author Adam Chlipala <adam@chlipala.net>
date Wed, 06 Jul 2011 08:35:31 -0400
parents 8524a1709821
children b5517f47b1f1
rev   line source
adamc@1141 1 ACLOCAL_AMFLAGS = -I m4
adamc@1141 2
adamc@378 3 BIN := @BIN@
adamc@378 4 LIB := @LIB@
adamc@378 5 INCLUDE := @INCLUDE@
adamc@378 6 SITELISP := @SITELISP@
adamc@378 7
adamc@378 8 LIB_UR := $(LIB)/ur
adamc@378 9 LIB_C := $(LIB)/c
adamc@1095 10 LIB_JS := $(LIB)/js
adamc@1095 11
adamc@1132 12 all-local: smlnj mlton
adamc@378 13
adamc@1132 14 SUBDIRS = src/c
adamc@378 15
adamc@1133 16 .PHONY: smlnj mlton package reauto
adamc@378 17
adamc@378 18 smlnj: src/urweb.cm
adamc@378 19 mlton: bin/urweb
adamc@855 20
adamc@1132 21 clean-local:
adamc@378 22 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
adamc@1132 23 src/urweb.cm src/urweb.mlb
adamc@378 24 rm -rf .cm src/.cm
adamc@378 25
adamc@378 26 src/urweb.cm: src/prefix.cm src/sources
adamc@378 27 cat src/prefix.cm src/sources \
adamc@378 28 >src/urweb.cm
adamc@378 29
adamc@378 30 src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb
adamc@378 31 cat src/prefix.mlb src/sources src/suffix.mlb \
adamc@1159 32 | sed -e 's/^\(.*\).grm$$/\1.mlton.grm.sig:\1.mlton.grm.sml/' -e 'y/:/\n/' \
adamc@1159 33 -e 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \
adamc@791 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
adamc@378 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
adamc@791 57 bin/urweb: src/compiler.mlb src/urweb.mlb src/*.sig src/*.sml \
adamc@378 58 src/urweb.mlton.lex.sml \
adamc@378 59 src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
adamc@791 60 $(MLTON) -output $@ src/compiler.mlb
adamc@378 61
adam@1441 62 install-exec-emacs:
adam@1441 63 if USE_EMACS
adam@1441 64 mkdir -p $(DESTDIR)$(SITELISP)
adam@1441 65 cp src/elisp/*.el $(DESTDIR)$(SITELISP)/
adam@1441 66 endif
adam@1441 67
adam@1441 68 install-exec-local-main:
adam@1440 69 mkdir -p $(DESTDIR)$(BIN)
adam@1440 70 cp bin/urweb $(DESTDIR)$(BIN)/
adam@1440 71 mkdir -p $(DESTDIR)$(LIB_UR)
adam@1440 72 cp lib/ur/*.urs $(DESTDIR)$(LIB_UR)/
adam@1440 73 cp lib/ur/*.ur $(DESTDIR)$(LIB_UR)/
adam@1440 74 mkdir -p $(DESTDIR)$(LIB_JS)
adam@1440 75 cp lib/js/*.js $(DESTDIR)$(LIB_JS)/
adam@1440 76 mkdir -p $(DESTDIR)$(INCLUDE)
adam@1440 77 cp config.h $(DESTDIR)$(INCLUDE)/
adam@1440 78 cp include/*.h $(DESTDIR)$(INCLUDE)/
adam@1441 79
adam@1441 80 install-exec-local: install-exec-local-main install-exec-emacs
adamc@1134 81 -ldconfig
adamc@427 82
adam@1441 83 uninstall-emacs:
adam@1441 84 if USE_EMACS
adam@1441 85 rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \
adam@1441 86 $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el
adam@1441 87 endif
adam@1441 88
adam@1441 89 uninstall-local-main:
adam@1440 90 rm -f $(DESTDIR)$(BIN)/urweb \
adam@1440 91 $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \
adam@1440 92 $(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \
adam@1440 93 $(DESTDIR)$(LIB_UR)/char.ur $(DESTDIR)$(LIB_UR)/listPair.ur $(DESTDIR)$(LIB_UR)/list.ur \
adam@1440 94 $(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \
adam@1440 95 $(DESTDIR)$(LIB_JS)/urweb.js \
adam@1440 96 $(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \
adam@1441 97 $(DESTDIR)$(INCLUDE)/urweb.h
adam@1441 98
adam@1441 99 uninstall-local: uninstall-local-main uninstall-emacs
adam@1399 100
adamc@427 101 package:
adamc@427 102 hg archive -t tgz -X tests /tmp/urweb.tgz
adamc@1132 103
adamc@1133 104 reauto:
adamc@1135 105 -autoreconf
adamc@1133 106 libtoolize -cf
adamc@1133 107 automake --add-missing --force-missing --copy
adamc@1133 108 autoreconf