* Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
authorJim Meyering <jim@meyering.net>
Fri, 14 Jul 2006 14:42:27 +0000 (14:42 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 14 Jul 2006 14:42:27 +0000 (14:42 +0000)
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 [new file with mode: 0644]
ChangeLog
Makefile.am
Makefile.maint
build-aux/ChangeLog
build-aux/vc-list-files [new file with mode: 0755]

diff --git a/.hgignore b/.hgignore
new file mode 100644 (file)
index 0000000..efbf44f
--- /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$
index 2b7097e..5c96c9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-07-14  Jim Meyering  <jim@meyering.net>
 
+       * 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.
index 9c99429..c83267a 100644 (file)
@@ -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 \
index 10170a7..72c0e62 100644 (file)
@@ -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; } || :
 
index fa0f983..1d77f8d 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-14  Jim Meyering  <jim@meyering.net>
+
+       * vc-list-files: New file.
+
 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * 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 (executable)
index 0000000..b5f0e86
--- /dev/null
@@ -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