From: Stefano Lattarini Date: Wed, 12 Jan 2011 00:27:07 +0000 (+0100) Subject: help: improve text about automatically-distributed files X-Git-Tag: ng-0.5a~159^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1040a74c10a9a011a04ad0d347b61465c5ee194;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2524e06e4..26093d3b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2011-06-23 Stefano Lattarini + + 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 refactor: split 'usage' subroutine in automake diff --git a/automake.in b/automake.in index 77db7f6c5..d0d986e4c 100755 --- a/automake.in +++ b/automake.in @@ -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@>. diff --git a/doc/automake.texi b/doc/automake.texi index 18f65d3e9..14cf7e68c 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -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 diff --git a/tests/autodist-no-duplicate.test b/tests/autodist-no-duplicate.test index 36a9c9a64..81464c0f5 100755 --- a/tests/autodist-no-duplicate.test +++ b/tests/autodist-no-duplicate.test @@ -21,19 +21,32 @@ 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 diff --git a/tests/autodist-subdir.test b/tests/autodist-subdir.test index db694f876..83b293e30 100755 --- a/tests/autodist-subdir.test +++ b/tests/autodist-subdir.test @@ -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` diff --git a/tests/autodist.test b/tests/autodist.test index 70ec0afe5..9294bc32e 100755 --- a/tests/autodist.test +++ b/tests/autodist.test @@ -32,8 +32,6 @@ cat > configure.in <