summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2003-02-24 15:43:00 +0000
committerJames Henstridge <jamesh@src.gnome.org>2003-02-24 15:43:00 +0000
commit436d85680069219f9b867164a526599c3131d873 (patch)
tree0dd36373b5626352e341db9c86c95238ddb99f8e
parentdce92737640e5452d0a86965d0d00899a50b8a5f (diff)
downloadshared-mime-info-436d85680069219f9b867164a526599c3131d873.tar.gz
add function to forbid m4 macros. Forbid gnome-cxx-check.m4, to try and
2003-02-24 James Henstridge <james@daa.com.au> * autogen.sh (forbid_m4macro): add function to forbid m4 macros. Forbid gnome-cxx-check.m4, to try and catch setups where stale macros are left on the system. svn path=/trunk/; revision=2778
-rw-r--r--macros2/ChangeLog6
-rw-r--r--macros2/autogen.sh71
2 files changed, 55 insertions, 22 deletions
diff --git a/macros2/ChangeLog b/macros2/ChangeLog
index 5ba090ba..ecf5fde9 100644
--- a/macros2/ChangeLog
+++ b/macros2/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-24 James Henstridge <james@daa.com.au>
+
+ * autogen.sh (forbid_m4macro): add function to forbid m4 macros.
+ Forbid gnome-cxx-check.m4, to try and catch setups where stale
+ macros are left on the system.
+
2003-02-21 James Henstridge <james@daa.com.au>
* autogen.sh (version_check): if $variable is set, then assume
diff --git a/macros2/autogen.sh b/macros2/autogen.sh
index 54a3b93b..e590c0fb 100644
--- a/macros2/autogen.sh
+++ b/macros2/autogen.sh
@@ -17,6 +17,7 @@ REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0}
# a list of required m4 macros. Package can set an initial value
REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-}
+FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-}
# if GNOME2_DIR set, modify ACLOCAL_FLAGS ...
if [ -n "$GNOME2_DIR" ]; then
@@ -118,6 +119,13 @@ require_m4macro() {
esac
}
+forbid_m4macro() {
+ case "$FORBIDDEN_M4MACROS" in
+ $1\ * | *\ $1\ * | *\ $1) ;;
+ *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
+ esac
+}
+
# Usage:
# check_m4macros
# Checks that all the requested macro files are in the aclocal macro path
@@ -125,9 +133,6 @@ require_m4macro() {
check_m4macros() {
local macrodirs status macro dir macrofound
- if [ -z "$REQUIRED_M4MACROS" ]; then
- return 0
- fi
# construct list of macro directories
macrodirs="`$ACLOCAL --print-ac-dir`"
set - $ACLOCAL_FLAGS
@@ -140,33 +145,55 @@ check_m4macros() {
done
status=0
- printbold "Checking for required M4 macros..."
- # check that each macro file is in one of the macro dirs
- for macro in $REQUIRED_M4MACROS; do
- macrofound=false
- for dir in $macrodirs; do
- if [ -f "$dir/$macro" ]; then
- macrofound=true
- break
+ if [ -n "$REQUIRED_M4MACROS" ]; then
+ printbold "Checking for required M4 macros..."
+ # check that each macro file is in one of the macro dirs
+ for macro in $REQUIRED_M4MACROS; do
+ macrofound=false
+ for dir in $macrodirs; do
+ if [ -f "$dir/$macro" ]; then
+ macrofound=true
+ break
+ fi
+ done
+ if $macrofound; then
+ :
+ else
+ printerr " $macro not found"
+ status=1
fi
done
- if $macrofound; then
- :
- else
- printerr " $macro not found"
- status=1
- fi
- done
+ fi
+ if [ -n "$FORBIDDEN_M4MACROS" ]; then
+ printbold "Checking for forbidden M4 macros..."
+ # check that each macro file is in one of the macro dirs
+ for macro in $FORBIDDEN_M4MACROS; do
+ macrofound=false
+ for dir in $macrodirs; do
+ if [ -f "$dir/$macro" ]; then
+ macrofound=true
+ break
+ fi
+ done
+ if $macrofound; then
+ printerr " $macro found (should be cleared from macros dir)"
+ status=1
+ fi
+ done
+ fi
if [ "$status" != 0 ]; then
printerr "***Error***: some autoconf macros required to build $PKG_NAME"
- printerr " were not found in your aclocal path. Perhaps you need to"
- printerr " adjust your ACLOCAL_PATH?"
- printerr " $source"
+ printerr " were not found in your aclocal path, or some forbidden"
+ printerr " macros were found. Perhaps you need to adjust your"
+ printerr " ACLOCAL_PATH?"
printerr
fi
return $status
}
+# try to catch the case where the macros2/ directory hasn't been cleared out.
+forbid_m4macro gnome-cxx-check.m4
+
want_libtool=false
want_gettext=false
want_glib_gettext=false
@@ -268,7 +295,7 @@ for configure_ac in $configure_files; do
if test -f $dirname/NO-AUTO-GEN; then
echo skipping $dirname -- flagged as no auto-gen
else
- printbold "Processing $dirname"
+ printbold "Processing $configure_ac"
aclocalinclude="$ACLOCAL_FLAGS"
printbold "Running $ACLOCAL..."