Producing first Debian packages.
[perl4caml.git] / Makefile
index 079aef1..e852966 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # Interface to Perl from OCaml.
 # Copyright (C) 2003 Merjis Ltd.
-# $Id: Makefile,v 1.13 2003-10-26 10:20:19 rich Exp $
+# $Id: Makefile,v 1.14 2003-11-02 13:28:38 rich Exp $
 
 include Makefile.config
 
@@ -25,7 +25,7 @@ SED := sed
 
 # XXX Hack required by ocamlopt, and sometimes ocamlc.
 # To work out what this should be, try:
-# `shell perl -MExtUtils::Embed -e ldopts'
+# `perl -MExtUtils::Embed -e ldopts'
 DYNALOADER_HACK := /usr/lib/perl/5.8.1/auto/DynaLoader/DynaLoader.a
 
 OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCINCS)
@@ -117,13 +117,14 @@ depend:   .depend
 # Install.
 
 install:
-       rm -rf $(OCAMLLIBDIR)/perl
-       install -c -m 0755 -d $(OCAMLLIBDIR)/perl
-       install -c -m 0755 -d $(OCAMLLIBDIR)/stublibs
+       rm -rf $(DESTDIR)$(OCAMLLIBDIR)/perl
+       install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/perl
+       install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/stublibs
        install -c -m 0644 perl.cmi perl.mli perl4caml.cma perl4caml.cmxa \
          perl4caml.a libperl4caml.a META \
-         $(WRAPPERS:.cmo=.ml) $(WRAPPERS:.cmo=.cmi) $(OCAMLLIBDIR)/perl
-       install -c -m 0644 dllperl4caml.so $(OCAMLLIBDIR)/stublibs
+         $(WRAPPERS:.cmo=.ml) $(WRAPPERS:.cmo=.cmi) \
+         $(DESTDIR)$(OCAMLLIBDIR)/perl
+       install -c -m 0644 dllperl4caml.so $(DESTDIR)$(OCAMLLIBDIR)/stublibs
 
 # Distribution.