Change the order the various tools are called in to match that of
authorJames Henstridge <james@daa.com.au>
Thu, 13 May 2004 00:51:37 +0000 (00:51 +0000)
committerJames Henstridge <jamesh@src.gnome.org>
Thu, 13 May 2004 00:51:37 +0000 (00:51 +0000)
2004-05-13  James Henstridge  <james@daa.com.au>

    * autogen.sh: Change the order the various tools are called in to
    match that of autoconf's autoupdate tool.  See bug 138584.

svn path=/trunk/; revision=3439

macros2/ChangeLog
macros2/autogen.sh

index 4cdd4bb..21681d9 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-13  James Henstridge  <james@daa.com.au>
+
+       * autogen.sh: Change the order the various tools are called in to
+       match that of autoconf's autoupdate tool.  See bug 138584.
+
 2004-01-31  Malcolm Tredinnick <malcolm@commsecure.com.au>
 
        * autogen.sh: Use automake-1.8 if available. Patch from
index c9c6f85..1f3414e 100644 (file)
@@ -334,18 +334,16 @@ for configure_ac in $configure_files; do
        printbold "Processing $configure_ac"
        cd $dirname
 
-       aclocalinclude="$ACLOCAL_FLAGS"
-       printbold "Running $ACLOCAL..."
-       $ACLOCAL $aclocalinclude || exit 1
-
-       if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
-           printerr "*** obsolete gnome macros were used in $configure_ac"
-       fi
+        # Note that the order these tools are called should match what
+        # autoconf's "autoupdate" package does.  See bug 138584 for
+        # details.
 
+        # programs that might install new macros get run before aclocal
        if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null; then
            printbold "Running $LIBTOOLIZE..."
            $LIBTOOLIZE --force || exit 1
        fi
+
        if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
            printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
            echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
@@ -358,31 +356,45 @@ for configure_ac in $configure_files; do
                echo "no" | $GETTEXTIZE --force --copy || exit 1
           fi
        fi
+
+       if grep "^AC_PROG_INTLTOOL" $basename >/dev/null; then
+           printbold "Running $INTLTOOLIZE..."
+           $INTLTOOLIZE --force --automake || exit 1
+       fi
        if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
            printbold "Running $GTKDOCIZE..."
            $GTKDOCIZE || exit 1
        fi
-       if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
-           printbold "Running $AUTOHEADER..."
-           $AUTOHEADER || exit 1
-       fi
+
        if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
            printbold "Running gnome-doc-common..."
            gnome-doc-common --copy || exit 1
        fi
 
-       printbold "Running $AUTOMAKE..."
-       $AUTOMAKE --gnu --add-missing || exit 1
+        # Now run aclocal to pull in any additional macros needed
+       aclocalinclude="$ACLOCAL_FLAGS"
+       printbold "Running $ACLOCAL..."
+       $ACLOCAL $aclocalinclude || exit 1
 
-       # This must run after automake, since intltoolize wants mkinstalldirs
-       # to be available and that is only linked or copied by automake.
-       if grep "^AC_PROG_INTLTOOL" $basename >/dev/null; then
-           printbold "Running $INTLTOOLIZE..."
-           $INTLTOOLIZE --force --automake || exit 1
+       if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
+           printerr "*** obsolete gnome macros were used in $configure_ac"
        fi
 
+       # Now that all the macros are sorted, run autoconf and autoheader ...
        printbold "Running $AUTOCONF..."
        $AUTOCONF || exit 1
+       if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
+           printbold "Running $AUTOHEADER..."
+           $AUTOHEADER || exit 1
+           # this prevents automake from thinking config.h.in is out of
+           # date, since autoheader doesn't touch the file if it doesn't
+           # change.
+           test -f config.h.in && touch config.h.in
+       fi
+
+       # Finally, run automake to create the makefiles ...
+       printbold "Running $AUTOMAKE..."
+       $AUTOMAKE --gnu --add-missing || exit 1
 
        cd "$topdir"
     fi