From 101d8168bcf7c4bb0f09bc315be2b4cc4fdbf2fa Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Thu, 17 Jul 2014 09:03:15 +0000 Subject: [PATCH] Build with gprbuild, since 'gnatmake -P' is being phased out. N715-032 git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@230603 936e1b1b-40f2-da11-902a-00137254ae57 --- Makefile.in | 20 ++++++++++---------- aclocal.m4 | 13 ++++--------- configure | 11 +++-------- docs/using.rst | 2 +- dom/test/conformance/dom_conformance.adb | 2 +- dom/test/conformance/run.sh | 2 +- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2377e2c..4f4732a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,7 +20,7 @@ includedir=@includedir@ # Set a default value (ignored if set in the environment) PROCESSORS?=1 -GNATMAKE=@gnatmake@ -j${PROCESSORS} +GPRBUILD=@gprbuild@ -j${PROCESSORS} # Compiler mode: one of "distrib", "Debug", "Production", "profile", "coverage" MODE=@BUILD_TYPE@ @@ -62,17 +62,17 @@ shared relocatable: ${MAKE} LIBRARY_TYPE=relocatable build_library_type obj: force - ${GNATMAKE} -m -p -Punicode/unicode.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Psax/sax.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Pdom/dom.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Pschema/schema.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Punicode/unicode.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Psax/sax.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Pdom/dom.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Pschema/schema.gpr ${MAKE_ARGS} test: force - ${GNATMAKE} -m -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Psax/test/sax_test.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} - ${GNATMAKE} -m -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Psax/test/sax_test.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} + ${GPRBUILD} -m -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} run_test: force @make --no-print-directory -C unicode/test tests diff --git a/aclocal.m4 b/aclocal.m4 index 6a44ee5..51a404e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -34,7 +34,7 @@ AC_DEFUN(CHECK_BUILD_TYPE, # Check whether GNAT on that target supports building shared # libraries # The following variables is exported by configure: -# @gnatmake@: the gnatmake command to use +# @gprbuild@: the gprbuild command to use # @GNAT_BUILDS_SHARED@: either "yes" or "no" # @DEFAULT_LIBRARY_TYPE@: either "static" or "relocatable" # This is only set to "relocatable" if the user explicitly @@ -63,13 +63,8 @@ Make them the installation default])], fi], [GNAT_BUILDS_SHARED=yes]) - if test "$program_prefix" != NONE; then - gnatmake=${program_prefix}gnatmake - else - gnatmake=gnatmake - fi - - AC_SUBST(gnatmake) + gprbuild=gprbuild + AC_SUBST(gprbuild) if test x$GNAT_BUILDS_SHARED = xyes; then # Create a temporary directory (from "info autoconf") @@ -93,7 +88,7 @@ project Lib is end Lib; EOF - $gnatmake -c -q -P$tmp/lib 2>/dev/null + $gprbuild -c -q -P$tmp/lib 2>/dev/null if test $? = 0 ; then GNAT_BUILDS_SHARED=yes else diff --git a/configure b/configure index 46a5e31..f6ecd8c 100755 --- a/configure +++ b/configure @@ -597,7 +597,7 @@ SO_EXT BUILD_TYPE DEFAULT_LIBRARY_TYPE GNAT_BUILDS_SHARED -gnatmake +gprbuild target_os target_vendor target_cpu @@ -1866,12 +1866,7 @@ else fi - if test "$program_prefix" != NONE; then - gnatmake=${program_prefix}gnatmake - else - gnatmake=gnatmake - fi - + gprbuild=gprbuild if test x$GNAT_BUILDS_SHARED = xyes; then @@ -1896,7 +1891,7 @@ project Lib is end Lib; EOF - $gnatmake -c -q -P$tmp/lib 2>/dev/null + $gprbuild -c -q -P$tmp/lib 2>/dev/null if test $? = 0 ; then GNAT_BUILDS_SHARED=yes else diff --git a/docs/using.rst b/docs/using.rst index 92f1520..54a9353 100644 --- a/docs/using.rst +++ b/docs/using.rst @@ -90,7 +90,7 @@ There are several ways to do it: and you build your application with:: - gnatmake -Pdefault main.adb + gprbuild -Pdefault main.adb Note in the project file the first line, which indicates that your application requires XML/Ada to build. This will automatically set the diff --git a/dom/test/conformance/dom_conformance.adb b/dom/test/conformance/dom_conformance.adb index 38f7a38..8547ef4 100644 --- a/dom/test/conformance/dom_conformance.adb +++ b/dom/test/conformance/dom_conformance.adb @@ -481,7 +481,7 @@ procedure DOM_Conformance is Delete_File ("domtest.o", Success); if System - ("gnatmake -q -Pconformance domtest.adb" & ASCII.NUL) /= 0 + ("gprbuild -q -Pconformance domtest.adb" & ASCII.NUL) /= 0 then Put_Line (Standard_Error, "Could not compile domtest.adb"); diff --git a/dom/test/conformance/run.sh b/dom/test/conformance/run.sh index af88c19..cd0aede 100755 --- a/dom/test/conformance/run.sh +++ b/dom/test/conformance/run.sh @@ -6,7 +6,7 @@ dir="2001/DOM-Test-Suite/tests/level1/core/" test="$1" -gnatmake -q -m -P conformance.gpr dom_conformance +gprbuild -q -m -P conformance.gpr dom_conformance if [ $? != 0 ]; then exit 1 fi