From a283f2df1a58d7e83a0b4bffab6bfb7ddac3de1b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 14 Jul 2006 14:42:27 +0000 Subject: * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files, rather than open-coding it. Now supports mercurial, too. * .hgignore: New file. * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly all generated files, including ones like configure and po/*.po that are currently version-controlled in cvs. * build-aux/vc-list-files: New file. --- .hgignore | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ ChangeLog | 7 +++ Makefile.am | 1 + Makefile.maint | 16 +----- build-aux/ChangeLog | 4 ++ build-aux/vc-list-files | 34 +++++++++++ 6 files changed, 195 insertions(+), 14 deletions(-) create mode 100644 .hgignore create mode 100755 build-aux/vc-list-files diff --git a/.hgignore b/.hgignore new file mode 100644 index 000000000..efbf44f6c --- /dev/null +++ b/.hgignore @@ -0,0 +1,147 @@ +.*/Makefile$ +.*/Makefile\.in$ +.*/\.deps/ +.*\.1$ +.*\.o$ +.*~$ +^Makefile$ +^Makefile\.in$ +^THANKS-to-translators$ +^aclocal\.m4$ +^autom4te\.cache/ +^config\.h$ +^config\.hin$ +^config\.log$ +^config\.status$ +^configure$ +^doc/constants\.texi$ +^doc/coreutils\.info$ +^doc/stamp-vti$ +^doc/version\.texi$ +^lib/alloca\.h$ +^lib/charset\.alias$ +^lib/getdate\.c$ +^lib/libcoreutils\.a$ +^lib/ref-add\.sed$ +^lib/ref-del\.sed$ +^lib/t-fpending$ +^po/.*\.gmo$ +^po/.*\.po$ +^po/POTFILES$ +^po/stamp-po$ +^po/remove-potcdate.sed$ +^src/\[$ +^src/base64$ +^src/basename$ +^src/cat$ +^src/chgrp$ +^src/chmod$ +^src/chown$ +^src/chroot$ +^src/cksum$ +^src/comm$ +^src/cp$ +^src/csplit$ +^src/cut$ +^src/date$ +^src/dd$ +^src/df$ +^src/dir$ +^src/dircolors$ +^src/dircolors\.h$ +^src/dirname$ +^src/du$ +^src/echo$ +^src/env$ +^src/expand$ +^src/expr$ +^src/factor$ +^src/false$ +^src/fmt$ +^src/fold$ +^src/fs\.h$ +^src/ginstall$ +^src/groups$ +^src/head$ +^src/hostid$ +^src/hostname$ +^src/id$ +^src/join$ +^src/kill$ +^src/link$ +^src/ln$ +^src/localedir\.h$ +^src/logname$ +^src/ls$ +^src/md5sum$ +^src/mkdir$ +^src/mkfifo$ +^src/mknod$ +^src/mv$ +^src/nice$ +^src/nl$ +^src/nohup$ +^src/od$ +^src/paste$ +^src/pathchk$ +^src/pinky$ +^src/pr$ +^src/printenv$ +^src/printf$ +^src/ptx$ +^src/pwd$ +^src/readlink$ +^src/rm$ +^src/rmdir$ +^src/seq$ +^src/setuidgid$ +^src/sha1sum$ +^src/sha224sum$ +^src/sha256sum$ +^src/sha384sum$ +^src/sha512sum$ +^src/shred$ +^src/sleep$ +^src/sort$ +^src/split$ +^src/stat$ +^src/stty$ +^src/su$ +^src/sum$ +^src/sync$ +^src/tac$ +^src/tail$ +^src/tee$ +^src/test$ +^src/touch$ +^src/tr$ +^src/true$ +^src/tsort$ +^src/tty$ +^src/uname$ +^src/unexpand$ +^src/uniq$ +^src/unlink$ +^src/uptime$ +^src/users$ +^src/vdir$ +^src/wc$ +^src/wheel-size\.h$ +^src/wheel\.h$ +^src/who$ +^src/whoami$ +^src/yes$ +^stamp-h1$ +^tests/.*\.I[12]$ +^tests/.*\.[EIOX]$ +^tests/cut/cut-tests$ +^tests/head/head-tests$ +^tests/join/join-tests$ +^tests/pr/pr-tests$ +^tests/sort/sort-tests$ +^tests/tac/tac-tests$ +^tests/tail/tail-tests$ +^tests/test/test-tests$ +^tests/tr/tr-tests$ +^tests/uniq/uniq-tests$ +^tests/wc/wc-tests$ diff --git a/ChangeLog b/ChangeLog index 2b7097ec3..5c96c9e48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-07-14 Jim Meyering + * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files, + rather than open-coding it. Now supports mercurial, too. + * .hgignore: New file. + * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly + all generated files, including ones like configure and po/*.po + that are currently version-controlled in cvs. + * Makefile.am (EXTRA_DIST): Add a few more .??* files. They've been in CVS, just haven't been distributed before this. Distribute ChangeLog-2005, too. diff --git a/Makefile.am b/Makefile.am index 9c9942917..c83267ac0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = lib src doc man po tests EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \ + .hgignore \ .gitignore \ .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \ .vg-suppressions \ diff --git a/Makefile.maint b/Makefile.maint index 10170a7d6..72c0e626d 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -32,19 +32,7 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)' CVS = cvs # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ -CVS_LIST = sh -c ' \ - if test -x $(srcdir)/build-aux/cvsu; then \ - $(srcdir)/build-aux/cvsu --find --types=AFGM $$*; \ - else \ - awk -F/ '\''{ \ - if (!$$1 && $$3 !~ /^-/) { \ - f=FILENAME; \ - sub(/CVS\/Entries/, "", f); \ - print f $$2; \ - }}'\'' \ - $$(find $${*-*} -name Entries -print) /dev/null; \ - fi \ - ' dummy +CVS_LIST = build-aux/vc-list-files CVS_LIST_EXCEPT = \ $(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi @@ -210,7 +198,7 @@ endif # Make sure that none are inadvertently reintroduced. sc_prohibit_jm_in_m4: @grep -nE 'jm_[A-Z]' \ - $$($(CVS_LIST) $(srcdir)/m4 |grep '\.m4$$') && \ + $$($(CVS_LIST) m4 |grep '\.m4$$') && \ { echo '$(ME): do not use jm_ in m4 macro names' \ 1>&2; exit 1; } || : diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index fa0f983fb..1d77f8d12 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2006-07-14 Jim Meyering + + * vc-list-files: New file. + 2006-07-08 Paul Eggert * config.guess, config.sub, install-sh, texinfo.tex: diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files new file mode 100755 index 000000000..b5f0e86a4 --- /dev/null +++ b/build-aux/vc-list-files @@ -0,0 +1,34 @@ +#!/bin/sh +# List the specified version-controlled files. +# With no argument, list them all. +# This script must be run solely from the top of a $srcdir build directory. + +# If there's an argument, it must be a single, "."-relative directory name, +# with no trailing slashes. In mercurial mode, it's used as part of a +# "grep -v" pattern (prepend "^", append "/"), and in cvs mode, it's simply +# used as an argument to the cvsu script. + +exclude_prefix= +case $# in + 0) ;; + 1) exclude_prefix=$1 ;; + *) echo "$0: too many arguments" 1>&2; exit 1 ;; +esac + +if test -d .hg; then + if test "x$exclude_prefix" = x; then + hg manifest | cut -d ' ' -f 3 + else + hg manifest | cut -d ' ' -f 3 | grep -v "^$exclude_prefix/" + fi +elif test -x build-aux/cvsu; then + build-aux/cvsu --find --types=AFGM $exclude_prefix +else + awk -F/ '{ \ + if (!$1 && $3 !~ /^-/) { \ + f=FILENAME; \ + sub(/CVS\/Entries/, "", f); \ + print f $2; \ + }}' \ + $(find ${*-*} -name Entries -print) /dev/null; +fi -- cgit v1.2.3-70-g09d2