-# $Id: Makefile,v 1.1 2007/06/28 19:47:26 rjones Exp $
+# $Id: Makefile,v 1.2 2007/06/28 20:49:10 rjones Exp $
include Makefile.config
sed \
-e 's|@OCAML@|$(OCAML)|' \
-e 's|@INITSCRIPT@|$(INITSCRIPT)|' \
+ -e 's|@CHROOTDIR@|$(CHROOTDIR)|' \
< $< > $@
init: init.in Makefile.config
-pp "camlp4o pa_extend.cmo q_MLast.cmo" -I +camlp4 -c $<
clean:
- rm -f ocamlbotwrapper *.o *.cmo *.cmi *~
\ No newline at end of file
+ rm -f ocamlbotwrapper *.o *.cmo *.cmi *~
+
+# Distribution.
+
+dist:
+ $(MAKE) check-manifest
+ rm -rf $(PACKAGE)-$(VERSION)
+ mkdir $(PACKAGE)-$(VERSION)
+ tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
+ tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
+ rm -rf $(PACKAGE)-$(VERSION)
+ ls -l $(PACKAGE)-$(VERSION).tar.gz
+
+check-manifest:
+ @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
+ do \
+ b=`dirname $$d`/; \
+ awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
+ sed -e "s|^|$$b|" -e "s|^\./||"; \
+ done | sort > .check-manifest; \
+ sort MANIFEST > .orig-manifest; \
+ diff -u .orig-manifest .check-manifest; rv=$$?; \
+ rm -f .orig-manifest .check-manifest; \
+ exit $$rv
+
+
+.PHONY: depend dist check-manifest dpkg doc print_test
+
+.SUFFIXES: .cmo .cmi .cmx .ml .mli