tests: fix a spurious failure with FreeBSD make
[platform/upstream/automake.git] / maintainer / syntax-checks.mk
1 # Maintainer checks for Automake.  Requires GNU make.
2
3 # Copyright (C) 2012-2013 Free Software Foundation, Inc.
4 #
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.
9 #
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.
14 #
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/>.
17
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/ax/*.$$s $$d/t/*.$$s $$d/contrib/t/*.$$s 2>/dev/null; \
31      done; \
32    done | sort)
33
34 xdefs = \
35   $(srcdir)/t/ax/am-test-lib.sh \
36   $(srcdir)/t/ax/test-lib.sh \
37   $(srcdir)/t/ax/test-defs.in
38
39 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
40
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_diff_automake \
46 sc_diff_aclocal \
47 sc_no_brace_variable_expansions \
48 sc_rm_minus_f \
49 sc_no_for_variable_in_macro \
50 sc_mkinstalldirs \
51 sc_pre_normal_post_install_uninstall \
52 sc_perl_no_undef \
53 sc_perl_no_split_regex_space \
54 sc_cd_in_backquotes \
55 sc_cd_relative_dir \
56 sc_perl_at_uscore_in_scalar_context \
57 sc_perl_local \
58 sc_AMDEP_TRUE_in_automake_in \
59 sc_tests_make_without_am_makeflags \
60 $(sc_obsolete_requirements_rules) \
61 sc_tests_no_source_defs \
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_m4_am_plain_egrep_fgrep \
72 sc_tests_no_configure_in \
73 sc_tests_PATH_SEPARATOR \
74 sc_tests_logs_duplicate_prefixes \
75 sc_tests_makefile_variable_order \
76 sc_perl_at_substs \
77 sc_unquoted_DESTDIR \
78 sc_tabs_in_texi \
79 sc_at_in_texi
80
81 ## These check avoids accidental configure substitutions in the source.
82 ## There are exactly 8 lines that should be modified from automake.in to
83 ## automake, and 9 lines that should be modified from aclocal.in to
84 ## aclocal.
85 automake_diff_no = 8
86 aclocal_diff_no = 9
87 sc_diff_automake sc_diff_aclocal: in=$($*_in)
88 sc_diff_automake sc_diff_aclocal: out=$($*_script)
89 sc_diff_automake sc_diff_aclocal: sc_diff_% :
90         @set +e; \
91         in=$*-in.tmp out=$*-out.tmp diffs=$*-diffs.tmp \
92           && sed '/^#!.*[pP]rototypes/d' $(in) > $$in \
93           && sed '/^# BEGIN.* PROTO/,/^# END.* PROTO/d' $(out) > $$out \
94           && { diff -u $$in $$out > $$diffs; test $$? -eq 1; } \
95           && added=`grep -v '^+++ ' $$diffs | grep -c '^+'` \
96           && removed=`grep -v '^--- ' $$diffs | grep -c '^-'` \
97           && test $$added,$$removed = $($*_diff_no),$($*_diff_no) \
98           || { \
99             echo "Found unexpected diffs between $(in) and $(out)"; \
100             echo "Lines added:   $$added"  ; \
101             echo "Lines removed: $$removed"; \
102             cat $$diffs; \
103             exit 1; \
104           } >&2; \
105         rm -f $$in $$out $$diffs
106
107 ## Expect no instances of '${...}'.  However, $${...} is ok, since that
108 ## is a shell construct, not a Makefile construct.
109 sc_no_brace_variable_expansions:
110         @if grep -v '^ *#' $(ams) | grep -F '$${' | grep -F -v '$$$$'; then \
111           echo "Found too many uses of '\$${' in the lines above." 1>&2; \
112           exit 1; \
113         else :; fi
114
115 ## Make sure 'rm' is called with '-f'.
116 sc_rm_minus_f:
117         @if grep -v '^#' $(ams) $(xtests) \
118            | grep -vE '/(rm-f-probe\.sh|spy-rm\.tap|subobj-clean.*-pr10697\.sh):' \
119            | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
120         then \
121           echo "Suspicious 'rm' invocation." 1>&2; \
122           exit 1; \
123         else :; fi
124
125 ## Never use something like "for file in $(FILES)", this doesn't work
126 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
127 ## commonly used in Java filenames).
128 sc_no_for_variable_in_macro:
129         @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
130           echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
131           exit 1; \
132         else :; fi
133
134 ## Make sure all invocations of mkinstalldirs are correct.
135 sc_mkinstalldirs:
136         @if grep -n 'mkinstalldirs' $(ams) \
137               | grep -F -v '$$(mkinstalldirs)' \
138               | grep -v '^\./Makefile.am:[0-9][0-9]*:  *lib/mkinstalldirs \\$$'; \
139         then \
140           echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
141           exit 1; \
142         else :; fi
143
144 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
145 sc_pre_normal_post_install_uninstall:
146         @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' $(ams) | \
147               grep -v ':##' | grep -v ':        @\$$('; then \
148           echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \
149           exit 1; \
150         else :; fi
151
152 ## We never want to use "undef", only "delete", but for $/.
153 sc_perl_no_undef:
154         @if grep -n -w 'undef ' $(automake_in) | \
155               grep -F -v 'undef $$/'; then \
156           echo "Found 'undef' in the lines above; use 'delete' instead" 1>&2; \
157           exit 1; \
158         fi
159
160 ## We never want split (/ /,...), only split (' ', ...).
161 sc_perl_no_split_regex_space:
162         @if grep -n 'split (/ /' $(automake_in) $(acloca_in); then \
163           echo "Found bad split in the lines above." 1>&2; \
164           exit 1; \
165         fi
166
167 ## Look for cd within backquotes
168 sc_cd_in_backquotes:
169         @if grep -n '^[^#]*` *cd ' $(automake_in) $(ams); then \
170           echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
171           exit 1; \
172         fi
173
174 ## Look for cd to a relative directory (may be influenced by CDPATH).
175 ## Skip some known directories that are OK.
176 sc_cd_relative_dir:
177         @if grep -n '^[^#]*cd ' $(automake_in) $(ams) | \
178               grep -v 'echo.*cd ' | \
179               grep -v 'am__cd =' | \
180               grep -v '^[^#]*cd [./]' | \
181               grep -v '^[^#]*cd \$$(top_builddir)' | \
182               grep -v '^[^#]*cd "\$$\$$am__cwd' | \
183               grep -v '^[^#]*cd \$$(abs' | \
184               grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
185           echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
186           exit 1; \
187         fi
188
189 ## Using @_ in a scalar context is most probably a programming error.
190 sc_perl_at_uscore_in_scalar_context:
191         @if grep -Hn '[^%@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' \
192             $(automake_in) $(aclocal_in); then \
193           echo "Using @_ in a scalar context in the lines above." 1>&2; \
194           exit 1; \
195         fi
196
197 ## Allow only few variables to be localized in automake and aclocal.
198 sc_perl_local:
199         @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' \
200               $(automake_in) $(aclocal_in) | \
201             grep '^[ \t]*local [^*]'; then \
202           echo "Please avoid 'local'." 1>&2; \
203           exit 1; \
204         fi
205
206 ## Don't let AMDEP_TRUE substitution appear in automake.in.
207 sc_AMDEP_TRUE_in_automake_in:
208         @if grep '@AMDEP''_TRUE@' $(automake_in); then \
209           echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
210           exit 1; \
211         fi
212
213 ## Recursive make invocations should always pass $(AM_MAKEFLAGS)
214 ## to $(MAKE), for portability to non-GNU make.
215 sc_tests_make_without_am_makeflags:
216         @if grep '^[^#].*(MAKE) ' $(ams) $(automake_in) \
217             | grep -v 'AM_MAKEFLAGS' \
218             | grep -v '/am/header-vars\.am:.*am--echo.*| $$(MAKE) -f *-'; \
219         then \
220           echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
221           exit 1; \
222         fi
223
224 ## Look out for some obsolete variables.
225 sc_tests_obsolete_variables:
226         @vars=" \
227           using_tap \
228           am_using_tap \
229           test_prefer_config_shell \
230           original_AUTOMAKE \
231           original_ACLOCAL \
232           parallel_tests \
233           am_parallel_tests \
234         "; \
235         seen=""; \
236         for v in $$vars; do \
237           if grep -E "\b$$v\b" $(xtests) $(xdefs); then \
238             seen="$$seen $$v"; \
239           fi; \
240         done; \
241         if test -n "$$seen"; then \
242           for v in $$seen; do \
243             case $$v in \
244               parallel_tests|am_parallel_tests) v2=am_serial_tests;; \
245               *) v2=am_$$v;; \
246             esac; \
247             echo "Variable '$$v' is obsolete, use '$$v2' instead." 1>&2; \
248           done; \
249           exit 1; \
250         else :; fi
251
252 ## Look out for obsolete requirements specified in the test cases.
253 sc_obsolete_requirements_rules = sc_no_texi2dvi-o sc_no_makeinfo-html
254 modern-requirement.texi2dvi-o = texi2dvi
255 modern-requirement.makeinfo-html = makeinfo
256
257 $(sc_obsolete_requirements_rules): sc_no_% :
258         @if grep -E 'required=.*\b$*\b' $(xtests); then \
259           echo "Requirement '$*' is obsolete and shouldn't" \
260                "be used anymore." >&2; \
261           echo "You should use '$(modern-requirement.$*)' instead." >&2; \
262           exit 1; \
263         fi
264
265 ## Tests should never call some programs directly, but only through the
266 ## corresponding variable (e.g., '$MAKE', not 'make').  This will allow
267 ## the programs to be overridden at configure time (for less brittleness)
268 ## or by the user at make time (to allow better testsuite coverage).
269 sc_tests_plain_check_rules = \
270   sc_tests_plain_egrep \
271   sc_tests_plain_fgrep \
272   sc_tests_plain_make \
273   sc_tests_plain_perl \
274   sc_tests_plain_automake \
275   sc_tests_plain_aclocal \
276   sc_tests_plain_autoconf \
277   sc_tests_plain_autoupdate \
278   sc_tests_plain_autom4te \
279   sc_tests_plain_autoheader \
280   sc_tests_plain_autoreconf
281
282 toupper = $(shell echo $(1) | LC_ALL=C tr '[a-z]' '[A-Z]')
283
284 $(sc_tests_plain_check_rules): sc_tests_plain_% :
285         @# The leading ':' in the grep below is what is printed by the
286         @# preceding 'grep -v' after the file name.
287         @# It works here as a poor man's substitute for beginning-of-line
288         @# marker.
289         @if grep -v '^[         ]*#' $(xtests) \
290            | $(EGREP) '(:|\bif|\bnot|[;!{\|\(]|&&|\|\|)[        ]*?$*\b'; \
291          then \
292            echo 'Do not run "$*" in the above tests.' \
293                 'Use "$$$(call toupper,$*)" instead.' 1>&2; \
294            exit 1; \
295         fi
296
297 ## Tests should only use END and EOF for here documents
298 ## (so that the next test is effective).
299 sc_tests_here_document_format:
300         @if grep '<<' $(xtests) | grep -Ev '\b(END|EOF)\b|\bcout <<'; then \
301           echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
302           exit 1; \
303         fi
304
305 ## Our test case should use the $(...) POSIX form for command substitution,
306 ## rather than the older `...` form.
307 ## The point of ignoring text on here-documents is that we want to exempt
308 ## Makefile.am rules, configure.ac code and helper shell script created and
309 ## used by out shell scripts, because Autoconf (as of version 2.69) does not
310 ## yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell.
311 sc_tests_command_subst:
312         @found=false; \
313         scan () { \
314           sed -n -e '/^#/d' \
315                  -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
316                  -e 's/\\`/\\{backtick}/' \
317                  -e "s/[^\\]'\([^']*\`[^']*\)*'/'{quoted-text}'/g" \
318                  -e '/`/p' $$*; \
319         }; \
320         for file in $(xtests); do \
321           res=`scan $$file`; \
322           if test -n "$$res"; then \
323             echo "$$file:$$res"; \
324             found=true; \
325           fi; \
326         done; \
327         if $$found; then \
328           echo 'Use $$(...), not `...`, for command substitutions.' >&2; \
329           exit 1; \
330         fi
331
332 ## Tests should no longer call 'Exit', just 'exit'.  That's because we
333 ## now have in place a better workaround to ensure the exit status is
334 ## transported correctly across the exit trap.
335 sc_tests_exit_not_Exit:
336         @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
337           echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
338           exit 1; \
339         fi
340
341 ## Guard against obsolescent uses of ./defs in tests.  Now,
342 ## 'test-init.sh' should be used instead.
343 sc_tests_no_source_defs:
344         @if grep -E '\. .*defs($$| )' $(xtests); then \
345           echo "Source 'test-init.sh', not './defs'." 1>&2; \
346           exit 1; \
347         fi
348
349 ## Use AUTOMAKE_fails when appropriate
350 sc_tests_automake_fails:
351         @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
352           echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2;  \
353           exit 1; \
354         fi
355
356 ## Setting 'required' after sourcing './defs' is a bug.
357 sc_tests_required_after_defs:
358         @for file in $(xtests); do \
359           if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
360             echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
361             exit 1; \
362           fi; \
363         done
364
365 ## Overriding a Makefile macro on the command line is not portable when
366 ## recursive targets are used.  Better use an envvar.  SHELL is an
367 ## exception, POSIX says it can't come from the environment.  V, DESTDIR,
368 ## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
369 ## as package authors are urged not to initialize them anywhere.
370 ## Finally, 'exp' is used by some ad-hoc checks, where we ensure it's
371 ## ok to override it from the command line.
372 sc_tests_overriding_macros_on_cmdline:
373         @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(xtests); then \
374           echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
375           echo ' in the above lines, it is more portable.' 1>&2; \
376           exit 1; \
377         fi
378 # The first s/// tries to account for usages like "$MAKE || st=$?".
379 # 'DISTCHECK_CONFIGURE_FLAGS' and 'exp' are allowed to contain whitespace in
380 # their definitions, hence the more complex last three substitutions below.
381         @if sed -e 's/ || .*//' -e 's/ && .*//' \
382                 -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
383                 -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
384                 -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
385                 -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
386                 -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
387                 -e "s/ exp='[^']*'/ /" \
388                 -e 's/ exp="[^"]*"/ /' \
389                 -e 's/ exp=[^ ]/ /' \
390               $(xtests) | grep '\$$MAKE .*='; then \
391           echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
392           echo 'it is more portable.' 1>&2; \
393           exit 1; \
394         fi
395         @if grep 'SHELL=.*\$$MAKE' $(xtests); then \
396           echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
397           echo 'the above lines.' 1>&2; \
398           exit 1; \
399         fi
400
401 ## Prefer use of our 'is_newest' auxiliary script over the more hacky
402 ## idiom "test $(ls -1t new old | sed 1q) = new", which is both more
403 ## cumbersome and more fragile.
404 sc_tests_ls_t:
405         @if LC_ALL=C grep -E '\bls(\s+-[a-zA-Z0-9]+)*\s+-[a-zA-Z0-9]*t' \
406             $(xtests); then \
407           echo "Use 'is_newest' rather than hacks based on 'ls -t'" 1>&2; \
408           exit 1; \
409         fi
410
411 ## Never use 'sleep 1' to create files with different timestamps.
412 ## Use '$sleep' instead.  Some filesystems (e.g., Windows) have only
413 ## a 2sec resolution.
414 sc_tests_plain_sleep:
415         @if grep -E '\bsleep +[12345]\b' $(xtests); then \
416           echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" instead.' 1>&2; \
417           exit 1; \
418         fi
419
420 ## fgrep and egrep are not required by POSIX.
421 sc_m4_am_plain_egrep_fgrep:
422         @if grep -E '\b[ef]grep\b' $(ams) $(srcdir)/m4/*.m4; then \
423           echo 'Do not use egrep or fgrep in the above files,' \
424                'they are not portable.' 1>&2; \
425           exit 1; \
426         fi
427
428 ## Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
429 ## for configure input files in our testsuite.  The latter  has been
430 ## deprecated for several years (at least since autoconf 2.50).
431 sc_tests_no_configure_in:
432         @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs) \
433               | grep -Ev '/backcompat.*\.(sh|tap):' \
434               | grep -Ev '/autodist-configure-no-subdir\.sh:' \
435               | grep -Ev '/(configure|help)\.sh:' \
436               | grep .; \
437         then \
438           echo "Use 'configure.ac', not 'configure.in', as the name" >&2; \
439           echo "for configure input files in the test cases above." >&2; \
440           exit 1; \
441         fi
442
443 ## Rule to ensure that the testsuite has been run before.  We don't depend
444 ## on 'check' here, because that would be very wasteful in the common case.
445 ## We could run "make check RECHECK_LOGS=" and avoid toplevel races with
446 ## AM_RECURSIVE_TARGETS.  Suggest keeping test directories around for
447 ## greppability of the Makefile.in files.
448 sc_ensure_testsuite_has_run:
449         @if test ! -f '$(TEST_SUITE_LOG)'; then \
450           echo 'Run "env keep_testdirs=yes make check" before' \
451                'running "make maintainer-check"' >&2; \
452           exit 1; \
453         fi
454 .PHONY: sc_ensure_testsuite_has_run
455
456 ## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
457 ## This test actually depends on the testsuite having been run before.
458 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
459         @if grep -E '(warning|error):.*(warning|error):' t/*.log; then \
460           echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
461           exit 1; \
462         fi
463
464 ## Ensure variables are listed before rules in Makefile.in files we generate.
465 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
466         @st=0; \
467         for file in `find t -name Makefile.in -print`; do \
468           latevars=`sed -n \
469             -e :x -e 's/#.*//' \
470             -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
471             -e '# Literal TAB.' \
472             -e '1,/^    /d' \
473             -e '# Allow @ so we match conditionals.' \
474             -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
475           if test -n "$$latevars"; then \
476             echo "Variables are expanded too late in $$file:" >&2; \
477             echo "$$latevars" | sed 's/^/  /' >&2; \
478             st=1; \
479           fi; \
480         done; \
481         test $$st -eq 0 || { \
482           echo 'Ensure variables are expanded before rules' >&2; \
483           exit 1; \
484         }
485
486 ## Using ':' as a PATH separator is not portable.
487 sc_tests_PATH_SEPARATOR:
488         @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
489           echo "Use '\$$PATH_SEPARATOR', not ':', in PATH definitions" \
490                "above." 1>&2; \
491           exit 1; \
492         fi
493
494 ## Try to make sure all @...@ substitutions are covered by our
495 ## substitution rule.
496 sc_perl_at_substs:
497         @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' bin/aclocal | wc -l` -ne 0; then \
498           echo "Unresolved @...@ substitution in aclocal" 1>&2; \
499           exit 1; \
500         fi
501         @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' bin/automake | wc -l` -ne 0; then \
502           echo "Unresolved @...@ substitution in automake" 1>&2; \
503           exit 1; \
504         fi
505
506 sc_unquoted_DESTDIR:
507         @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(ams); then \
508           echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
509           exit 1; \
510         fi
511
512 sc_tabs_in_texi:
513         @if grep '      ' $(srcdir)/doc/automake.texi; then \
514           echo 'Do not use tabs in the manual.' 1>&2; \
515           exit 1; \
516         fi
517
518 sc_at_in_texi:
519         @if grep -E '([^@]|^)@([         ][^@]|$$)' $(srcdir)/doc/automake.texi; \
520         then \
521           echo 'Unescaped @.' 1>&2; \
522           exit 1; \
523         fi
524
525 $(syntax_check_rules): bin/automake bin/aclocal
526 maintainer-check: $(syntax_check_rules)
527 .PHONY: maintainer-check $(syntax_check_rules)
528
529 ## Check that the list of tests given in the Makefile is equal to the
530 ## list of all test scripts in the Automake testsuite.
531 maintainer-check: maintainer-check-list-of-tests
532
533 # I'm a lazy typist.
534 lint: maintainer-check
535 .PHONY: lint