# Interface to Perl from OCaml.
# Copyright (C) 2003 Merjis Ltd.
-# $Id: Makefile,v 1.12 2003-10-22 10:18:26 rich Exp $
+# $Id: Makefile,v 1.13 2003-10-26 10:20:19 rich Exp $
include Makefile.config
LIBPERL := $(shell perl -MExtUtils::Embed -e ldopts)
+SED := sed
+
# XXX Hack required by ocamlopt, and sometimes ocamlc.
# To work out what this should be, try:
# `shell perl -MExtUtils::Embed -e ldopts'
wrappers/pl_HTTP_Response.cmo \
wrappers/pl_LWP_UserAgent.cmo
-all: perl4caml.cma perl4caml.cmxa all-examples html
+all: perl4caml.cma perl4caml.cmxa META all-examples html
perl4caml.cma: perl.cmo perl_c.o $(WRAPPERS)
$(OCAMLMKLIB) -o perl4caml $(LIBPERL) $^
.SUFFIXES: .mli .ml .cmi .cmo .cmx
+META: META.in Makefile.config
+ $(SED) -e 's/@PACKAGE@/$(PACKAGE)/' \
+ -e 's/@VERSION@/$(VERSION)/' \
+ < $< > $@
+
# Clean.
JUNKFILES = core *~ *.bak *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so
clean:
- rm -f examples/test examples/loadpage examples/google
+ rm -f META examples/test examples/loadpage examples/google
for d in . examples wrappers; do (cd $$d; rm -f $(JUNKFILES)); done
# Build dependencies.
install -c -m 0755 -d $(OCAMLLIBDIR)/perl
install -c -m 0755 -d $(OCAMLLIBDIR)/stublibs
install -c -m 0644 perl.cmi perl.mli perl4caml.cma perl4caml.cmxa \
- perl4caml.a libperl4caml.a \
+ perl4caml.a libperl4caml.a META \
$(WRAPPERS:.cmo=.ml) $(WRAPPERS:.cmo=.cmi) $(OCAMLLIBDIR)/perl
install -c -m 0644 dllperl4caml.so $(OCAMLLIBDIR)/stublibs
# perl4caml configuration -*- Makefile -*-
-# $Id: Makefile.config,v 1.10 2003-10-16 13:41:22 rich Exp $
+# $Id: Makefile.config,v 1.11 2003-10-26 10:20:19 rich Exp $
# PERLINCDIR
# Directory containing the Perl include files, eg. <EXTERN.h>.
# PACKAGE and VERSION
PACKAGE := perl4caml
-VERSION := 0.3.5
+VERSION := 0.3.6