[PPL-devel] [GIT] ppl/ppl(master): Use the macros OCAMLC, OCAMLOPT and OCAMLLIB.

Roberto Bagnara bagnara at cs.unipr.it
Sat Apr 25 14:49:23 CEST 2009


Module: ppl/ppl
Branch: master
Commit: 252f8ae1ac62d5d64e22986dacd4cac87b9bb012
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=252f8ae1ac62d5d64e22986dacd4cac87b9bb012

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Sat Apr 25 14:49:22 2009 +0200

Use the macros OCAMLC, OCAMLOPT and OCAMLLIB.

---

 configure.ac                       |    4 +---
 interfaces/OCaml/Makefile.am       |    4 +---
 interfaces/OCaml/tests/Makefile.am |   12 ++++++------
 3 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6499ffd..ddcf68c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1004,10 +1004,9 @@ then
   AC_PROG_OCAML
   if test x"$OCAMLC" != xno
   then
-     ocamlc_root=`${OCAMLC} -where`
      # Check for the bytecode version of ML GMP.
      AC_MSG_CHECKING([for ML GMP bytecode module gmp.cma])
-     if ( test ${mlgmp_dir} = +gmp && test -f ${ocamlc_root}/gmp/gmp.cma ) \
+     if ( test ${mlgmp_dir} = +gmp && test -f ${OCAMLLIB}/gmp/gmp.cma ) \
         || test -f ${mlgmp_dir}/gmp.cma;
      then
          AC_MSG_RESULT(yes)
@@ -1513,7 +1512,6 @@ AC_SUBST(required_instantiations_java_cxx_objects)
 AC_SUBST(required_instantiations_ocaml_cxx_headers)
 AC_SUBST(required_instantiations_ocaml_cxx_sources)
 AC_SUBST(required_instantiations_ocaml_cxx_objects)
-AC_SUBST(ocamlc_root)
 AC_SUBST(mlgmp_dir)
 
 AC_CONFIG_FILES(Makefile
diff --git a/interfaces/OCaml/Makefile.am b/interfaces/OCaml/Makefile.am
index 8237afa..af9d893 100644
--- a/interfaces/OCaml/Makefile.am
+++ b/interfaces/OCaml/Makefile.am
@@ -171,14 +171,12 @@ OCAMLC_COMPILE_FLAGS = \
 OCAMLC_LINK_FLAGS = \
 `echo " $(extra_libraries) " | $(SED) -e "s/ -R[^ ]*//g" -e "s/ -/ -cclib -/g"`
 
-OCAMLC_ROOT = @ocamlc_root@
-
 OCAMLOPT_ENV = $(OCAMLC_ENV)
 OCAMLOPT_COMPILE_FLAGS = $(OCAMLC_COMPILE_FLAGS)
 OCAMLOPT_LINK_FLAGS = $(OCAMLC_LINK_FLAGS)
 
 AM_CPPFLAGS = \
--I$(OCAMLC_ROOT) \
+-I$(OCAMLLIB) \
 -I$(top_srcdir)/interfaces \
 -I$(top_srcdir)/src \
 -I$(top_builddir)/src \
diff --git a/interfaces/OCaml/tests/Makefile.am b/interfaces/OCaml/tests/Makefile.am
index e481093..89b5c46 100644
--- a/interfaces/OCaml/tests/Makefile.am
+++ b/interfaces/OCaml/tests/Makefile.am
@@ -96,10 +96,10 @@ PWL_DLOPEN = -dlopen ../../../Watchdog/src/libpwl.la
 endif BUILD_WATCHDOG_LIBRARY
 
 .ml.cmo:
-	$(OCAMLC_ENV) ocamlc -o $@ -c $(OCAMLC_COMPILE_FLAGS) $<
+	$(OCAMLC_ENV) $(OCAMLC) -o $@ -c $(OCAMLC_COMPILE_FLAGS) $<
 
 .ml.cmx:
-	$(OCAMLOPT_ENV) ocamlopt -o $@ -c $(OCAMLOPT_COMPILE_FLAGS) $<
+	$(OCAMLOPT_ENV) $(OCAMLOPT) -o $@ -c $(OCAMLOPT_COMPILE_FLAGS) $<
 
 if HAVE_OCAMLC
 
@@ -124,7 +124,7 @@ check_PROGRAMS = $(TESTS)
 test1_SOURCES = test1.ml
 
 test1$(EXEEXT): test1.cmo ../ppl_ocaml.cma
-	$(OCAMLC_ENV) ocamlc -o $@ \
+	$(OCAMLC_ENV) $(OCAMLC) -o $@ \
 		-cc "$(CXX)" $(OCAMLC_COMPILE_FLAGS) \
 		$(BUILT_PPL_FLAGS) $(BUILT_PWL_FLAGS) $(OCAMLC_LINK_FLAGS) \
 		ppl_ocaml.cma $<
@@ -132,7 +132,7 @@ test1$(EXEEXT): test1.cmo ../ppl_ocaml.cma
 test1_opt_SOURCES = test1.ml
 
 test1_opt$(EXEEXT): test1.cmx ../ppl_ocaml.cmxa
-	$(OCAMLOPT_ENV) ocamlopt -o $@ \
+	$(OCAMLOPT_ENV) $(OCAMLOPT) -o $@ \
 		-cc "$(CXX)" $(OCAMLOPT_COMPILE_FLAGS) \
 		$(BUILT_PPL_FLAGS) $(BUILT_PWL_FLAGS) $(OCAMLOPT_LINK_FLAGS) \
 		ppl_ocaml.cmxa $<
@@ -150,14 +150,14 @@ ppl_ocaml_generated_test.ml: $(interface_generator_dependencies)
 
 ppl_ocaml_generated_test$(EXEEXT): \
 ppl_ocaml_generated_test.cmo ../ppl_ocaml.cma
-	$(OCAMLC_ENV) ocamlc -o $@ \
+	$(OCAMLC_ENV) $(OCAMLC) -o $@ \
 		-cc "$(CXX)" $(OCAMLC_COMPILE_FLAGS) \
 		$(BUILT_PPL_FLAGS) $(BUILT_PWL_FLAGS) $(OCAMLC_LINK_FLAGS) \
 		ppl_ocaml.cma $<
 
 ppl_ocaml_generated_test_opt$(EXEEXT): \
 ppl_ocaml_generated_test.cmx ../ppl_ocaml.cmxa
-	$(OCAMLOPT_ENV) ocamlopt -o $@ \
+	$(OCAMLOPT_ENV) $(OCAMLOPT) -o $@ \
 		-cc "$(CXX)" $(OCAMLOPT_COMPILE_FLAGS) \
 		$(BUILT_PPL_FLAGS) $(BUILT_PWL_FLAGS) $(OCAMLOPT_LINK_FLAGS) \
 		ppl_ocaml.cmxa $<




More information about the PPL-devel mailing list