From: Stefano Lattarini Date: Thu, 3 May 2012 15:30:56 +0000 (+0200) Subject: dist: don't bother putting README first in $(DIST_COMMON) X-Git-Tag: v1.12b~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1241883c9a783077cf51b6fc2f8b7dd4c2c900f;p=thirdparty%2Fautomake.git dist: don't bother putting README first in $(DIST_COMMON) 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 --- diff --git a/automake.in b/automake.in index 555aadba4..72ca9562a 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 e27b6504d..3a5e1a531 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 . -## 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 dc37fcf4f..6f9d8716c 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 :