aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--LICENSE25
-rw-r--r--Makefile71
-rw-r--r--Makefile.in5
3 files changed, 29 insertions, 72 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..0c963687
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2008, Adam Chlipala
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+- The names of contributors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 8e65ea08..00000000
--- a/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-BIN := /usr/local/bin
-LIB := /usr/local/lib/urweb
-INCLUDE := /usr/local/include/urweb
-SITELISP := /usr/local/share/emacs/site-lisp/urweb-mode
-
-LIB_UR := $(LIB)/ur
-LIB_C := $(LIB)/c
-
-all: smlnj mlton c
-
-.PHONY: all smlnj mlton c clean install
-
-smlnj: src/urweb.cm
-mlton: bin/urweb
-c: clib/urweb.o clib/driver.o
-
-clean:
- rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
- src/urweb.cm src/urweb.mlb \
- clib/*.o
- rm -rf .cm src/.cm
-
-clib/urweb.o: src/c/urweb.c
- gcc -O3 -I include -c src/c/urweb.c -o clib/urweb.o
-
-clib/driver.o: src/c/driver.c
- gcc -O3 -I include -c src/c/driver.c -o clib/driver.o
-
-src/urweb.cm: src/prefix.cm src/sources
- cat src/prefix.cm src/sources \
- >src/urweb.cm
-
-src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb
- cat src/prefix.mlb src/sources src/suffix.mlb \
- | sed 's/^\(.*\).grm$$/\1.mlton.grm.sig\n\1.mlton.grm.sml/' \
- | sed 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \
- >src/urweb.mlb
-
-%.mlton.lex: %.lex
- cp $< $@
-%.mlton.grm: %.grm
- cp $< $@
-
-%.mlton.lex.sml: %.mlton.lex
- mllex $<
-
-%.mlton.grm.sig %.mlton.grm.sml: %.mlton.grm
- mlyacc $<
-
-MLTON := mlton
-
-ifdef DEBUG
- MLTON += -const 'Exn.keepHistory true'
-endif
-
-bin/urweb: src/urweb.mlb src/*.sig src/*.sml \
- src/urweb.mlton.lex.sml \
- src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml
- $(MLTON) -output $@ src/urweb.mlb
-
-install:
- cp bin/urweb $(BIN)/
- mkdir -p $(LIB_UR)
- cp lib/*.urs $(LIB_UR)/
- cp lib/*.ur $(LIB_UR)/
- mkdir -p $(LIB_C)
- cp clib/*.o $(LIB_C)/
- mkdir -p $(INCLUDE)
- cp include/*.h $(INCLUDE)/
- mkdir -p $(SITELISP)
- cp src/elisp/*.el $(SITELISP)/
diff --git a/Makefile.in b/Makefile.in
index 66da550e..f85b851c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,7 +8,7 @@ LIB_C := $(LIB)/c
all: smlnj mlton c
-.PHONY: all smlnj mlton c clean install
+.PHONY: all smlnj mlton c clean install package
smlnj: src/urweb.cm
mlton: bin/urweb
@@ -69,3 +69,6 @@ install:
cp include/*.h $(INCLUDE)/
mkdir -p $(SITELISP)
cp src/elisp/*.el $(SITELISP)/
+
+package:
+ hg archive -t tgz -X tests /tmp/urweb.tgz