]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix VPATH 'make syntax-check'.
authorEric Blake <ebb9@byu.net>
Thu, 3 Apr 2008 14:31:37 +0000 (08:31 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 3 Apr 2008 15:07:57 +0000 (09:07 -0600)
* maint.mk (VC_LIST, VC_LIST_EXCEPT, sc_changelog)
(sc_prohibit_jm_in_m4, makefile-check): Support VPATH.
* build-aux/vc-list-files: Sync from upstream again.
* build-aux/texinfo.tex: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
build-aux/texinfo.tex
build-aux/vc-list-files
maint.mk

index 8629f93c1462e207a8baed179e7e064d02398966..76fa890c5dd5ed0ba14f275e0c8b14f91fcc045f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-04-03  Eric Blake  <ebb9@byu.net>
 
+       Fix VPATH 'make syntax-check'.
+       * maint.mk (VC_LIST, VC_LIST_EXCEPT, sc_changelog)
+       (sc_prohibit_jm_in_m4, makefile-check): Support VPATH.
+       (author_mark_check): Avoid error message.
+       * build-aux/vc-list-files: Sync from upstream again.
+       * build-aux/texinfo.tex: Likewise.
+
        Sync files from upstream, and pass 'make syntax-check'.
        * config/announce-gen: Move...
        * build-aux/announce-gen: ...here, and sync from gnulib.
index ef835d66bbde8356999f8299ab0832733784c363..175c320de495a2ea4789967a9c36bd5bef55309d 100644 (file)
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
 \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
 
-% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
 %
 % \argremovec might leave us with trailing space, e.g.,
 %    @end itemize  @c foo
 % to get _exactly_ the rest of the line, we had to prevent such situation.
 % We prepended an \empty token at the very beginning and we expand it now,
 % just before passing the control to \argtorun.
-% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
 % either the null string, or it ends with \^^M---thus there is no danger
 % that a pair of braces would be stripped.
 %
 % used to check whether the current environment is the one expected.
 %
 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
-% are not treated as enviroments; they don't open a group.  (The
+% are not treated as environments; they don't open a group.  (The
 % implementation of @end takes care not to call \endgroup in this
 % special case.)
 
 
-% At runtime, environments start with this:
+% At run-time, environments start with this:
 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
 % initialize
 \let\thisenv\empty
   \fi
 }
 
-% Evironment mismatch, #1 expected:
+% Environment mismatch, #1 expected:
 \def\badenverr{%
   \errhelp = \EMsimple
   \errmessage{This command can appear only \inenvironment\temp,
@@ -4447,7 +4447,7 @@ end
 %
 % A straightforward implementation would start like this:
 %      \def\entry#1#2{...
-% But this frozes the catcodes in the argument, and can cause problems to
+% But this freezes the catcodes in the argument, and can cause problems to
 % @code, which sets - active.  This problem was fixed by a kludge---
 % ``-'' was active throughout whole index, but this isn't really right.
 %
@@ -6263,7 +6263,7 @@ end
 \def\Edefun{\endgraf\medbreak}
 
 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remainnig is to define \deffnheader.
+% the only thing remaining is to define \deffnheader.
 %
 \def\makedefun#1{%
   \expandafter\let\csname E#1\endcsname = \Edefun
@@ -7336,7 +7336,7 @@ end
 % In case a @footnote appears in a vbox, save the footnote text and create
 % the real \insert just after the vbox finished.  Otherwise, the insertion
 % would be lost.
-% Similarily, if a @footnote appears inside an alignment, save the footnote
+% Similarly, if a @footnote appears inside an alignment, save the footnote
 % text to a box and make the \insert when a row of the table is finished.
 % And the same can be done for other insert classes.  --kasal, 16nov03.
 
index 1e158bb521e219fa4dfa0327ee40e9c826eba563..35046d58781eab1c520646ea7ca494abec42c91f 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/sh
 # List version-controlled file names.
 
+# Print a version string.
+scriptversion=2008-04-03.14
+
 # Copyright (C) 2006-2008 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # List the specified version-controlled files.
 # With no argument, list them all.  With a single DIRECTORY argument,
 # list the version-controlled files in that directory.
-# 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.
 # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
 
+postprocess=
+case $1 in
+  --help) cat <<EOF
+Usage: $0 [-C SRCDIR] [DIR]
+
+Output a list of version-controlled files in DIR (default .), relative to
+SRCDIR (default .).  SRCDIR must be the top directory of a checkout.
+
+Options:
+  --help     print this help, then exit
+  --version  print version number, then exit
+  -C SRCDIR  change directory to SRCDIR before generating list
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+    exit ;;
+
+  --version)
+    year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
+    cat <<EOF
+vc-list-files $scriptversion
+Copyright (C) $year Free Software Foundation, Inc,
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+    exit ;;
+
+  -C)
+    postprocess="| sed 's|^|$2/|'"
+    cd "$2" || exit 1
+    shift; shift ;;
+esac
+
 dir=
 case $# in
   0) ;;
   1) dir=$1 ;;
   *) echo "$0: too many arguments" 1>&2
