From: Eric Blake Date: Thu, 3 Apr 2008 14:31:37 +0000 (-0600) Subject: Fix VPATH 'make syntax-check'. X-Git-Tag: v2.62~7 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=491715eda76c5dcfc9785c05d638e72f7ce2d087;p=thirdparty%2Fautoconf.git Fix VPATH 'make syntax-check'. * 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 --- diff --git a/ChangeLog b/ChangeLog index 8629f93c..76fa890c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-03 Eric Blake + 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. diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index ef835d66..175c320d 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -461,7 +461,7 @@ \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 `\^^M' is replaced by a single space. +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo @@ -486,7 +486,7 @@ % 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. % @@ -543,12 +543,12 @@ % 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 @@ -566,7 +566,7 @@ \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. diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index 1e158bb5..35046d58 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -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 @@ -20,38 +23,80 @@ # 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 + exit ;; + + --version) + year=`echo "$scriptversion" | sed 's/[^0-9].*//'` + cat < +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: diff --git a/maint.mk b/maint.mk index a4fa134a..4576c9e9 100644 --- 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; } || :