[Pkg-ocaml-maint-commits] [ocaml] 01/02: Move OCAML_* vars into separate file so it's available for ocamlinit.mk

Ximin Luo infinity0 at debian.org
Fri Jul 21 15:33:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian/experimental
in repository ocaml.

commit 365bde9ab1ac4e256a236dfd1cea33dfd9b8f5c9
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Jul 21 17:31:43 2017 +0200

    Move OCAML_* vars into separate file so it's available for ocamlinit.mk
---
 debian/ocamlinit.mk | 11 ++---------
 debian/ocamlvars.mk | 14 ++++++++++++++
 debian/rules        | 15 +--------------
 3 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/debian/ocamlinit.mk b/debian/ocamlinit.mk
index 9348c27..4ce7b66 100644
--- a/debian/ocamlinit.mk
+++ b/debian/ocamlinit.mk
@@ -19,12 +19,11 @@
 # 02110-1301 USA.
 #
 
-_ocaml_share_path ?= /usr/share/ocaml
-
 ifndef _ocaml_share_ocamlinit
 _ocaml_share_ocamlinit = 1
 
-include $(_ocaml_share_path)/ocamlvars.mk
+include $(CURDIR)/debian/ocamlvars.mk
+-include $(CURDIR)/config/Makefile
 
 # list of .in files contained (non-recursively) in debian/ that requires
 # pre-build filling.
@@ -32,12 +31,6 @@ include $(_ocaml_share_path)/ocamlvars.mk
 #  e.g.: OCAML_IN_FILES += debian/patches/foo	# (no .in extension)
 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
-# future
-
--include $(CURDIR)/config/Makefile
-
 OCAMLINIT_SED := \
   -e 's%@OCamlABI@%$(OCAML_ABI)%g' \
   -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%g' \
diff --git a/debian/ocamlvars.mk b/debian/ocamlvars.mk
new file mode 100644
index 0000000..1ec6437
--- /dev/null
+++ b/debian/ocamlvars.mk
@@ -0,0 +1,14 @@
+# Can't use /usr/share/ocaml/ocamlvars.mk because it tries to run ocamlc
+OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR)
+OCAML_STDLIB_DIR := /usr/lib/ocaml
+OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs)
+OCAML_NATDYNLINK_ARCHS := $(shell cat debian/natdynlink-archs)
+OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
+OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no)
+OCAML_OCAMLDOC_DESTDIR_HTML =
+
+ifneq (,$(findstring $(DEB_BUILD_ARCH),$(OCAML_NATDYNLINK_ARCHS)))
+  OCAML_NATDYNLINK := yes
+else
+  OCAML_NATDYNLINK := no
+endif
diff --git a/debian/rules b/debian/rules
index 70aeb4a..4224b32 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,20 +20,7 @@ endif
 # Build cache (for Debian debugging)
 BUILDCACHE := $(wildcard ../ocaml.cache)
 
-# These are defined here to avoid definition of them in ocamlvars.mk
-OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR)
-OCAML_STDLIB_DIR := /usr/lib/ocaml
-OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs)
-OCAML_NATDYNLINK_ARCHS := $(shell cat debian/natdynlink-archs)
-OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
-OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no)
-OCAML_OCAMLDOC_DESTDIR_HTML =
-
-ifneq (,$(findstring $(DEB_BUILD_ARCH),$(OCAML_NATDYNLINK_ARCHS)))
-  OCAML_NATDYNLINK := yes
-else
-  OCAML_NATDYNLINK := no
-endif
+include $(CURDIR)/debian/ocamlvars.mk
 
 MD5SUMSDIR = /var/lib/ocaml/md5sums
 INSTDIR = $(CURDIR)/debian/tmp/usr

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml.git



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