automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] texi: Texinfo sources and CLEANFILES definition should co-exist


From: Stefano Lattarini
Subject: [PATCH] texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
Date: Thu, 3 Jan 2013 14:32:30 +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 <address@hidden>
---
 automake.in | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/automake.in b/automake.in
index 53c4975..e8ba73f 100644
--- a/automake.in
+++ b/automake.in
@@ -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;
 
-- 
1.8.1.rc3.27.g3b73c7d




reply via email to

[Prev in Thread] Current Thread [Next in Thread]