Beta release 1.11b (will become 1.12)
[automake.git] / syntax-checks.mk
blob11b2225cfb7b29bbf7750bda631c719af25207e3
1 # Maintainer checks for Automake. Requires GNU make.
3 # Copyright (C) 2012 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # We also have to take into account VPATH builds (where some generated
19 # tests might be in '$(builddir)' rather than in '$(srcdir)'), TAP-based
20 # tests script (which have a '.tap' extension) and helper scripts used
21 # by other test cases (which have a '.sh' extension).
22 xtests := $(shell \
23 if test $(srcdir) = .; then \
24 dirs=.; \
25 else \
26 dirs='$(srcdir) .'; \
27 fi; \
28 for d in $$dirs; do \
29 for s in tap sh; do \
30 ls $$d/t/*.$$s $$d/t/ax/*.$$s 2>/dev/null; \
31 done; \
32 done | sort)
34 xdefs = $(srcdir)/defs $(srcdir)/defs-static.in
36 ams := $(shell find $(srcdir) -name '*.am')
38 # Some simple checks, and then ordinary check. These are only really
39 # guaranteed to work on my machine.
40 syntax_check_rules = \
41 sc_test_names \
42 sc_diff_automake_in_automake \
43 sc_diff_aclocal_in_automake \
44 sc_perl_syntax \
45 sc_no_brace_variable_expansions \
46 sc_rm_minus_f \
47 sc_no_for_variable_in_macro \
48 sc_mkinstalldirs \
49 sc_pre_normal_post_install_uninstall \
50 sc_perl_no_undef \
51 sc_perl_no_split_regex_space \
52 sc_cd_in_backquotes \
53 sc_cd_relative_dir \
54 sc_perl_at_uscore_in_scalar_context \
55 sc_perl_local \
56 sc_AMDEP_TRUE_in_automake_in \
57 sc_tests_make_without_am_makeflags \
58 sc_tests_obsolete_variables \
59 sc_tests_plain_make \
60 sc_tests_plain_autoconf \
61 sc_tests_plain_autoupdate \
62 sc_tests_plain_automake \
63 sc_tests_plain_autom4te \
64 sc_tests_plain_autoheader \
65 sc_tests_plain_autoreconf \
66 sc_tests_here_document_format \
67 sc_tests_Exit_not_exit \
68 sc_tests_automake_fails \
69 sc_tests_plain_aclocal \
70 sc_tests_plain_perl \
71 sc_tests_required_after_defs \
72 sc_tests_overriding_macros_on_cmdline \
73 sc_tests_plain_sleep \
74 sc_tests_plain_egrep_fgrep \
75 sc_tests_no_configure_in \
76 sc_tests_PATH_SEPARATOR \
77 sc_tests_logs_duplicate_prefixes \
78 sc_tests_makefile_variable_order \
79 sc_mkdir_p \
80 sc_perl_at_substs \
81 sc_unquoted_DESTDIR \
82 sc_tabs_in_texi \
83 sc_at_in_texi
85 $(syntax_check_rules): automake aclocal
86 maintainer-check: $(syntax_check_rules)
87 .PHONY: maintainer-check $(syntax_check_rules)
89 ## Check that the list of tests given in the Makefile is equal to the
90 ## list of all test scripts in the Automake testsuite.
91 maintainer-check: maintainer-check-list-of-tests
93 ## Look for test whose names can cause spurious failures when used as
94 ## first argument to AC_INIT (chiefly because they might contain an
95 ## m4/m4sugar builtin or macro name).
96 m4_builtins = \
97 __gnu__ \
98 __unix__ \
99 bpatsubst \
100 bregexp \
101 builtin \
102 changecom \
103 changequote \
104 changeword \
105 debugfile \
106 debugmode \
107 decr \
108 define \
109 defn \
110 divert \
111 divnum \
112 dnl \
113 dumpdef \
114 errprint \
115 esyscmd \
116 eval \
117 format \
118 ifdef \
119 ifelse \
120 include \
121 incr \
122 index \
123 indir \
124 len \
125 m4exit \
126 m4wrap \
127 maketemp \
128 mkstemp \
129 patsubst \
130 popdef \
131 pushdef \
132 regexp \
133 shift \
134 sinclude \
135 substr \
136 symbols \
137 syscmd \
138 sysval \
139 traceoff \
140 traceon \
141 translit \
142 undefine \
143 undivert
144 sc_test_names:
145 @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
146 m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
147 if { \
148 for t in $(xtests); do echo $$t; done \
149 | LC_ALL=C grep -E "$$m4_macro_rx"; \
150 }; then \
151 echo "the names of the tests above can be problematic" 1>&2; \
152 echo "Avoid test names that contain names of m4 macros" 1>&2; \
153 exit 1; \
156 ## These check avoids accidental configure substitutions in the source.
157 ## There are exactly 9 lines that should be modified from automake.in to
158 ## automake, and 10 lines that should be modified from aclocal.in to
159 ## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
160 sc_diff_automake_in_automake:
161 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
162 echo "found too many diffs between automake.in and automake" 1>&2; \
163 diff -c $(srcdir)/automake.in automake; \
164 exit 1; \
166 sc_diff_aclocal_in_aclocal:
167 @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
168 echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
169 diff -c $(srcdir)/aclocal.in aclocal; \
170 exit 1; \
173 ## Syntax check with default Perl (on my machine, Perl 5).
174 sc_perl_syntax:
175 @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
176 @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
178 ## expect no instances of '${...}'. However, $${...} is ok, since that
179 ## is a shell construct, not a Makefile construct.
180 sc_no_brace_variable_expansions:
181 @if grep -F '$${' $(ams) | grep -F -v '$$$$'; then \
182 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
183 exit 1; \
184 else :; fi
186 ## Make sure 'rm' is called with '-f'.
187 sc_rm_minus_f:
188 @if grep -v '^#' $(ams) $(xtests) \
189 | grep -v '/spy-rm\.tap:' \
190 | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
191 then \
192 echo "Suspicious 'rm' invocation." 1>&2; \
193 exit 1; \
194 else :; fi
196 ## Never use something like "for file in $(FILES)", this doesn't work
197 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
198 ## commonly used in Java filenames).
199 sc_no_for_variable_in_macro:
200 @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
201 echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
202 exit 1; \
203 else :; fi
205 ## Make sure all invocations of mkinstalldirs are correct.
206 sc_mkinstalldirs:
207 @if grep -n 'mkinstalldirs' $(ams) \
208 | grep -F -v '$$(mkinstalldirs)' \
209 | grep -v '^\./lib/Makefile.am:[0-9][0-9]*: *mkinstalldirs \\$$'; \
210 then \
211 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
212 exit 1; \
213 else :; fi
215 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
216 sc_pre_normal_post_install_uninstall:
217 @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' $(ams) | \
218 grep -v ':##' | grep -v ': @\$$('; then \
219 echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \
220 exit 1; \
221 else :; fi
223 ## We never want to use "undef", only "delete", but for $/.
224 sc_perl_no_undef:
225 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
226 grep -F -v 'undef $$/'; then \
227 echo "Found undef in automake.in; use delete instead" 1>&2; \
228 exit 1; \
231 ## We never want split (/ /,...), only split (' ', ...).
232 sc_perl_no_split_regex_space:
233 @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
234 echo "Found bad split in the lines above." 1>&2; \
235 exit 1; \
238 ## Look for cd within backquotes
239 sc_cd_in_backquotes:
240 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(ams); then \
241 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
242 exit 1; \
245 ## Look for cd to a relative directory (may be influenced by CDPATH).
246 ## Skip some known directories that are OK.
247 sc_cd_relative_dir:
248 @if grep -n '^[^#]*cd ' $(srcdir)/automake.in $(ams) | \
249 grep -v 'echo.*cd ' | \
250 grep -v 'am__cd =' | \
251 grep -v '^[^#]*cd [./]' | \
252 grep -v '^[^#]*cd \$$(top_builddir)' | \
253 grep -v '^[^#]*cd "\$$\$$am__cwd' | \
254 grep -v '^[^#]*cd \$$(abs' | \
255 grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
256 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
257 exit 1; \
260 ## Using @_ in a scalar context is most probably a programming error.
261 sc_perl_at_uscore_in_scalar_context:
262 @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
263 echo "Using @_ in a scalar context in the lines above." 1>&2; \
264 exit 1; \
267 ## Allow only few variables to be localized in Automake.
268 sc_perl_local:
269 @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
270 grep '^[ \t]*local [^*]'; then \
271 echo "Please avoid 'local'." 1>&2; \
272 exit 1; \
275 ## Don't let AMDEP_TRUE substitution appear in automake.in.
276 sc_AMDEP_TRUE_in_automake_in:
277 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
278 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
279 exit 1; \
282 ## Recursive make invocations should always pass $(AM_MAKEFLAGS)
283 ## to $(MAKE), for portability to non-GNU make.
284 sc_tests_make_without_am_makeflags:
285 @if grep '^[^#].*(MAKE) ' $(ams) $(srcdir)/automake.in \
286 | grep -v 'AM_MAKEFLAGS' \
287 | grep -v '/am/header-vars\.am:.*am--echo.*| $$(MAKE) -f *-'; \
288 then \
289 echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
290 exit 1; \
293 ## Look out for some obsolete variables.
294 sc_tests_obsolete_variables:
295 @vars=" \
296 using_tap \
297 parallel_tests \
298 test_prefer_config_shell \
299 original_AUTOMAKE \
300 original_ACLOCAL \
301 "; \
302 seen=""; \
303 for v in $$vars; do \
304 if grep -E "\b$$v\b" $(xtests) $(xdefs); then \
305 seen="$$seen $$v"; \
306 fi; \
307 done; \
308 if test -n "$$seen"; then \
309 for v in $$seen; do \
310 echo "Variable '$$v' is obsolete, use 'am_$$v' instead." 1>&2; \
311 done; \
312 exit 1; \
313 else :; fi
315 ## Tests should never call make directly.
316 sc_tests_plain_make:
317 @if grep -v '^#' $(xtests) | $(EGREP) ':[ ]*make( |$$)'; then \
318 echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
319 exit 1; \
322 ## Tests should never call autoconf directly.
323 sc_tests_plain_autoconf:
324 @if grep -v '^#' $(xtests) | grep ':[ ]*autoconf\>'; then \
325 echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF" instead.' 1>&2; \
326 exit 1; \
329 ## Tests should never call autoupdate directly.
330 sc_tests_plain_autoupdate:
331 @if grep -v '^#' $(xtests) | grep ':[ ]*autoupdate\>'; then \
332 echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE" instead.' 1>&2; \
333 exit 1; \
336 ## Tests should never call automake directly.
337 sc_tests_plain_automake:
338 @if grep -v '^#' $(xtests) | grep -E ':[ ]*automake\>([^:]|$$)'; then \
339 echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE" instead.' 1>&2; \
340 exit 1; \
343 ## Tests should never call autoheader directly.
344 sc_tests_plain_autoheader:
345 @if grep -v '^#' $(xtests) | grep ':[ ]*autoheader\>'; then \
346 echo 'Do not run "autoheader" in the above tests. Use "$$AUTOHEADER" instead.' 1>&2; \
347 exit 1; \
350 ## Tests should never call autoreconf directly.
351 sc_tests_plain_autoreconf:
352 @if grep -v '^#' $(xtests) | grep ':[ ]*autoreconf\>'; then \
353 echo 'Do not run "autoreconf" in the above tests. Use "$$AUTORECONF" instead.' 1>&2; \
354 exit 1; \
357 ## Tests should never call autom4te directly.
358 sc_tests_plain_autom4te:
359 @if grep -v '^#' $(xtests) | grep ':[ ]*autom4te\>'; then \
360 echo 'Do not run "autom4te" in the above tests. Use "$$AUTOM4TE" instead.' 1>&2; \
361 exit 1; \
364 ## Tests should only use END and EOF for here documents
365 ## (so that the next test is effective).
366 sc_tests_here_document_format:
367 @if grep '<<' $(xtests) | grep -Ev '\b(END|EOF)\b|\bstd::cout <<'; then \
368 echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
369 exit 1; \
372 ## Tests should never call exit directly, but use Exit.
373 ## This is so that the exit status is transported correctly across the 0 trap.
374 ## Ignore comments, testsuite self tests, and one perl line in ext2.sh.
375 sc_tests_Exit_not_exit:
376 @found=false; for file in $(xtests); do \
377 case $$file in */self-check-*) continue;; esac; \
378 res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
379 -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
380 if test -n "$$res"; then \
381 echo "$$file:$$res"; \
382 found=true; \
383 fi; \
384 done; \
385 if $$found; then \
386 echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
387 exit 1; \
390 ## Use AUTOMAKE_fails when appropriate
391 sc_tests_automake_fails:
392 @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
393 echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
394 exit 1; \
397 ## Tests should never call aclocal directly.
398 sc_tests_plain_aclocal:
399 @if grep -v '^#' $(xtests) | grep ':[ ]*aclocal\>'; then \
400 echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL" instead.' 1>&2; \
401 exit 1; \
404 ## Tests should never call perl directly.
405 sc_tests_plain_perl:
406 @if grep -v '^#' $(xtests) | grep ':[ ]*perl\>'; then \
407 echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.' 1>&2; \
408 exit 1; \
411 ## Setting 'required' after sourcing './defs' is a bug.
412 sc_tests_required_after_defs:
413 @for file in $(xtests); do \
414 if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
415 echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
416 exit 1; \
417 fi; \
418 done
420 ## Overriding a Makefile macro on the command line is not portable when
421 ## recursive targets are used. Better use an envvar. SHELL is an
422 ## exception, POSIX says it can't come from the environment. V, DESTDIR,
423 ## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
424 ## as package authors are urged not to initialize them anywhere.
425 ## Finally, 'exp' is used by some ad-hoc checks, where we ensure it's
426 ## ok to override it from the command line.
427 sc_tests_overriding_macros_on_cmdline:
428 @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(xtests); then \
429 echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
430 echo ' in the above lines, it is more portable.' 1>&2; \
431 exit 1; \
433 # The first s/// tries to account for usages like "$MAKE || st=$?".
434 # 'DISTCHECK_CONFIGURE_FLAGS' and 'exp' are allowed to contain whitespace in
435 # their definitions, hence the more complex last three substitutions below.
436 # Also, the 'make-dryrun.sh' is whitelisted, since there we need to
437 # override variables from the command line in order to cover the expected
438 # code paths.
439 @tests=`for t in $(xtests); do \
440 case $$t in */make-dryrun.sh);; *) echo $$t;; esac; \
441 done`; \
442 if sed -e 's/ || .*//' -e 's/ && .*//' \
443 -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
444 -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
445 -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
446 -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
447 -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
448 -e "s/ exp='[^']*'/ /" \
449 -e 's/ exp="[^"]*"/ /' \
450 -e 's/ exp=[^ ]/ /' \
451 $$tests | grep '\$$MAKE .*='; then \
452 echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
453 echo 'it is more portable.' 1>&2; \
454 exit 1; \
456 @if grep 'SHELL=.*\$$MAKE' $(xtests); then \
457 echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
458 echo 'the above lines.' 1>&2; \
459 exit 1; \
462 ## Never use 'sleep 1' to create files with different timestamps.
463 ## Use '$sleep' instead. Some filesystems (e.g., Windows) have only
464 ## a 2sec resolution.
465 sc_tests_plain_sleep:
466 @if grep -E '\bsleep +[12345]\b' $(xtests); then \
467 echo 'Do not use "sleep x" in the above tests. Use "$$sleep" instead.' 1>&2; \
468 exit 1; \
471 ## fgrep and egrep are not required by POSIX.
472 sc_tests_plain_egrep_fgrep:
473 @if grep -E '\b[ef]grep\b' $(xtests) ; then \
474 echo 'Do not use egrep or fgrep in test cases. Use $$FGREP or $$EGREP.' 1>&2; \
475 exit 1; \
477 @if grep -E '\b[ef]grep\b' $(ams) $(srcdir)/m4/*.m4; then \
478 echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
479 exit 1; \
482 ## Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
483 ## for configure input files in our testsuite. The latter has been
484 ## deprecated for several years (at least since autoconf 2.50).
485 sc_tests_no_configure_in:
486 @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs) \
487 | grep -Ev '/backcompat.*\.(sh|tap):' \
488 | grep -Ev '/autodist-configure-no-subdir\.sh:' \
489 | grep -Ev '/(configure|help)\.sh:' \
490 | grep .; \
491 then \
492 echo "Use 'configure.ac', not 'configure.in', as the name" >&2; \
493 echo "for configure input files in the test cases above." >&2; \
494 exit 1; \
497 ## Rule to ensure that the testsuite has been run before. We don't depend
498 ## on 'check' here, because that would be very wasteful in the common case.
499 ## We could run "make check RECHECK_LOGS=" and avoid toplevel races with
500 ## AM_RECURSIVE_TARGETS. Suggest keeping test directories around for
501 ## greppability of the Makefile.in files.
502 sc_ensure_testsuite_has_run:
503 @if test ! -f t/test-suite.log; then \
504 echo 'Run "env keep_testdirs=yes make check" before' \
505 'running "make maintainer-check"' >&2; \
506 exit 1; \
508 .PHONY: sc_ensure_testsuite_has_run
510 ## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
511 ## This test actually depends on the testsuite having been run before.
512 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
513 @if grep -E '(warning|error):.*(warning|error):' t/*.log; then \
514 echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
515 exit 1; \
518 ## Ensure variables are listed before rules in Makefile.in files we generate.
519 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
520 @st=0; \
521 for file in `find t -name Makefile.in -print`; do \
522 latevars=`sed -n \
523 -e :x -e 's/#.*//' \
524 -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
525 -e '# Literal TAB.' \
526 -e '1,/^ /d' \
527 -e '# Allow @ so we match conditionals.' \
528 -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
529 if test -n "$$latevars"; then \
530 echo "Variables are expanded too late in $$file:" >&2; \
531 echo "$$latevars" | sed 's/^/ /' >&2; \
532 st=1; \
533 fi; \
534 done; \
535 test $$st -eq 0 || { \
536 echo 'Ensure variables are expanded before rules' >&2; \
537 exit 1; \
540 ## Using ':' as a PATH separator is not portable.
541 sc_tests_PATH_SEPARATOR:
542 @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
543 echo "Use '\$$PATH_SEPARATOR', not ':', in PATH definitions" \
544 "above." 1>&2; \
545 exit 1; \
548 sc_mkdir_p:
549 @if grep 'mkdir_p' $(srcdir)/automake.in $(ams) $(xtests); then \
550 echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
551 exit 1; \
554 ## Try to make sure all @...@ substitutions are covered by our
555 ## substitution rule.
556 sc_perl_at_substs:
557 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
558 echo "Unresolved @...@ substitution in aclocal" 1>&2; \
559 exit 1; \
561 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
562 echo "Unresolved @...@ substitution in automake" 1>&2; \
563 exit 1; \
566 sc_unquoted_DESTDIR:
567 @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(ams); then \
568 echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
569 exit 1; \
572 sc_tabs_in_texi:
573 @if grep ' ' $(srcdir)/doc/automake.texi; then \
574 echo 'Do not use tabs in the manual.' 1>&2; \
575 exit 1; \
578 sc_at_in_texi:
579 @if grep -E '([^@]|^)@([ ][^@]|$$)' $(srcdir)/doc/automake.texi; \
580 then \
581 echo 'Unescaped @.' 1>&2; \
582 exit 1; \