[Pkg-libvirt-commits] [libguestfs] 23/61: ocaml: Factor out flags into configure script.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:09:37 UTC 2014


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

bengen pushed a commit to annotated tag debian/1%1.28.2-1
in repository libguestfs.

commit 65cea69313ac6ec40d3791336d87f6e6cebd28a8
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Oct 23 15:41:49 2014 +0100

    ocaml: Factor out flags into configure script.
    
    No change, just refactoring.
    
    (cherry picked from commit 90dc8942bf34a6b42ca3e8b58ed2bb15ebbd7918)
---
 builder/Makefile.am   | 2 +-
 configure.ac          | 6 ++++++
 customize/Makefile.am | 2 +-
 generator/Makefile.am | 2 +-
 mllib/Makefile.am     | 2 +-
 ocaml/Makefile.am     | 2 +-
 resize/Makefile.am    | 2 +-
 sparsify/Makefile.am  | 2 +-
 sysprep/Makefile.am   | 2 +-
 v2v/Makefile.am       | 2 +-
 10 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/builder/Makefile.am b/builder/Makefile.am
index dd96533..fd5c8e2 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -158,7 +158,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3 $(OCAMLPACKAGES)
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 OCAMLCLIBS  = \
diff --git a/configure.ac b/configure.ac
index 74c72a1..9b9f257 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1093,6 +1093,12 @@ AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no])
 AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
     [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_gettext" != "xno" && test "x$OCAML_GETTEXT" != "xno"])
 
+dnl Flags we want to pass to every OCaml compiler call.
+OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX-3"
+AC_SUBST([OCAML_WARN_ERROR])
+OCAML_FLAGS="-g"
+AC_SUBST([OCAML_FLAGS])
+
 dnl Check for Perl (optional, for Perl bindings and Perl tools).
 AC_ARG_ENABLE([perl],
     AS_HELP_STRING([--disable-perl], [disable Perl language bindings]),
diff --git a/customize/Makefile.am b/customize/Makefile.am
index 0760476..0ea8d39 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -115,7 +115,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3 $(OCAMLPACKAGES)
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 OCAMLCLIBS  = \
diff --git a/generator/Makefile.am b/generator/Makefile.am
index 3716c77..6e4928f 100644
--- a/generator/Makefile.am
+++ b/generator/Makefile.am
@@ -95,7 +95,7 @@ objects = \
 
 EXTRA_DIST = $(sources) files-generated.txt
 
-OCAMLCFLAGS = -warn-error CDEFLMPSUVYZX-3 -I $(srcdir) -I . -package unix,str
+OCAMLCFLAGS = $(OCAML_WARN_ERROR) -I $(srcdir) -I . -package unix,str
 
 noinst_PROGRAM = generator
 
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
index 653b8aa..903a77d 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
@@ -95,7 +95,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3 $(OCAMLPACKAGES)
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 OCAMLCLIBS  = \
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 94f11ef..41270a6 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -37,7 +37,7 @@ CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
 
 if HAVE_OCAML
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 noinst_DATA = mlguestfs.cma META
diff --git a/resize/Makefile.am b/resize/Makefile.am
index eb4ded3..629fa22 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -67,7 +67,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3 $(OCAMLPACKAGES)
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 OCAMLCLIBS  = \
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
index 48cd5f0..a7d4166 100644
--- a/sparsify/Makefile.am
+++ b/sparsify/Makefile.am
@@ -72,7 +72,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLFLAGS = -g -warn-error CDEFLMPSUVYZX-3
+OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
 
 if !HAVE_OCAMLOPT
 OBJECTS = $(BOBJECTS)
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index b1cebc2..6c760a8 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
@@ -130,7 +130,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX-3 $(OCAMLPACKAGES)
+OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
 
 OCAMLCLIBS  = \
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 921fb93..2f1f9bc 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -156,7 +156,7 @@ if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
 
-OCAMLFLAGS = -g -warn-error CDEFLMPSUVYZX-3
+OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
 
 if !HAVE_OCAMLOPT
 OBJECTS = $(BOBJECTS)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list