added support for substituting @OCamlStdlibDir@
authorStefano Zacchiroli <zack@debian.org>
Fri, 13 Oct 2006 08:27:10 +0000 (08:27 +0000)
committerStefano Zacchiroli <zack@debian.org>
Fri, 13 Oct 2006 08:27:10 +0000 (08:27 +0000)
debian/cdbs/ocaml-vars.mk
debian/cdbs/ocaml.mk

index cdd5e58907db74853143268d34bb60e7a9523632..f46f87afbf5f57672026f3267dc456deb962fd24 100644 (file)
@@ -16,7 +16,7 @@
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
-# $Id: ocaml-vars.mk 3235 2006-10-12 06:52:48Z zack $
+# $Id: ocaml-vars.mk 3237 2006-10-13 08:27:10Z zack $
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
@@ -26,11 +26,13 @@ ifndef _cdbs_class_ocaml_vars
 _cdbs_class_ocaml = 1
 
 # current OCaml ABI version (ATM 3.09.2).
-# Used internally by ocaml.mk, may be useful to debian/rules writers as well
+# Used internally by ocaml.mk (substituted for @OCamlABI@ in $(OCAML_IN_FILES)
+# below), may be useful to debian/rules writers as well
 OCAML_ABI := $(shell /usr/bin/ocamlc -version)
 
 # OCaml standard library location.
-# For debian/rules writers.
+# Used internally by ocaml.mk (substituted for @OCamlStdlibDir@ in
+# $(OCAML_IN_FILES) below), may be useful to debian/rules writers as well
 OCAML_STDLIB_DIR := $(shell /usr/bin/ocamlc -where)
 
 # list of .in files contained (non-recursively) in debian/ that requires
index 1d37792dd5cea07b4f916642bbbae444f2c403b0..221f76598d36194eab71932a09a45bc46a2af012 100644 (file)
@@ -16,7 +16,7 @@
 # this program; if not, write to the Free Software Foundation, Inc., 51
 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
-# $Id: ocaml.mk 3235 2006-10-12 06:52:48Z zack $
+# $Id: ocaml.mk 3237 2006-10-13 08:27:10Z zack $
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
@@ -46,7 +46,10 @@ pre-build:: ocamlinit
 ocamlinit: ocamlinit-stamp
 ocamlinit-stamp:
        for f in $(OCAML_IN_FILES) ; do \
-               sed -e 's/@OCamlABI@/$(OCAML_ABI)/g' $$f.in > $$f ; \
+               sed \
+                       -e 's/@OCamlABI@/$(OCAML_ABI)/g' \
+                       -e 's/@OCamlStdlibDir@/$(OCAML_STDLIB_DIR)/g' \
+                       $$f.in > $$f ; \
        done
        touch $@
 clean::