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