]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Jan 2013 13:05:31 +0000 (14:05 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Jan 2013 13:05:31 +0000 (14:05 +0100)
But they don't now, due to a regression introduced in commit
'v1.13.1-4-gc1a8f56'.  Fix it.  The regression was hitting our
own build system!

* automake.in (handle_texinfo_helper): Only complain if the
'info-in-builddir' is not active and a '.info' file (not any
random file!) is listed in CLEANFILES or DISTCLEANFILES.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index 53c49757d3d07df9205b635ce0f8a08d84ff8494..e8ba73f94302c2a283da3b450d1882d1975e35b8 100644 (file)
@@ -3139,21 +3139,6 @@ 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) . ')$';
 
@@ -3305,8 +3290,27 @@ EOF
       #      was once done when the (now removed) 'cygnus' option was
       #      given.  See automake bug#11034 for more discussion.
       my $insrc = 1;
-      $insrc = 0 if $out_file =~ $user_cleaned_files;
-      $insrc = 0 if option 'info-in-builddir';
+
+      if (option 'info-in-builddir')
+        {
+          $insrc = 0;
+        }
+      elsif ($out_file =~ $user_cleaned_files)
+        {
+          $insrc = 0;
+          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
+        }
 
       $outdir = '$(srcdir)/' . $outdir if $insrc;