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