[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.2-1-gb9285e0
Stephane Glondu
steph at glondu.net
Thu Feb 19 13:05:49 UTC 2009
The following commit has been merged in the master branch:
commit b9285e0d0d03c8da8d8374f0d7570ae736b2fad4
Author: Stephane Glondu <steph at glondu.net>
Date: Thu Feb 19 13:47:41 2009 +0100
Use ocamlinit.mk in ocaml.mk
diff --git a/cdbs/1/class/ocaml.mk b/cdbs/1/class/ocaml.mk
index 9bd0ea2..6230225 100644
--- a/cdbs/1/class/ocaml.mk
+++ b/cdbs/1/class/ocaml.mk
@@ -21,19 +21,18 @@
_cdbs_scripts_path ?= /usr/lib/cdbs
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
_cdbs_class_path ?= /usr/share/cdbs/1/class
+_ocaml_share_path ?= /usr/share/ocaml
ifndef _cdbs_class_ocaml
_cdbs_class_ocaml = 1
# needed by debian/control:: rule below
include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+include $(_ocaml_share_path)/ocamlinit.mk
# to ensure invocations and tests on /usr/bin/ocaml* are meaningful
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ocaml-nox
-# import OCAML_* make variables
-include $(_cdbs_class_path)/ocaml-vars.mk$(_cdbs_makefile_suffix)
-
ifdef _cdbs_rules_debhelper
# ensure dpkg-gencontrol will fill F:OCamlABI fields with the proper value
@@ -42,13 +41,6 @@ DEB_DH_GENCONTROL_ARGS += -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)"
endif
-# filter out lines starting with "OPT: "
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-SEDOPTFILTER := -e 's/^OPT: //'
-else
-SEDOPTFILTER := -e '/^OPT: /d'
-endif
-
# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
$(patsubst %,binary-install/%,$(DEB_PACKAGES))::
@OCAMLDOC="ocamldoc $(OCAML_OCAMLDOC_FLAGS)"; \
@@ -60,7 +52,7 @@ $(patsubst %,binary-install/%,$(DEB_PACKAGES))::
OCAMLDOC="ocamlfind $$OCAMLDOC $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)"; \
fi; \
OCAML_OCAMLDOC_INCLUDE=`for i in $(OCAML_OCAMLDOC_PACKAGES); do \
- find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
+ find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
done`; \
if (echo $(OCAML_OCAMLDOC_PACKAGES) | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
@@ -87,19 +79,7 @@ clean::
# generate .in files counterpars before building, substituting @OCamlABI@
# markers with the proper value; clean stamps after building
pre-build:: ocamlinit
-ocamlinit: ocamlinit-stamp
-ocamlinit-stamp:
- for f in $(OCAML_IN_FILES) ; do \
- sed \
- -e 's, at OCamlABI@,$(OCAML_ABI),g' \
- -e 's, at OCamlStdlibDir@,$(OCAML_STDLIB_DIR),g' \
- -e 's, at OCamlDllDir@,$(OCAML_DLL_DIR),g' \
- $(SEDOPTFILTER) \
- $$f.in > $$f ; \
- done
- touch $@
-clean::
- rm -f ocamlinit-stamp $(OCAML_IN_FILES)
+clean:: ocamlinit-clean
# avoid dpatch breaking upon clean if debian/patches/*.in files are in use
deapply-dpatches: ocamlinit
diff --git a/debian/changelog b/debian/changelog
index c29f136..38852c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dh-ocaml (0.3) UNRELEASED; urgency=low
+
+ * CDBS / Makefile snippets:
+ - ocaml.mk: use ocamlinit.mk
+ - ocamlvars.mk: remove OCAML_IN_FILES, defined in ocamlinit.mk
+
+ -- Stephane Glondu <steph at glondu.net> Thu, 19 Feb 2009 14:03:01 +0100
+
dh-ocaml (0.2) experimental; urgency=low
[ Sylvain Le Gall ]
diff --git a/share/ocamlinit.mk b/share/ocamlinit.mk
index 0dea2fd..d2e682e 100644
--- a/share/ocamlinit.mk
+++ b/share/ocamlinit.mk
@@ -30,7 +30,7 @@ include $(_ocaml_share_path)/ocamlvars.mk
# pre-build filling.
# debian/rules writers might need to add stuff to this list:
# e.g.: OCAML_IN_FILES += debian/patches/foo # (no .in extension)
-OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
+OCAML_IN_FILES ?= $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
# WARNING: there are currently duplications with ocamlvars.mk and
# ocaml.mk, but hopefully they will be removed at some point in the
diff --git a/share/ocamlvars.mk b/share/ocamlvars.mk
index 8c02558..3402374 100644
--- a/share/ocamlvars.mk
+++ b/share/ocamlvars.mk
@@ -39,13 +39,6 @@ OCAML_STDLIB_DIR ?= $(shell /usr/bin/ocamlc -where)
# $(OCAML_IN_FILES) below), may be useful to debian/rules writers as well
OCAML_DLL_DIR ?= $(OCAML_STDLIB_DIR)/stublibs
-# list of .in files contained (non-recursively) in debian/ that requires
-# pre-build filling.
-# Used internally by ocaml.mk.
-# debian/rules writers might need to add stuff to this list:
-# e.g.: OCAML_IN_FILES += debian/patches/foo # (no .in extension)
-OCAML_IN_FILES ?= $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-
# 'yes' if native code compilation is available on the build architecture, 'no' otherwise.
# For debian/rules writers.
OCAML_HAVE_OCAMLOPT ?= $(shell if test -x /usr/bin/ocamlopt ; then echo "yes" ; else echo "no" ; fi)
--
dh-ocaml packaging
More information about the Pkg-ocaml-maint-commits
mailing list