Added MANIFEST, distribution rule.
authorRichard W.M. Jones <rich@annexia.org>
Tue, 1 Apr 2008 22:18:24 +0000 (22:18 +0000)
committerRichard W.M. Jones <rich@annexia.org>
Tue, 1 Apr 2008 22:18:24 +0000 (22:18 +0000)
MANIFEST [new file with mode: 0644]
Makefile

diff --git a/MANIFEST b/MANIFEST
new file mode 100644 (file)
index 0000000..2c5ea45
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,24 @@
+bitmatch.ml
+bitmatch.mli
+.cvsignore
+.depend
+examples/.cvsignore
+examples/ipv4_header.ml
+examples/make_ipv4_header.ml
+Makefile
+MANIFEST
+pa_bitmatch.ml
+tests/01_load.ml
+tests/03_hexdump.ml
+tests/05_bits.ml
+tests/06_ints1.ml
+tests/06_ints2.ml
+tests/06_ints3.ml
+tests/10_constr1.ml
+tests/20_varsize.ml
+tests/60_ping.ml
+tests/70_ext3_sb.ml
+tests/.cvsignore
+tests/ext3_sb
+tests/ipv4.ping
+tests/ipv6.ping
index e1973c8..44b677d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
-# $Id: Makefile,v 1.3 2008-04-01 17:05:37 rjones Exp $
+# $Id: Makefile,v 1.4 2008-04-01 22:18:24 rjones Exp $
+
+PACKAGE        = ocaml-bitmatch
+VERSION        = 0.1
 
 OCAMLFIND = ocamlfind
 OCAMLMKLIB = ocamlmklib
 
-
 OCAMLCFLAGS = -g
 OCAMLCPACKAGES =
 OCAMLOPTFLAGS =
@@ -65,6 +67,29 @@ ifeq ($(wildcard .depend),.depend)
 include .depend
 endif
 
+# Distribution.
+
+dist:
+       $(MAKE) check-manifest
+       rm -rf $(PACKAGE)-$(VERSION)
+       mkdir $(PACKAGE)-$(VERSION)
+       tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
+       $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
+       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`; 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-examples print-tests test
 
 .SUFFIXES:      .cmo .cmi .cmx .ml .mli .mll