-     echo "Usage: $0 [DIR]" 1>&2; exit 1;;
+     echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
 esac
 
 test "x$dir" = x && dir=.
 
 if test -d .git; then
-  exec git ls-files "$dir"
+  eval exec git ls-files '"$dir"' $postprocess
 elif test -d .hg; then
-  exec hg locate "$dir/*"
+  eval exec hg locate '"$dir/*"' $postprocess
 elif test -d CVS; then
   if test -x build-aux/cvsu; then
-    build-aux/cvsu --find --types=AFGM "$dir"
+    eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+  elif (cvsu --help) >/dev/null 2>&1; then
+    eval cvsu --find --types=AFGM '"$dir"' $postprocess
   else
-    awk -F/ '{                         \
+    eval awk -F/ \''{                  \
        if (!$1 && $3 !~ /^-/) {        \
          f=FILENAME;                   \
          sub(/CVS\/Entries/, "", f);   \
          print f $2;                   \
-       }}'                             \
-      $(find ${*-*} -name Entries -print) /dev/null;
+       }}'\''                          \
+      $(find ${*-*} -name Entries -print) /dev/null' $postprocess
   fi
 else
-  echo "$0: Failed to determine type of version control used in "`pwd` 1>&2
+  echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
   exit 1
 fi
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index a4fa134a02474a8f297ae987e4e7947a5bfee4e8..4576c9e994111cb12e4dbfdabf09969167cc8af4 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -31,10 +31,14 @@ GIT = git
 VC = $(GIT)
 VC-tag = git tag -s -m '$(VERSION)'
 
-VC_LIST = build-aux/vc-list-files
+VC_LIST = $(srcdir)/build-aux/vc-list-files -C $(srcdir)
 
 VC_LIST_EXCEPT = \
-  $(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
+  $(VC_LIST) | if test -f $(srcdir)/.x-$@; then        \
+    grep -vEf $(srcdir)/.x-$@;                 \
+  else                                         \
+    grep -v ChangeLog;                         \
+  fi
 
 ifeq ($(origin prev_version_file), undefined)
   prev_version_file = $(srcdir)/.prev-version
@@ -63,7 +67,7 @@ export LC_ALL = C
 
 # Collect the names of rules starting with `sc_'.
 syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
-                        $(srcdir)/$(ME))
+                       $(srcdir)/$(ME))
 .PHONY: $(syntax-check-rules)
 
 local-checks-available = \
@@ -225,7 +229,7 @@ sc_obsolete_symbols:
 
 # Each nonempty line must start with a year number, or a TAB.
 sc_changelog:
-       @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) &&    \
+       @grep -n '^[^12 ]' $$(find $(srcdir) -maxdepth 2 -name ChangeLog) && \
          { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2;  \
            exit 1; } || :
 
@@ -251,7 +255,7 @@ endif
 # Make sure that none are inadvertently reintroduced.
 sc_prohibit_jm_in_m4:
        @grep -nE 'jm_[A-Z]'                                    \
-               $$($(VC_LIST) $(srcdir)/m4 |grep '\.m4$$') &&   \
+               $$($(VC_LIST) m4 |grep '\.m4$$') &&             \
            { echo '$(ME): do not use jm_ in m4 macro names'    \
              1>&2; exit 1; } || :
 
@@ -364,7 +368,7 @@ check-AUTHORS:
 # not @...@ in Makefile.am, now that we can rely on automake
 # to emit a definition for each substituted variable.
 makefile-check:
-       grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
+       grep -nE '@[A-Z_0-9]+@' `find $(srcdir) -name Makefile.am` \
          && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
 
 news-date-check: NEWS
@@ -421,7 +425,9 @@ po-check:
 # the English word `and', the string must be marked with `N_ (...)' so that
 # gettext recognizes it as a string requiring translation.
 author_mark_check:
-       @grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
+       @shopt -s nullglob;                                             \
+       grep -n '^# *define AUTHORS "[^"]* and ' src/*.c /dev/null      \
+         | grep -v ' N_ (' &&                                          \
          { echo '$(ME): enclose the above strings in N_ (...)' 1>&2; \
            exit 1; } || :