summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-02-11 17:40:52 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-02-11 17:40:52 (GMT)
commit3f0a35a4eab869793f5b3882da35a2fe0b683dbd (patch)
tree35c5a256e137aa8e16c120b4a59feab2cbeb2fe0 /configure.in
parent54f376edbb1bce24bff19fb6b7c3d298470356be (diff)
downloadhdf5-3f0a35a4eab869793f5b3882da35a2fe0b683dbd.zip
hdf5-3f0a35a4eab869793f5b3882da35a2fe0b683dbd.tar.gz
hdf5-3f0a35a4eab869793f5b3882da35a2fe0b683dbd.tar.bz2
[svn-r9988] Purpose:
Bug fix Description: pmake (on modi4, for instance) complains about undefined variables if it is run without the -V flag, which turns those errors to warnings. Solution: Added test to configure.in to see if $MAKE will allow Makefiles with undefined variables. If not, sets -V flag in AM_MAKEFLAGS. Ensured that all custom make targets use AM_MAKEFLAGS. Also defined all variables that caused errors in top-level Makefile.am. This means that pmake can be used to build hdf5 *from the top level only*. To run make from a subdirectory, still need to use -V flag (or use make or gmake). Platforms tested: modi4, heping, copper, sleipnir
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9a889a7..296c955 100644
--- a/configure.in
+++ b/configure.in
@@ -560,6 +560,28 @@ done
rm maketest
dnl ----------------------------------------------------------------------
+dnl pmake will throw an error if variables are undefined in a Makefile.
+dnl These errors can be changed to warnings using the -V flag.
+dnl
+AC_SUBST(AM_MAKEFLAGS) AM_MAKEFLAGS=""
+
+AC_MSG_CHECKING([whether make will build with undefined variables])
+
+ cat >maketest <<EOF
+foo: \$(UNDEFINED) \$(UNDEFINED2)
+ @echo \$(UNDEFINED3) works
+EOF
+
+ if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no, setting -V flag])
+ AM_MAKEFLAGS="\-V"
+ fi
+
+rm maketest
+
+dnl ----------------------------------------------------------------------
dnl Production flags? Save the value in $CONFIG_MODE so we have it for
dnl the record.
dnl