]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
help: improve text about automatically-distributed files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 12 Jan 2011 00:27:07 +0000 (01:27 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 23 Jun 2011 08:49:06 +0000 (10:49 +0200)
This change fixes automake bug#7819.

* automake.in (usage): Distinguish between files that are always
automatically distributed when found, and those which are only
"under certain conditions".
* doc/automake.texi (Basics of Distribution): Update accordingly.
* tests/autodist-subdir.test: Update.
* tests/autodist-no-duplicate.test: Likewise.
* tests/autodist.test: Likewise.
(configure.in): Remove useless call to AM_MAINTAINER_MODE.

ChangeLog
automake.in
doc/automake.texi
tests/autodist-no-duplicate.test
tests/autodist-subdir.test
tests/autodist.test

index 2524e06e4a07d26e09edbe9a65fb0f6da4c81697..26093d3b6bcc190cc48469d72b245d7e6a5e8897 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-06-23   Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       help: improve text about automatically-distributed files
+       This change fixes automake bug#7819.
+       * automake.in (usage): Distinguish between files that are always
+       automatically distributed when found, and those which are only
+       "under certain conditions".
+       * doc/automake.texi (Basics of Distribution): Update accordingly.
+       * tests/autodist-subdir.test: Update.
+       * tests/autodist-no-duplicate.test: Likewise.
+       * tests/autodist.test: Likewise.
+       (configure.in): Remove useless call to AM_MAINTAINER_MODE.
+
 2011-06-23   Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        refactor: split 'usage' subroutine in automake
index 77db7f6c51ac81bcc5f3e50703bfa469f712af91..d0d986e4cfce871c28b8b49ed02772b75cda810c 100755 (executable)
@@ -8400,8 +8400,12 @@ Library files:
 ";
     Automake::ChannelDefs::usage;
 
-    print "\nFiles which are automatically distributed, if found:\n";
-    print_autodist_files (@common_files, @common_sometimes);
+    print "\nFiles automatically distributed if found " .
+          "(always):\n";
+    print_autodist_files @common_files;
+    print "\nFiles automatically distributed if found " .
+          "(under certain conditions):\n";
+    print_autodist_files @common_sometimes;
 
     print '
 Report bugs to <@PACKAGE_BUGREPORT@>.
index 18f65d3e9dcae0efe77ede4745298b57054dcdcc..14cf7e68c028ad7f84f2d90d89a38e8d059bd5d6 100644 (file)
@@ -8293,7 +8293,9 @@ as are all @file{Makefile.am}s and @file{Makefile.in}s.  Automake also
 has a built-in list of commonly used files that are automatically
 included if they are found in the current directory (either physically,
 or as the target of a @file{Makefile.am} rule).  This list is printed by
-@samp{automake --help}.  Also, files that are read by @command{configure}
+@samp{automake --help}@footnote{Note that some of these files are actually
+distributed only when other certain conditions hold}.  Also, files that
+are read by @command{configure}
 (i.e.@: the source files corresponding to the files specified in various
 Autoconf macros such as @code{AC_CONFIG_FILES} and siblings) are
 automatically distributed.  Files included in @file{Makefile.am}s (using
index 36a9c9a64d016886ca9647d4c5e27fa48b25792c..81464c0f53f3b4ae22510507fab5794329e2bae5 100755 (executable)
 
 set -e
 
+re='Files .*automatically distributed.*if found'
+
 # The automake manual states that the list of automatically-distributed
 # files should be given by `automake --help'.
-list=`$AUTOMAKE --help \
-        | sed -n '/^Files .*automatically distributed.*if found/,/^ *$/p' \
+
+list1=`$AUTOMAKE --help \
+        | sed -n "/^$re.*always/,/^ *$/p" \
+        | sed 1d`
+list1=`echo $list1`
+
+list2=`$AUTOMAKE --help \
+        | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
         | sed 1d`
-list=`echo $list`
-test -n "$list"
+list2=`echo $list2`
 
-for f in $list; do echo $f; done | sort > files.lst
-uniq files.lst > files.uniq
+test -n "$list1"
+test -n "$list2"
 
-cat files.lst
-cat files.uniq
-diff files.lst files.uniq
+st=0
+for i in 1 2; do
+  eval list=\${list$i}
+  for f in $list; do echo $f; done | sort > files$i.lst
+  uniq files$i.lst > files$i.uniq
+  cat files$i.lst
+  cat files$i.uniq
+  diff files$i.lst files$i.uniq || st=1
+done
 
-:
+Exit $st
index db694f876868340e7fea09b3ebf7060bf12fb10e..83b293e306c54052a6242e15b2a6997e2c79f9d0 100755 (executable)
@@ -39,33 +39,8 @@ $AUTOCONF
 # The automake manual states that the list of automatically-distributed
 # files should be given by `automake --help'.
 list=`$AUTOMAKE --help \
-        | sed -n '/^Files .*automatically distributed.*if found/,/^ *$/p' \
+        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
         | sed 1d`
-list=`for f in $list; do
-        case $f in
-          configure|configure.in|configure.ac)
-            # See test 'autodist-configure-no-subdir.test'.
-            ;;
-          aclocal.m4)
-            # This file should be distributed only when it is a real
-            # dependency for configure.  Anyway, not a check to be
-            # performed in this test.
-            ;;
-          acconfig.h)
-            # Works only when it really exists, not when it is a
-            # target in Makefile.am.
-            ;;
-          stamp-vti)
-            # Works only when using info_TEXINFOS and version.texi.
-            ;;
-          config.h.bot|config.h.top)
-            # Works only when the AC_CONFIG_HADERS macro is used.
-            ;;
-          *)
-            echo $f
-            ;;
-        esac
-      done`
 # Normalize whitespace, just in case.
 list=`echo $list`
 
index 70ec0afe58d52547a477afc2b8bfafdba998b170..9294bc32e9bc8043a545b161edd4f7eb10d1f123 100755 (executable)
@@ -32,8 +32,6 @@ cat > configure.in <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
-## Will avoid useless regeneration of aclocal.m4, configure, etc.
-AM_MAINTAINER_MODE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -44,33 +42,8 @@ $AUTOCONF
 # The automake manual states that the list of automatically-distributed
 # files should be given by `automake --help'.
 list=`$AUTOMAKE --help \
-        | sed -n '/^Files .*automatically distributed.*if found/,/^ *$/p' \
+        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
         | sed 1d`
-list=`for f in $list; do
-        case $f in
-          configure|configure.in|configure.ac)
-            # See test 'autodist-configure-no-subdir.test'.
-            ;;
-          aclocal.m4)
-            # This file should be distributed only when it is a real
-            # dependency for configure.  Anyway, not a check to be
-            # performed in this test.
-            ;;
-          acconfig.h)
-            # Works only when it really exists, not when it is a
-            # target in Makefile.am.
-            ;;
-          stamp-vti)
-            # Works only when using info_TEXINFOS and version.texi.
-            ;;
-          config.h.bot|config.h.top)
-            # Works only when the AC_CONFIG_HADERS macro is used.
-            ;;
-          *)
-            echo $f
-            ;;
-        esac
-      done`
 # Normalize whitespace, just in case.
 list=`echo $list`