]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
texi: deprecate hack about info files in CLEANFILES variables
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 1 Jan 2013 23:33:42 +0000 (00:33 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 2 Jan 2013 12:01:59 +0000 (13:01 +0100)
For quite a long time, Automake has been implementing an undocumented
hack which ensured that '.info' files which appeared to be cleaned (by
e.g. being listed in the CLEANFILES or DISTCLEANFILES variables) were
built in the builddir rather than in the srcdir; this hack was introduced
to ensure better backward-compatibility with packages such as Texinfo,
which did things like:

    info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
    DISTCLEANFILES = texinfo texinfo-* info*.info*
    # Do not create info files for distribution.
    dist-info:
        @:

in order not to distribute .info files.

Now that we have the 'info-in-builddir' option that explicitly causes
generated '.info' files to be placed in the builddir, this hack should
be longer necessary, so we deprecate it with runtime warnings.  It is
scheduled to be removed altogether in Automake 1.14.

* automake.in (handle_texinfo_helper): Raise proper runtime warnings
if the hack is triggered.
* NEWS: Update.
* t/txinfo28.sh: Adjust.
* t/txinfo23.sh: Likewise.
* t/txinfo25.sh: Adjust and extend.
* t/txinfo24.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
automake.in
t/txinfo23.sh
t/txinfo24.sh
t/txinfo25.sh
t/txinfo28.sh

diff --git a/NEWS b/NEWS
index 804805ef9d070266e082677fcc07c08062f891b4..6fd1c7569ff4c625a522474e64b4bb5badac1683 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,26 @@ New in 1.13.2:
     bfd library.  See the extensive discussion about automake bug#11034
     for more details.
 
+  - For quite a long time, Automake has been implementing an undocumented
+    hack which ensured that '.info' files which appeared to be cleaned
+    (by e.g. being listed in the CLEANFILES or DISTCLEANFILES variables)
+    were built in the builddir rather than in the srcdir; this hack was
+    introduced to ensure better backward-compatibility with packages such
+    as Texinfo, which did things like:
+
+        info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+        DISTCLEANFILES = texinfo texinfo-* info*.info*
+        # Do not create info files for distribution.
+        dist-info:
+            @:
+
+    in order not to distribute generated '.info' files.
+
+    Now that we have the 'info-in-builddir' option that explicitly causes
+    generated '.info' files to be placed in the builddir, this hack should
+    be longer necessary, so we deprecate it with runtime warnings.  It will
+    likely be removed altogether in Automake 1.14.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.13.1:
index e56ea65bb1f4b0d9b172bfe0209e1633bdf6ef39..fe7f4594e61eace5b651890757f85c0a379b6f54 100644 (file)
@@ -3140,6 +3140,21 @@ sub handle_texinfo_helper ($)
   my @f = ();
   push @f, $d->value_as_list_recursive (inner_expand => 1) if $d;
   push @f, $c->value_as_list_recursive (inner_expand => 1) if $c;
+  if (@f && !option 'info-in-builddir')
+  {
+    msg 'obsolete', "$am_file.am", <<EOF;
+Oops!
+    It appears this file (or files included by it) are triggering
+    an undocumented, soon-to-be-removed automake hack.
+    Future automake versions will no longer place in the builddir
+    (rather than in the srcdir) the generated '.info' files that
+    appear to be cleaned, by e.g. being listed in CLEANFILES or
+    DISTCLEANFILES.
+    If you want your '.info' files to be placed in the builddir
+    rather than in the srcdir, you have to use the shiny new
+    'info-in-builddir' automake option.
+EOF
+  }
   @f = map { s|[^A-Za-z_0-9*\[\]\-]|\\$&|g; s|\*|[^/]*|g; $_; } @f;
   my $user_cleaned_files = '^(?:' . join ('|', @f) . ')$';
 
index c2b27976d4d254ed8358aa4793703a088091c45e..6c2d9ce3cfa7ef702056537cc2ddb94e1a3e6d1c 100755 (executable)
@@ -53,9 +53,12 @@ I'm included.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_run --add-missing -Wno-error
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
 mkdir build
 cd build
 ../configure
index bfad312a610a2e76f761847b1629e5795adfdc60..9daa82ec746df185aec918948cccfb7382099e21 100755 (executable)
@@ -41,7 +41,7 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-obsolete
 $AUTOCONF
 
 mkdir build
index 369a759430eb1323cbc4b817b3f07fb1b70beabc..aad0cb77169760f82fed9a7d2e39b6e32d7242af 100755 (executable)
@@ -53,9 +53,14 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_fails --add-missing
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
+$AUTOMAKE --add-missing -Wno-obsolete
+
 mkdir build
 cd build
 ../configure
index 171632a6b9e479eb1a362a8e19b0f94673b02060..191a218497a6b0f542c24bb6c935f7abcbb50615 100755 (executable)
@@ -50,7 +50,7 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-error
 $AUTOCONF
 
 mkdir build