[Hpctoolkit-commits] r1665 - in externals: . build-utils
krentel at osp5.lbl.gov
krentel at osp5.lbl.gov
Fri Oct 31 09:49:47 PDT 2008
Author: krentel
Date: 2008-10-31 09:49:46 -0700 (Fri, 31 Oct 2008)
New Revision: 1665
Modified:
externals/build-utils/Makefile.inc
externals/build-utils/configure.inc
externals/configure
externals/configure.ac
externals/options.conf.in
Log:
Test for GNU make in configure. This value is used if running a
package script directly (eg, cd libelf && ./configure), but only in
that case. This fixes the case that GNU make is available but not
under the name "gmake".
Modified: externals/build-utils/Makefile.inc
===================================================================
--- externals/build-utils/Makefile.inc 2008-10-30 18:51:05 UTC (rev 1664)
+++ externals/build-utils/Makefile.inc 2008-10-31 16:49:46 UTC (rev 1665)
@@ -54,6 +54,9 @@
FETCH_FTP = ../build-utils/fetch-ftp.sh
+# Pass make to configure scripts.
+export MAKE
+
.PHONY: all prereqs fetch refetch config reconfig build rebuild
.PHONY: install reinstall clean distclean
Modified: externals/build-utils/configure.inc
===================================================================
--- externals/build-utils/configure.inc 2008-10-30 18:51:05 UTC (rev 1664)
+++ externals/build-utils/configure.inc 2008-10-31 16:49:46 UTC (rev 1665)
@@ -47,7 +47,6 @@
INSTALL_COOKIE=.install-done
NOBUILD_COOKIE=.dont-build
OPTIONS_FILE=../options.conf
-MAKE=gmake
ORIG_PKG_DIR=`pwd`
@@ -127,3 +126,10 @@
test -f "$OPTIONS_FILE" || die "must run top-level configure first"
. "$OPTIONS_FILE"
+#
+# MAKE is either exported from Makefile.inc, or else passed from
+# top-level configure via options.conf.
+#
+if test "x$MAKE" = x ; then
+ MAKE="$gnu_make"
+fi
Modified: externals/configure
===================================================================
--- externals/configure 2008-10-30 18:51:05 UTC (rev 1664)
+++ externals/configure 2008-10-31 16:49:46 UTC (rev 1665)
@@ -655,6 +655,7 @@
host
host_vendor
svn_revision
+gnu_make
with_mpi
LIBOBJS
LTLIBOBJS'
@@ -3153,6 +3154,15 @@
version_file="${srcdir}/.svn-revision"
#
+# Default prefix: local subdir with host cpu-os.
+#
+# AC requires this to be absolute path.
+#
+if test "x$prefix" = xNONE ; then
+ prefix="`pwd`/${host_cpu}-${host_os}"
+fi
+
+#
# Append svn revision to PACKAGE_VERSION.
#
# If this directory is an svn sandbox, then use svn info (and store
@@ -3160,6 +3170,9 @@
# Note: svn update changes the revision number, so svn info must take
# precedence over the file.
#
+{ echo "$as_me:$LINENO: checking for svn revision" >&5
+echo $ECHO_N "checking for svn revision... $ECHO_C" >&6; }
+
svn_revision=`svn info $srcdir 2>/dev/null | grep -e '^Revision' | awk '{ print $2 }'`
if test "x$svn_revision" != x ; then
PACKAGE_VERSION="${PACKAGE_VERSION}-r${svn_revision}"
@@ -3170,6 +3183,12 @@
PACKAGE_VERSION="${PACKAGE_VERSION}-r${svn_revision}"
else
svn_revision=0
+fi
+
+{ echo "$as_me:$LINENO: result: $svn_revision" >&5
+echo "${ECHO_T}$svn_revision" >&6; }
+
+if test "$svn_revision" = 0 ; then
{ echo "$as_me:$LINENO: WARNING: unable to find svn revision" >&5
echo "$as_me: WARNING: unable to find svn revision" >&2;}
fi
@@ -3177,14 +3196,34 @@
#
-# Default prefix: local subdir with host cpu-os.
+# Try to find GNU make. Amazingly, AC doesn't have a macro for this.
+# We only use this value when running configure scripts directly.
+# When starting from a make target, MAKE is exported to the scripts.
+# Thus, it's not fatal if we can't find gnu make here, as long as you
+# later run a gnu-compatible make.
#
-# AC requires this to be absolute path.
-#
-if test "x$prefix" = xNONE ; then
- prefix="`pwd`/${host_cpu}-${host_os}"
+{ echo "$as_me:$LINENO: checking for gnu make" >&5
+echo $ECHO_N "checking for gnu make... $ECHO_C" >&6; }
+
+if gmake --version 2>&1 | grep -i gnu >/dev/null 2>&1 ; then
+ gnu_make=gmake
+elif make --version 2>&1 | grep -i gnu >/dev/null 2>&1 ; then
+ gnu_make=make
+else
+ gnu_make=no
fi
+{ echo "$as_me:$LINENO: result: $gnu_make" >&5
+echo "${ECHO_T}$gnu_make" >&6; }
+
+if test "$gnu_make" = no ; then
+ { echo "$as_me:$LINENO: WARNING: unable to find gnu make" >&5
+echo "$as_me: WARNING: unable to find gnu make" >&2;}
+ gnu_make=make
+fi
+
+
+
#
# Specify packages as: --with-pkg=PATH
#
@@ -4680,12 +4719,13 @@
host!$host$ac_delim
host_vendor!$host_vendor$ac_delim
svn_revision!$svn_revision$ac_delim
+gnu_make!$gnu_make$ac_delim
with_mpi!$with_mpi$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: externals/configure.ac
===================================================================
--- externals/configure.ac 2008-10-30 18:51:05 UTC (rev 1664)
+++ externals/configure.ac 2008-10-31 16:49:46 UTC (rev 1665)
@@ -90,6 +90,15 @@
version_file="${srcdir}/.svn-revision"
#
+# Default prefix: local subdir with host cpu-os.
+#
+# AC requires this to be absolute path.
+#
+if test "x$prefix" = xNONE ; then
+ prefix="`pwd`/${host_cpu}-${host_os}"
+fi
+
+#
# Append svn revision to PACKAGE_VERSION.
#
# If this directory is an svn sandbox, then use svn info (and store
@@ -97,6 +106,8 @@
# Note: svn update changes the revision number, so svn info must take
# precedence over the file.
#
+AC_MSG_CHECKING([for svn revision])
+
svn_revision=`svn info $srcdir 2>/dev/null | grep -e '^Revision' | awk '{ print $2 }'`
if test "x$svn_revision" != x ; then
PACKAGE_VERSION="${PACKAGE_VERSION}-r${svn_revision}"
@@ -107,20 +118,42 @@
PACKAGE_VERSION="${PACKAGE_VERSION}-r${svn_revision}"
else
svn_revision=0
+fi
+
+AC_MSG_RESULT([$svn_revision])
+
+if test "$svn_revision" = 0 ; then
AC_MSG_WARN([unable to find svn revision])
fi
AC_SUBST([svn_revision])
#
-# Default prefix: local subdir with host cpu-os.
+# Try to find GNU make. Amazingly, AC doesn't have a macro for this.
+# We only use this value when running configure scripts directly.
+# When starting from a make target, MAKE is exported to the scripts.
+# Thus, it's not fatal if we can't find gnu make here, as long as you
+# later run a gnu-compatible make.
#
-# AC requires this to be absolute path.
-#
-if test "x$prefix" = xNONE ; then
- prefix="`pwd`/${host_cpu}-${host_os}"
+AC_MSG_CHECKING([for gnu make])
+
+if gmake --version 2>&1 | grep -i gnu >/dev/null 2>&1 ; then
+ gnu_make=gmake
+elif make --version 2>&1 | grep -i gnu >/dev/null 2>&1 ; then
+ gnu_make=make
+else
+ gnu_make=no
fi
+AC_MSG_RESULT([$gnu_make])
+
+if test "$gnu_make" = no ; then
+ AC_MSG_WARN([unable to find gnu make])
+ gnu_make=make
+fi
+
+AC_SUBST([gnu_make])
+
#
# Specify packages as: --with-pkg=PATH
#
Modified: externals/options.conf.in
===================================================================
--- externals/options.conf.in 2008-10-30 18:51:05 UTC (rev 1664)
+++ externals/options.conf.in 2008-10-31 16:49:46 UTC (rev 1665)
@@ -9,6 +9,7 @@
CXXFLAGS="@CXXFLAGS@"
prefix="@prefix@"
+gnu_make="@gnu_make@"
build_cpu="@build_cpu@"
build_os="@build_os@"
More information about the Hpctoolkit-commits
mailing list