Automatically generate a patched automake if needed, and put instructions in the...
authorRichard Boulton <richard@tartarus.org>
Wed, 30 May 2001 15:16:58 +0000 (15:16 +0000)
committerRichard Boulton <richard@tartarus.org>
Wed, 30 May 2001 15:16:58 +0000 (15:16 +0000)
Original commit message from CVS:
Automatically generate a patched automake if needed, and put instructions
in the README about how to use such a patched automake.

README
autogen.sh

diff --git a/README b/README
index f8c3839..c81194e 100644 (file)
--- a/README
+++ b/README
@@ -13,9 +13,14 @@ autogen.sh to generate the build system files.
 Unfortunately, there is a bug in automake which causes it to use a large
 amount of memory when generating plugins/Makefile.in.  The following patch,
 which you may wish to apply to automake (version 1.4), fixes this problem.
-Alternatively, ensure that you have at least 128Mb of memory on your system,
+It is also fixed in versions of automake 1.4f and later.
+Alternatively, ensure that you have at least 512Mb of memory on your system,
 and be prepared to wait a little while when running automake (or autogen.sh).
 
+The autogen.sh script will automatically detect an unpatched automake and give
+a warning.  It will also generate a patched version of automake in the top
+build directory, which you can use by putting it in a directory in your $PATH
+ahead of the unpatched version of automake.
 
 @@ -2383,8 +2383,8 @@
        # to all possible directories, and use it.  If DIST_SUBDIRS is
@@ -28,7 +33,3 @@ and be prepared to wait a little while when running automake (or autogen.sh).
        {
            $dist_subdir_name = 'DIST_SUBDIRS';
            if (! &variable_defined ('DIST_SUBDIRS'))
-
-
-The automake developers have been notified of this problem, and supplied with
-an equivalent patch against CVS head.
index 33d4e35..06dc6a1 100755 (executable)
@@ -63,7 +63,23 @@ EOF
       echo "Detected automake version 1.4 (or near) without patch."
       echo "Your version of automake needs a patch applied in order to operate correctly."
       echo
+      patchedfile="`pwd`/automake"
+      if test -e $patchedfile; then 
+       PATCHED=0
+      else
+        echo "patching..."
+        patch -R -s -f `which automake` <autogen.patch.tmp -o $patchedfile;
+       chmod +x $patchedfile;
+       PATCHED=1
+      fi
+      echo
       echo "***************************************************************************"
+      if test -e $patchedfile; then 
+       if test "x$PATCHED" == "x1"; then
+         echo "A patched version of automake is available at:"
+         echo "$patchedfile"
+       fi
+      fi
       echo "You should abort the build now and read the README file for an explanation."
       echo "***************************************************************************"
       echo