tests: protect test libs against multiple inclusion
[automake.git] / syntax-checks.mk
blobbcaf50f34292cc7705ea496fdf54b29cca0366a3
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 = \
35 $(srcdir)/t/ax/test-init.sh \
36 $(srcdir)/t/ax/test-defs.in \
37 $(srcdir)/defs
39 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
41 # Some simple checks, and then ordinary check. These are only really
42 # guaranteed to work on my machine.
43 syntax_check_rules = \
44 $(sc_tests_plain_check_rules) \
45 sc_test_names \
46 sc_diff_automake_in_automake \
47 sc_diff_aclocal_in_automake \
48 sc_perl_syntax \
49 sc_no_brace_variable_expansions \
50 sc_rm_minus_f \
51 sc_no_for_variable_in_macro \
52 sc_mkinstalldirs \
53 sc_pre_normal_post_install_uninstall \
54 sc_perl_no_undef \
55 sc_perl_no_split_regex_space \
56 sc_cd_in_backquotes \
57 sc_cd_relative_dir \
58 sc_perl_at_uscore_in_scalar_context \
59 sc_perl_local \
60 sc_AMDEP_TRUE_in_automake_in \
61 sc_tests_make_without_am_makeflags \
62 sc_tests_obsolete_variables \
63 sc_tests_here_document_format \
64 sc_tests_command_subst \
65 sc_tests_Exit_not_exit \
66 sc_tests_automake_fails \
67 sc_tests_required_after_defs \
68 sc_tests_overriding_macros_on_cmdline \
69 sc_tests_plain_sleep \
70 sc_tests_ls_t \
71 sc_tests_executable \
72 sc_m4_am_plain_egrep_fgrep \
73 sc_tests_no_configure_in \
74 sc_tests_PATH_SEPARATOR \
75 sc_tests_logs_duplicate_prefixes \
76 sc_tests_makefile_variable_order \
77 sc_perl_at_substs \
78 sc_unquoted_DESTDIR \
79 sc_tabs_in_texi \
80 sc_at_in_texi
82 ## Look for test whose names can cause spurious failures when used as
83 ## first argument to AC_INIT (chiefly because they might contain an
84 ## m4/m4sugar builtin or macro name).
85 m4_builtins = \
86 __gnu__ \
87 __unix__ \
88 bpatsubst \
89 bregexp \
90 builtin \
91 changecom \
92 changequote \
93 changeword \
94 debugfile \
95 debugmode \
96 decr \
97 define \
98 defn \
99 divert \
100 divnum \
101 dnl \
102 dumpdef \
103 errprint \
104 esyscmd \
105 eval \
106 format \
107 ifdef \
108 ifelse \
109 include \
110 incr \
111 index \
112 indir \
113 len \
114 m4exit \
115 m4wrap \
116 maketemp \
117 mkstemp \
118 patsubst \
119 popdef \
120 pushdef \
121 regexp \
122 shift \
123 sinclude \
124 substr \
125 symbols \
126 syscmd \
127 sysval \
128 traceoff \
129 traceon \
130 translit \
131 undefine \
132 undivert
133 sc_test_names:
134 @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
135 m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
136 if { \
137 for t in $(xtests); do echo $$t; done \
138 | LC_ALL=C grep -E "$$m4_macro_rx"; \
139 }; then \
140 echo "the names of the tests above can be problematic" 1>&2; \
141 echo "Avoid test names that contain names of m4 macros" 1>&2; \
142 exit 1; \
145 ## These check avoids accidental configure substitutions in the source.
146 ## There are exactly 9 lines that should be modified from automake.in to
147 ## automake, and 10 lines that should be modified from aclocal.in to
148 ## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
149 sc_diff_automake_in_automake:
150 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
151 echo "found too many diffs between automake.in and automake" 1>&2; \
152 diff -c $(srcdir)/automake.in automake; \
153 exit 1; \
155 sc_diff_aclocal_in_aclocal:
156 @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
157 echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
158 diff -c $(srcdir)/aclocal.in aclocal; \
159 exit 1; \
162 ## Syntax check with default Perl (on my machine, Perl 5).
163 sc_perl_syntax:
164 @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
165 @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
167 ## Expect no instances of '${...}'. However, $${...} is ok, since that
168 ## is a shell construct, not a Makefile construct.
169 sc_no_brace_variable_expansions:
170 @if grep -v '^ *#' $(ams) | grep -F '$${' | grep -F -v '$$$$'; then \
171 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
172 exit 1; \
173 else :; fi
175 ## Make sure 'rm' is called with '-f'.
176 sc_rm_minus_f:
177 @if grep -v '^#' $(ams) $(xtests) \
178 | grep -vE '/(spy-rm\.tap|subobj-clean.*-pr10697\.sh):' \
179 | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
180 then \
181 echo "Suspicious 'rm' invocation." 1>&2; \
182 exit 1; \
183 else :; fi
185 ## Never use something like "for file in $(FILES)", this doesn't work
186 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
187 ## commonly used in Java filenames).
188 sc_no_for_variable_in_macro:
189 @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
190 echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
191 exit 1; \
192 else :; fi
194 ## Make sure all invocations of mkinstalldirs are correct.
195 sc_mkinstalldirs:
196 @if grep -n 'mkinstalldirs' $(ams) \
197 | grep -F -v '$$(mkinstalldirs)' \
198 | grep -v '^\./Makefile.am:[0-9][0-9]*: *lib/mkinstalldirs \\$$'; \
199 then \
200 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
201 exit 1; \
202 else :; fi
204 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
205 sc_pre_normal_post_install_uninstall:
206 @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' $(ams) | \
207 grep -v ':##' | grep -v ': @\$$('; then \
208 echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \
209 exit 1; \
210 else :; fi
212 ## We never want to use "undef", only "delete", but for $/.
213 sc_perl_no_undef:
214 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
215 grep -F -v 'undef $$/'; then \
216 echo "Found undef in automake.in; use delete instead" 1>&2; \
217 exit 1; \
220 ## We never want split (/ /,...), only split (' ', ...).
221 sc_perl_no_split_regex_space:
222 @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
223 echo "Found bad split in the lines above." 1>&2; \
224 exit 1; \
227 ## Look for cd within backquotes
228 sc_cd_in_backquotes:
229 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(ams); then \
230 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
231 exit 1; \
234 ## Look for cd to a relative directory (may be influenced by CDPATH).
235 ## Skip some known directories that are OK.
236 sc_cd_relative_dir:
237 @if grep -n '^[^#]*cd ' $(srcdir)/automake.in $(ams) | \
238 grep -v 'echo.*cd ' | \
239 grep -v 'am__cd =' | \
240 grep -v '^[^#]*cd [./]' | \
241 grep -v '^[^#]*cd \$$(top_builddir)' | \
242 grep -v '^[^#]*cd "\$$\$$am__cwd' | \
243 grep -v '^[^#]*cd \$$(abs' | \
244 grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
245 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
246 exit 1; \
249 ## Using @_ in a scalar context is most probably a programming error.
250 sc_perl_at_uscore_in_scalar_context:
251 @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
252 echo "Using @_ in a scalar context in the lines above." 1>&2; \
253 exit 1; \
256 ## Allow only few variables to be localized in Automake.
257 sc_perl_local:
258 @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
259 grep '^[ \t]*local [^*]'; then \
260 echo "Please avoid 'local'." 1>&2; \
261 exit 1; \
264 ## Don't let AMDEP_TRUE substitution appear in automake.in.
265 sc_AMDEP_TRUE_in_automake_in:
266 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
267 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
268 exit 1; \
271 ## Recursive make invocations should always pass $(AM_MAKEFLAGS)
272 ## to $(MAKE), for portability to non-GNU make.
273 sc_tests_make_without_am_makeflags:
274 @if grep '^[^#].*(MAKE) ' $(ams) $(srcdir)/automake.in \
275 | grep -v 'AM_MAKEFLAGS' \
276 | grep -v '/am/header-vars\.am:.*am--echo.*| $$(MAKE) -f *-'; \
277 then \
278 echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
279 exit 1; \
282 ## Look out for some obsolete variables.
283 sc_tests_obsolete_variables:
284 @vars=" \
285 using_tap \
286 test_prefer_config_shell \
287 original_AUTOMAKE \
288 original_ACLOCAL \
289 parallel_tests \
290 am_parallel_tests \
291 "; \
292 seen=""; \
293 for v in $$vars; do \
294 if grep -E "\b$$v\b" $(xtests) $(xdefs); then \
295 seen="$$seen $$v"; \
296 fi; \
297 done; \
298 if test -n "$$seen"; then \
299 for v in $$seen; do \
300 case $$v in \
301 parallel_tests|am_parallel_tests) v2=am_serial_tests;; \
302 *) v2=am_$$v;; \
303 esac; \
304 echo "Variable '$$v' is obsolete, use '$$v2' instead." 1>&2; \
305 done; \
306 exit 1; \
307 else :; fi
309 ## Tests should never call some programs directly, but only through the
310 ## corresponding variable (e.g., '$MAKE', not 'make'). This will allow
311 ## the programs to be overridden at configure time (for less brittleness)
312 ## or by the user at make time (to allow better testsuite coverage).
313 sc_tests_plain_check_rules = \
314 sc_tests_plain_egrep \
315 sc_tests_plain_fgrep \
316 sc_tests_plain_make \
317 sc_tests_plain_perl \
318 sc_tests_plain_automake \
319 sc_tests_plain_aclocal \
320 sc_tests_plain_autoconf \
321 sc_tests_plain_autoupdate \
322 sc_tests_plain_autom4te \
323 sc_tests_plain_autoheader \
324 sc_tests_plain_autoreconf
326 toupper = $(shell echo $(1) | LC_ALL=C tr '[a-z]' '[A-Z]')
328 $(sc_tests_plain_check_rules): sc_tests_plain_% :
329 @# The leading ':' in the grep below is what is printed by the
330 @# preceding 'grep -v' after the file name.
331 @# It works here as a poor man's substitute for beginning-of-line
332 @# marker.
333 @if grep -v '^[ ]*#' $(xtests) \
334 | $(EGREP) '(:|\bif|\bnot|[;!{\|\(]|&&|\|\|)[ ]*?$*\b'; \
335 then \
336 echo 'Do not run "$*" in the above tests.' \
337 'Use "$$$(call toupper,$*)" instead.' 1>&2; \
338 exit 1; \
341 ## Tests should only use END and EOF for here documents
342 ## (so that the next test is effective).
343 sc_tests_here_document_format:
344 @if grep '<<' $(xtests) | grep -Ev '\b(END|EOF)\b|\bcout <<'; then \
345 echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
346 exit 1; \
349 ## Our test case should use the $(...) POSIX form for command substitution,
350 ## rather than the older `...` form.
351 ## The point of ignoring text on here-documents is that we want to exempt
352 ## Makefile.am rules, configure.ac code and helper shell script created and
353 ## used by out shell scripts, because Autoconf (as of version 2.69) does not
354 ## yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell.
355 sc_tests_command_subst:
356 @found=false; \
357 scan () { \
358 sed -n -e '/^#/d' \
359 -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
360 -e 's/\\`/\\{backtick}/' \
361 -e "s/[^\\]'\([^']*\`[^']*\)*'/'{quoted-text}'/g" \
362 -e '/`/p' $$*; \
363 }; \
364 for file in $(xtests); do \
365 res=`scan $$file`; \
366 if test -n "$$res"; then \
367 echo "$$file:$$res"; \
368 found=true; \
369 fi; \
370 done; \
371 if $$found; then \
372 echo 'Use $$(...), not `...`, for command substitutions.' >&2; \
373 exit 1; \
376 ## Tests should no more call 'Exit', just 'exit'. That's because we
377 ## now have in place a better workaround to ensure the exit status is
378 ## transported correctly across the exit trap.
379 sc_tests_Exit_not_exit:
380 @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
381 echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
382 exit 1; \
385 ## Use AUTOMAKE_fails when appropriate
386 sc_tests_automake_fails:
387 @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
388 echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
389 exit 1; \
392 ## Setting 'required' after sourcing './defs' is a bug.
393 sc_tests_required_after_defs:
394 @for file in $(xtests); do \
395 if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
396 echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
397 exit 1; \
398 fi; \
399 done
401 ## Overriding a Makefile macro on the command line is not portable when
402 ## recursive targets are used. Better use an envvar. SHELL is an
403 ## exception, POSIX says it can't come from the environment. V, DESTDIR,
404 ## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
405 ## as package authors are urged not to initialize them anywhere.
406 ## Finally, 'exp' is used by some ad-hoc checks, where we ensure it's
407 ## ok to override it from the command line.
408 sc_tests_overriding_macros_on_cmdline:
409 @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(xtests); then \
410 echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
411 echo ' in the above lines, it is more portable.' 1>&2; \
412 exit 1; \
414 # The first s/// tries to account for usages like "$MAKE || st=$?".
415 # 'DISTCHECK_CONFIGURE_FLAGS' and 'exp' are allowed to contain whitespace in
416 # their definitions, hence the more complex last three substitutions below.
417 # Also, the 'make-dryrun.sh' is whitelisted, since there we need to
418 # override variables from the command line in order to cover the expected
419 # code paths.
420 @tests=`for t in $(xtests); do \
421 case $$t in */make-dryrun.sh);; *) echo $$t;; esac; \
422 done`; \
423 if sed -e 's/ || .*//' -e 's/ && .*//' \
424 -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
425 -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
426 -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
427 -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
428 -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
429 -e "s/ exp='[^']*'/ /" \
430 -e 's/ exp="[^"]*"/ /' \
431 -e 's/ exp=[^ ]/ /' \
432 $$tests | grep '\$$MAKE .*='; then \
433 echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
434 echo 'it is more portable.' 1>&2; \
435 exit 1; \
437 @if grep 'SHELL=.*\$$MAKE' $(xtests); then \
438 echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
439 echo 'the above lines.' 1>&2; \
440 exit 1; \
443 ## Prefer use of our 'is_newest' auxiliary script over the more hacky
444 ## idiom "test $(ls -1t new old | sed 1q) = new", which is both more
445 ## cumbersome and more fragile.
446 sc_tests_ls_t:
447 @if LC_ALL=C grep -E '\bls(\s+-[a-zA-Z0-9]+)*\s+-[a-zA-Z0-9]*t' \
448 $(xtests); then \
449 echo "Use 'is_newest' rather than hacks based on 'ls -t'" 1>&2; \
450 exit 1; \
453 ## Test scripts must be executable.
454 sc_tests_executable:
455 @st=0; \
456 for f in $(xtests); do \
457 case $$f in \
458 t/ax/*|./t/ax/*|$(srcdir)/t/ax/*);; \
459 *) test -x $$f || { echo "$$f: not executable" >&2; st=1; }; \
460 esac; \
461 done; \
462 test $$st -eq 0 || echo '$@: some test scripts are not executable' >&2; \
463 exit $$st;
466 ## Never use 'sleep 1' to create files with different timestamps.
467 ## Use '$sleep' instead. Some filesystems (e.g., Windows) have only
468 ## a 2sec resolution.
469 sc_tests_plain_sleep:
470 @if grep -E '\bsleep +[12345]\b' $(xtests); then \
471 echo 'Do not use "sleep x" in the above tests. Use "$$sleep" instead.' 1>&2; \
472 exit 1; \
475 ## fgrep and egrep are not required by POSIX.
476 sc_m4_am_plain_egrep_fgrep:
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,' \
479 'they are not portable.' 1>&2; \
480 exit 1; \
483 ## Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
484 ## for configure input files in our testsuite. The latter has been
485 ## deprecated for several years (at least since autoconf 2.50).
486 sc_tests_no_configure_in:
487 @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs) \
488 | grep -Ev '/backcompat.*\.(sh|tap):' \
489 | grep -Ev '/autodist-configure-no-subdir\.sh:' \
490 | grep -Ev '/(configure|help)\.sh:' \
491 | grep .; \
492 then \
493 echo "Use 'configure.ac', not 'configure.in', as the name" >&2; \
494 echo "for configure input files in the test cases above." >&2; \
495 exit 1; \
498 ## Rule to ensure that the testsuite has been run before. We don't depend
499 ## on 'check' here, because that would be very wasteful in the common case.
500 ## We could run "make check RECHECK_LOGS=" and avoid toplevel races with
501 ## AM_RECURSIVE_TARGETS. Suggest keeping test directories around for
502 ## greppability of the Makefile.in files.
503 sc_ensure_testsuite_has_run:
504 @if test ! -f '$(TEST_SUITE_LOG)'; then \
505 echo 'Run "env keep_testdirs=yes make check" before' \
506 'running "make maintainer-check"' >&2; \
507 exit 1; \
509 .PHONY: sc_ensure_testsuite_has_run
511 ## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
512 ## This test actually depends on the testsuite having been run before.
513 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
514 @if grep -E '(warning|error):.*(warning|error):' t/*.log; then \
515 echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
516 exit 1; \
519 ## Ensure variables are listed before rules in Makefile.in files we generate.
520 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
521 @st=0; \
522 for file in `find t -name Makefile.in -print`; do \
523 latevars=`sed -n \
524 -e :x -e 's/#.*//' \
525 -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
526 -e '# Literal TAB.' \
527 -e '1,/^ /d' \
528 -e '# Allow @ so we match conditionals.' \
529 -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
530 if test -n "$$latevars"; then \
531 echo "Variables are expanded too late in $$file:" >&2; \
532 echo "$$latevars" | sed 's/^/ /' >&2; \
533 st=1; \
534 fi; \
535 done; \
536 test $$st -eq 0 || { \
537 echo 'Ensure variables are expanded before rules' >&2; \
538 exit 1; \
541 ## Using ':' as a PATH separator is not portable.
542 sc_tests_PATH_SEPARATOR:
543 @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
544 echo "Use '\$$PATH_SEPARATOR', not ':', in PATH definitions" \
545 "above." 1>&2; \
546 exit 1; \
549 ## Try to make sure all @...@ substitutions are covered by our
550 ## substitution rule.
551 sc_perl_at_substs:
552 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
553 echo "Unresolved @...@ substitution in aclocal" 1>&2; \
554 exit 1; \
556 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
557 echo "Unresolved @...@ substitution in automake" 1>&2; \
558 exit 1; \
561 sc_unquoted_DESTDIR:
562 @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(ams); then \
563 echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
564 exit 1; \
567 sc_tabs_in_texi:
568 @if grep ' ' $(srcdir)/doc/automake.texi; then \
569 echo 'Do not use tabs in the manual.' 1>&2; \
570 exit 1; \
573 sc_at_in_texi:
574 @if grep -E '([^@]|^)@([ ][^@]|$$)' $(srcdir)/doc/automake.texi; \
575 then \
576 echo 'Unescaped @.' 1>&2; \
577 exit 1; \
580 $(syntax_check_rules): automake aclocal
581 maintainer-check: $(syntax_check_rules)
582 .PHONY: maintainer-check $(syntax_check_rules)
584 ## Check that the list of tests given in the Makefile is equal to the
585 ## list of all test scripts in the Automake testsuite.
586 maintainer-check: maintainer-check-list-of-tests