No change, just refactoring.
---
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 d464615..20f87ca 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)
--
2.0.4
Show replies by date
This generates .annot files that contain type information.
In emacs + tuareg mode, using C-c C-t displays the type of the
underlying expression.
---
.gitignore | 1 +
configure.ac | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 269d735..fa1cee4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*~
*.a
+*.annot
*.bak
*.class
*.cma
diff --git a/configure.ac b/configure.ac
index 20f87ca..6c33444 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1096,7 +1096,7 @@ AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
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"
+OCAML_FLAGS="-g -annot"
AC_SUBST([OCAML_FLAGS])
dnl Check for Perl (optional, for Perl bindings and Perl tools).
--
2.0.4
On Thursday 23 October 2014 15:51:23 Richard W.M. Jones wrote:
No change, just refactoring.
This and the -annot addition LGTM.
--
Pino Toscano