[Pkg-ocaml-maint-commits] [SCM] dose2 packaging branch, master, updated. a6e2dc48f8f8c55538b596ae7e3015187c714278

Stefano Zacchiroli zack at upsilon.cc
Thu May 15 22:07:28 UTC 2008


The following commit has been merged in the master branch:
commit 975e567f13698b265eacf3aadffdff2a766d56c9
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date:   Thu May 15 23:52:55 2008 +0200

    support installation in a target dir

diff --git a/Makefile.config.in b/Makefile.config.in
index 698cf95..82cc21c 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -57,9 +57,9 @@ ifdef C_SOURCES
 endif
 
 cmi-install:
-	install -m 644 $(CMIS) $(INSTALLDIR)
+	install -m 644 $(CMIS) $(DESTDIR)/$(INSTALLDIR)
 
 extra-install:
 ifdef EXTRA_INSTALL
-	install $(EXTRA_INSTALL) $(INSTALLDIR)
+	install $(EXTRA_INSTALL) $(DESTDIR)/$(INSTALLDIR)
 endif
diff --git a/Makefile.in b/Makefile.in
index 02b0f9e..e4aff06 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -44,12 +44,16 @@ depend:
 		$(MAKE) -C $$i depend; \
 	done
 
+ifneq ($(DESTDIR),)
+DESTDIR_FLAGS = -destdir $(DESTDIR)
+endif
+
 install: @BEST@
 ifeq (@OCAMLBEST@, byte)
-	@OCAMLFIND@ install -patch-version -patch-archives @VERSION@ dose2 META $(CMAS)
+	@OCAMLFIND@ install $(DESTDIR_FLAGS) -patch-version -patch-archives @VERSION@ dose2 META $(CMAS)
 else
-	@OCAMLFIND@ install -patch-version @VERSION@ dose2 META $(CMAS) $(CMXAS) $(ARCHIVES)
+	@OCAMLFIND@ install $(DESTDIR_FLAGS) -patch-version @VERSION@ dose2 META $(CMAS) $(CMXAS) $(ARCHIVES)
 endif	
 	@for i in $(DIRS); do \
-		$(MAKE) -C $$i cmi-install extra-install; \
+		$(MAKE) -C $$i cmi-install extra-install DESTDIR=$(DESTDIR); \
 	done

-- 
dose2 packaging



More information about the Pkg-ocaml-maint-commits mailing list