Comments on some of our automake-time pre-processing of $(DIST_COMMON) said that it was done in order to "put README first because it then becomes easier to make a Usenet-compliant shar file". But such a format is hardly relevant anymore, and not worth the (albeit small) added complexity.
* automake.in (handle_dist): Don't sort @dist_common. (for_dist_common): Delete this function, is not used anymore. * lib/am/distdir.am (DISTFILES): Remove obsolete comment. * t/distcom4.sh: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- I noticed this while doing some refactoring/tweaking in Automake-NG, and I think this could be applied to mainstream Automake as well. Objections? Otherwise, I'll push this to master by tomorrow. Regards, Stefano automake.in | 22 +--------------------- lib/am/distdir.am | 1 - t/distcom4.sh | 3 --- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/automake.in b/automake.in index 555aadb..72ca956 100644 --- a/automake.in +++ b/automake.in @@ -3696,26 +3696,6 @@ sub user_phony_rule ($) } -# $BOOLEAN -# &for_dist_common ($A, $B) -# ------------------------- -# Subroutine for &handle_dist: sort files to dist. -# -# We put README first because it then becomes easier to make a -# Usenet-compliant shar file (in these, README must be first). -# -# FIXME: do more ordering of files here. -sub for_dist_common -{ - return 0 - if $a eq $b; - return -1 - if $a eq 'README'; - return 1 - if $b eq 'README'; - return $a cmp $b; -} - # handle_dist # ----------- # Handle 'dist' target. @@ -3826,7 +3806,7 @@ sub handle_dist () # Files to distributed. Don't use ->value_as_list_recursive # as it recursively expands '$(dist_pkgdata_DATA)' etc. my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value); - @dist_common = uniq (sort for_dist_common (@dist_common)); + @dist_common = uniq @dist_common; variable_delete 'DIST_COMMON'; define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common); diff --git a/lib/am/distdir.am b/lib/am/distdir.am index e27b650..3a5e1a5 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -14,7 +14,6 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see <http://www.gnu.org/licenses/>. -## DIST_COMMON comes first so that README can be the very first file. DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) if %?TOPDIR_P% diff --git a/t/distcom4.sh b/t/distcom4.sh index dc37fcf..6f9d871 100755 --- a/t/distcom4.sh +++ b/t/distcom4.sh @@ -18,7 +18,6 @@ # This tries to distribute a file from a subdirectory, without # Makefile in that directory. distcom5.test performs the same # test with a Makefile in the directory. -# Also make sure that README appears first in DIST_COMMON. . ./defs || Exit 1 @@ -71,7 +70,5 @@ cat dc.txt # For debugging. test 1 = `grep tests dc.txt | wc -l` grep configure dc.txt -# README must come first. -grep 'DIST_COMMON = README' Makefile.in : -- 1.7.9.5