From 43541154f37508fd77c849b9fc67a9d98918aebe Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 27 Dec 2004 21:18:49 +0000 Subject: [PATCH] * Makefile.am (maintainer-check): Refine check for @_ in scalar context. Check for correct use of PRE_INSTALL, NORMAL_INSTALL, POST_INSTALL, PRE_UNINSTALL, NORMAL_UNINSTALL, and POST_UNINSTALL. * lib/am/texinfos.am (uninstall-info-am): Hide the invocation of $(PRE_UNINSTALL). --- ChangeLog | 8 ++++++++ Makefile.am | 9 ++++++++- Makefile.in | 8 +++++++- doc/Makefile.in | 2 +- lib/am/texinfos.am | 2 +- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ec87f92..7f441928 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-12-27 Alexandre Duret-Lutz + + * Makefile.am (maintainer-check): Refine check for @_ in scalar + context. Check for correct use of PRE_INSTALL, NORMAL_INSTALL, + POST_INSTALL, PRE_UNINSTALL, NORMAL_UNINSTALL, and POST_UNINSTALL. + * lib/am/texinfos.am (uninstall-info-am): Hide the invocation of + $(PRE_UNINSTALL). + 2004-12-27 Ralf Wildenhues * lib/am/texinfos.am (uninstall-info-am): Show change of diff --git a/Makefile.am b/Makefile.am index e2975a9c..2a4c0771 100644 --- a/Makefile.am +++ b/Makefile.am @@ -143,6 +143,13 @@ maintainer-check: automake aclocal echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \ exit 1; \ else :; fi +## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL + @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \ + $(srcdir)/lib/am/[a-z]*.am | \ + grep -v ':##' | grep -v ': @\$$('; then \ + echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \ + exit 1; \ + else :; fi ## We never want to use "undef", only "delete", but for $/. @if grep -n -w 'undef ' $(srcdir)/automake.in | \ grep -F -v 'undef $$/'; then \ @@ -161,7 +168,7 @@ maintainer-check: automake aclocal exit 1; \ fi ## Using @_ in a scalar context is most probably a programming error. - @if grep -Hn '[^) ] *= *@_' $(srcdir)/automake.in; then \ + @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \ echo "Using @_ in a scalar context in the lines above." 1>&2; \ exit 1; \ fi diff --git a/Makefile.in b/Makefile.in index 6c679484..1ce42be2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -677,6 +677,12 @@ maintainer-check: automake aclocal echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \ exit 1; \ else :; fi + @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \ + $(srcdir)/lib/am/[a-z]*.am | \ + grep -v ':##' | grep -v ': @\$$('; then \ + echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \ + exit 1; \ + else :; fi @if grep -n -w 'undef ' $(srcdir)/automake.in | \ grep -F -v 'undef $$/'; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ @@ -691,7 +697,7 @@ maintainer-check: automake aclocal echo "Consider using $$$$(am__cd) in the line above." 1>&2; \ exit 1; \ fi - @if grep -Hn '[^) ] *= *@_' $(srcdir)/automake.in; then \ + @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \ echo "Using @_ in a scalar context in the lines above." 1>&2; \ exit 1; \ fi diff --git a/doc/Makefile.in b/doc/Makefile.in index be7b85cb..53bc8b05 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -249,7 +249,7 @@ maintainer-clean-vti: $(DVIPS) -o $@ $< uninstall-info-am: - $(PRE_UNINSTALL) + @$(PRE_UNINSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 792c1c12..c0c8a4b0 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -197,7 +197,7 @@ endif ! %?LOCAL-TEXIS% if %?LOCAL-TEXIS% uninstall-info-am: - $(PRE_UNINSTALL) + @$(PRE_UNINSTALL) ## Run two loops here so that we can handle PRE_UNINSTALL and ## NORMAL_UNINSTALL correctly. @if (install-info --version && \ -- 2.43.5