summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-14 14:42:27 +0000
committerJim Meyering <jim@meyering.net>2006-07-14 14:42:27 +0000
commita283f2df1a58d7e83a0b4bffab6bfb7ddac3de1b (patch)
treeff5cd69f164c6dc668ebf53b00ae74ba5a1fbcd1 /build-aux
parent01e7d49a3bb96002659bd862bd6dfa185b49431e (diff)
downloadcoreutils-a283f2df1a58d7e83a0b4bffab6bfb7ddac3de1b.tar.xz
* 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.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/ChangeLog4
-rwxr-xr-xbuild-aux/vc-list-files34
2 files changed, 38 insertions, 0 deletions
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 <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
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