From ca5c0933addc2b872316df28789f7de81281c3fe Mon Sep 17 00:00:00 2001 From: rich Date: Sun, 12 Oct 2003 12:14:06 +0000 Subject: [PATCH] Added make dist rule & MANIFEST. --- .cvsignore | 1 + MANIFEST | 12 ++++++++++++ Makefile | 38 ++++++++++++++++++++++++++++++++++---- Makefile.config | 12 +++++++++++- 4 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 MANIFEST diff --git a/.cvsignore b/.cvsignore index c0404dd..46ba5bc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -3,3 +3,4 @@ *.cmx *.cma *.cmxa +perl4caml-*.tar.gz \ No newline at end of file diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..7631190 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,12 @@ +.cvsignore +.depend +Makefile +Makefile.config +MANIFEST +examples/.cvsignore +examples/TestClass.pm +examples/test.ml +examples/test.pl +perl.ml +perl.mli +perl_c.c \ No newline at end of file diff --git a/Makefile b/Makefile index 3f00efc..b02d272 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Interface to Perl from OCaml. # Copyright (C) 2003 Merjis Ltd. -# $Id: Makefile,v 1.4 2003-10-12 11:57:07 rich Exp $ +# $Id: Makefile,v 1.5 2003-10-12 12:14:06 rich Exp $ include Makefile.config @@ -15,9 +15,7 @@ OCAMLOPTFLAGS := -w s CC := gcc CFLAGS := -Wall -Wno-unused -I$(PERLINCDIR) -all: perl.cma examples/test - -opt: perl.cmxa +all: perl.cma perl.cmxa examples/test perl.cma: perl.cmo perl_c.o $(OCAMLMKLIB) -o perl $^ -lperl @@ -57,3 +55,35 @@ depend: .depend .depend: $(wildcard *.ml) $(wildcard *.mli) $(OCAMLDEP) *.mli *.ml examples/*.ml > .depend + +# Install. + +install: + install -c -m 0755 -d $(OCAMLLIBDIR) + install -c -m 0755 -d $(OCAMLLIBDIR)/stublibs + install -c -m 0644 perl.cmi perl.mli perl.cma perl.cmxa $(OCAMLLIBDIR) + install -c -m 0644 perl.a libperl.a $(OCAMLLIBDIR) + install -c -m 0644 dllperl.so $(OCAMLLIBDIR)/stublibs + +# Distribution. + +dist: + 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`; \ + 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; \ + rm -f .orig-manifest .check-manifest + +.PHONY: depend dist check-manifest \ No newline at end of file diff --git a/Makefile.config b/Makefile.config index acf9799..e3a1039 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,7 +1,17 @@ # perl4caml configuration -*- Makefile -*- -# $Id: Makefile.config,v 1.1 2003-10-11 18:25:52 rich Exp $ +# $Id: Makefile.config,v 1.2 2003-10-12 12:14:06 rich Exp $ # PERLINCDIR # Directory containing the Perl include files, eg. . PERLINCDIR := $(shell perl -MConfig -e 'print "$$Config{archlib}/CORE"') + +# OCAMLLIBDIR +# This is where we will install perl4caml. + +OCAMLLIBDIR := $(shell ocamlc -where) + +# PACKAGE and VERSION + +PACKAGE := perl4caml +VERSION := 0.2.0 -- 1.8.3.1