1 ## Process this file with automake to create Makefile.in
3 ## Makefile for Automake.
5 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
6 # 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 ## lib goes first, because it builds Config.pm, used by aclocal and
22 ## automake (run in doc, tests, and in the rebuild rules.)
23 ## `.' goes before doc and tests, because the latter two directories
24 ## run aclocal and automake.
25 SUBDIRS = lib . doc m4 tests
27 bin_SCRIPTS = automake aclocal
29 CLEANFILES = $(bin_SCRIPTS)
30 AUTOMAKESOURCES = automake.in aclocal.in
32 TAGS_FILES = $(AUTOMAKESOURCES)
46 ## Make versioned links. We only run the transform on the root name;
47 ## then we make a versioned link with the transformed base name. This
48 ## seemed like the most reasonable approach.
51 @for p in $(bin_SCRIPTS); do \
52 f="`echo $$p|sed '$(transform)'`"; \
53 fv="$$f-$(APIVERSION)"; \
54 rm -f $(DESTDIR)$(bindir)/$$fv; \
55 echo " $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
56 $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
60 @for p in $(bin_SCRIPTS); do \
61 f="`echo $$p|sed '$(transform)'`"; \
62 fv="$$f-$(APIVERSION)"; \
63 rm -f $(DESTDIR)$(bindir)/$$fv; \
67 ## We can't use configure to do the substitution here; we must do it
68 ## by hand. We use a funny notation here to avoid configure
69 ## substitutions in our text.
71 -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
72 -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
73 -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
74 -e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
75 -e 's,[@]PATH_SEPARATOR[@],$(PATH_SEPARATOR),g' \
76 -e 's,[@]PERL[@],$(PERL),g' \
77 -e 's,[@]PERL_THREADS[@],$(PERL_THREADS),g' \
78 -e 's,[@]SHELL[@],$(SHELL),g' \
79 -e 's,[@]VERSION[@],$(VERSION),g' \
80 -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
81 -e 's,[@]datadir[@],$(datadir),g'
83 ## These files depend on Makefile so they are rebuilt if $(VERSION),
84 ## $(datadir) or other do_subst'ituted variables change.
85 ## Use chmod a-w to prevent people from editing the wrong file by accident.
88 automake aclocal: Makefile
89 $(AM_V_GEN)rm -f $@ $@.tmp
90 $(AM_V_at)$(do_subst) $(srcdir)/$@.in >$@.tmp
91 $(AM_V_at)chmod +x $@.tmp
92 $(AM_V_at)chmod a-w $@.tmp
93 $(AM_V_at)mv -f $@.tmp $@
95 ## The master location for INSTALL is lib/INSTALL.
96 ## This is where `make fetch' will install new versions.
97 ## Make sure we also update this copy.
99 $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
101 ## recheck: convenience proxy target for the test suites.
102 TEST_SUBDIRS = lib/Automake/tests tests
107 for f in x $$MAKEFLAGS; do \
110 *k*) failcom='fail=yes';; \
113 for subdir in $(TEST_SUBDIRS); do \
114 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
119 ################################################################
121 ## Everything past here is useful to the maintainer, but probably not
125 # Ensure tests are world-executable
127 $(am__cd) $(distdir)/tests && chmod a+rx *.test
130 # Perl coverage statistics.
131 PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
132 PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
135 check-coverage-run recheck-coverage-run: all
136 $(mkinstalldirs) $(PERL_COVERAGE_DB)
137 PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
138 WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
139 $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
141 check-coverage-report:
142 @if test ! -d "$(PERL_COVERAGE_DB)"; then \
143 echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
144 echo "Please run \`make check-coverage' first" >&2; \
147 $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
149 # We don't use direct dependencies here because we'd like to be able
150 # to invoke the report even after interrupted check-coverage.
151 check-coverage: check-coverage-run
152 $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
154 recheck-coverage: recheck-coverage-run
155 $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
158 rm -rf "$(PERL_COVERAGE_DB)"
159 clean-local: clean-coverage
161 .PHONY: check-coverage recheck-coverage check-coverage-run \
162 recheck-coverage-run check-coverage-report clean-coverage
164 # Some simple checks, and then ordinary check. These are only really
165 # guaranteed to work on my machine.
166 syntax_check_rules = \
167 sc_diff_automake_in_automake \
169 sc_no_brace_variable_expansions \
171 sc_no_for_variable_in_macro \
173 sc_pre_normal_post_install_uninstall \
175 sc_perl_no_split_regex_space \
176 sc_cd_in_backquotes \
178 sc_perl_at_uscore_in_scalar_context \
179 sc_perl_local_no_parens \
181 sc_AMDEP_TRUE_in_automake_in \
182 sc_tests_make_without_am_makeflags \
183 sc_tests_plain_make \
184 sc_tests_plain_autoconf \
185 sc_tests_plain_autoupdate \
186 sc_tests_plain_automake \
187 sc_tests_here_document_format \
188 sc_tests_Exit_not_exit \
189 sc_tests_automake_fails \
190 sc_tests_plain_aclocal \
191 sc_tests_plain_perl \
192 sc_tests_required_after_defs \
193 sc_tests_overriding_macros_on_cmdline \
194 sc_tests_plain_sleep \
195 sc_tests_plain_egrep_fgrep \
196 sc_tests_PATH_SEPARATOR \
197 sc_tests_logs_duplicate_prefixes \
198 sc_tests_makefile_variable_order \
201 sc_unquoted_DESTDIR \
205 .PHONY: $(syntax_check_rules)
206 $(syntax_check_rules): automake aclocal
207 maintainer-check: $(syntax_check_rules)
209 ## This check avoids accidental configure substitutions in the source.
210 ## There are exactly 8 lines that should be modified. This works out
211 ## to 28 lines of diffs.
212 sc_diff_automake_in_automake:
213 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
214 echo "found too many diffs between automake.in and automake" 1>&2; \
215 diff -c $(srcdir)/automake.in automake; \
219 ## Syntax check with default Perl (on my machine, Perl 5).
221 perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
222 perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
224 ## expect no instances of '${...}'. However, $${...} is ok, since that
225 ## is a shell construct, not a Makefile construct.
226 sc_no_brace_variable_expansions:
227 @if grep -F '$${' $(srcdir)/lib/am/[a-z]*.am | \
228 grep -F -v '$$$$'; then \
229 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
233 ## Make sure `rm' is called with `-f'.
235 @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
236 grep -E '\<rm ([^-]|\-[^f ]*\>)'; then \
237 echo "Suspicious 'rm' invocation." 1>&2; \
241 ## Never use something like `for file in $(FILES)', this doesn't work
242 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
243 ## commonly used in Java filenames).
244 sc_no_for_variable_in_macro:
245 @if grep 'for .* in \$$(' $(srcdir)/lib/am/[a-z]*.am; then \
246 echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
250 ## Make sure all invocations of mkinstalldirs are correct.
252 @if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
253 grep -F -v '$$(mkinstalldirs)'; then \
254 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
258 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
259 sc_pre_normal_post_install_uninstall:
260 @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \
261 $(srcdir)/lib/am/[a-z]*.am | \
262 grep -v ':##' | grep -v ': @\$$('; then \
263 echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \
267 ## We never want to use "undef", only "delete", but for $/.
269 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
270 grep -F -v 'undef $$/'; then \
271 echo "Found undef in automake.in; use delete instead" 1>&2; \
275 ## We never want split (/ /,...), only split (' ', ...).
276 sc_perl_no_split_regex_space:
277 @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
278 echo "Found bad split in the lines above." 1>&2; \
282 ## Look for cd within backquotes
284 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
285 $(srcdir)/lib/am/*.am; then \
286 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
290 ## Look for cd to a relative directory (may be influenced by CDPATH).
291 ## Skip some known directories that are OK.
293 @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
294 $(srcdir)/lib/am/*.am | \
295 grep -v 'echo.*cd ' | \
296 grep -v 'am__cd =' | \
297 grep -v '^[^#]*cd [./]' | \
298 grep -v '^[^#]*cd \$$(top_builddir)' | \
299 grep -v '^[^#]*cd "\$$\$$am__cwd' | \
300 grep -v '^[^#]*cd \$$(abs' | \
301 grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
302 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
306 ## Using @_ in a scalar context is most probably a programming error.
307 sc_perl_at_uscore_in_scalar_context:
308 @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
309 echo "Using @_ in a scalar context in the lines above." 1>&2; \
313 ## Forbid using parens with `local' to ease counting.
314 sc_perl_local_no_parens:
315 @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
316 echo "Don't use \`local' with parens: use several \`local' above." >&2; \
320 ## Allow only `local $_' in Automake.
322 @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
323 grep '^[ \t]*local [^*]'; then \
324 echo "Please avoid \`local'." 1>&2; \
328 ## Don't let AMDEP_TRUE substitution appear in automake.in.
329 sc_AMDEP_TRUE_in_automake_in:
330 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
331 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
335 ## Tests should never call make directly.
336 sc_tests_make_without_am_makeflags:
337 @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
338 grep -v 'AM_MAKEFLAGS'; then \
339 echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
343 ## Tests should never call make directly.
345 @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
346 echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
350 ## Tests should never call autoconf directly.
351 sc_tests_plain_autoconf:
352 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf'; then \
353 echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF" instead.' 1>&2; \
357 ## Tests should never call autoupdate directly.
358 sc_tests_plain_autoupdate:
359 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoupdate'; then \
360 echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE" instead.' 1>&2; \
364 ## Tests should never call automake directly.
365 sc_tests_plain_automake:
366 @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[ ]*automake([^:]|$$)'; then \
367 echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE" instead.' 1>&2; \
371 ## Tests should only use END and EOF for here documents
372 ## (so that the next test is effective).
373 sc_tests_here_document_format:
374 @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF'; then \
375 echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
379 ## Tests should never call exit directly, but use Exit.
380 ## This is so that the exit status is transported correctly across the 0 trap.
381 ## Ignore comments, and ignore one perl line in ext2.test.
382 sc_tests_Exit_not_exit:
383 @found=false; for file in $(srcdir)/tests/*.test; do \
384 res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
385 -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
386 if test -n "$$res"; then \
387 echo "$$file:$$res"; \
392 echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
396 ## Use AUTOMAKE_fails when appropriate
397 sc_tests_automake_fails:
398 @if grep -v '^#' $(srcdir)/tests/*.test | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
399 echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
403 ## Tests should never call aclocal directly.
404 sc_tests_plain_aclocal:
405 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal'; then \
406 echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL" instead.' 1>&2; \
410 ## Tests should never call perl directly.
412 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl'; then \
413 echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.' 1>&2; \
417 ## Setting `required' after sourcing `./defs' is a bug.
418 sc_tests_required_after_defs:
419 @for file in $(srcdir)/tests/*.test; do \
420 if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
421 echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
426 ## Overriding a Makefile macro on the command line is not portable when
427 ## recursive targets are used. Better use an envvar. SHELL is an exception,
428 ## POSIX says it can't come from the environment. V and DESTDIRS are exceptions,
429 ## too, as package authors are urged not to initialize them anywhere.
430 sc_tests_overriding_macros_on_cmdline:
431 @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; then \
432 echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
433 echo ' in the above lines, it is more portable.' 1>&2; \
436 @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' $(srcdir)/tests/*.test | \
437 grep '\$$MAKE .*=' ; then \
438 echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
439 echo 'it is more portable.' 1>&2; \
442 @if grep 'SHELL=.*\$$MAKE' $(srcdir)/tests/*.test; then \
443 echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
444 echo 'the above lines.' 1>&2; \
448 ## Never use `sleep 1' to create files with different timestamps.
449 ## Use `$sleep' instead. Some filesystems (e.g., Windows') have only
450 ## a 2sec resolution.
451 sc_tests_plain_sleep:
452 @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
453 echo 'Do not use "sleep x" in the above tests. Use "$$sleep" instead.' 1>&2; \
457 ## fgrep and egrep are not required by POSIX.
458 sc_tests_plain_egrep_fgrep:
459 @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
460 echo 'Do not use egrep or fgrep in test cases. Use $$FGREP or $$EGREP.' 1>&2; \
463 @if grep -E '\b[ef]grep\b' $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
464 echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
468 ## Rule to ensure that the testsuite has been run before. We don't depend on `check'
469 ## here, because that would be very wasteful in the common case. We could run
470 ## `make check RECHECK_LOGS=' and avoid toplevel races with AM_RECURSIVE_TARGETS.
471 ## Suggest keeping test directories around for greppability of the Makefile.in files.
472 sc_ensure_testsuite_has_run:
473 @if test ! -f tests/test-suite.log; then \
474 echo "Run \`env keep_testdirs=yes make check' before \`maintainer-check'" >&2; \
477 .PHONY: sc_ensure_testsuite_has_run
479 ## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
480 ## This test actually depends on the testsuite having been run before.
481 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
482 @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
483 echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
487 ## Ensure variables are listed before rules in Makefile.in files we generate.
488 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
489 @for file in `find tests -name Makefile.in -print`; do \
492 -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
495 ## Allow @ so we match conditionals.
496 -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
497 if test -n "$$latevars"; then \
498 echo 'Ensure variables are expanded before rules' >&2; \
499 echo "Variables are expanded too late in $$file:" >&2; \
500 echo "$$latevars" | sed 's/^/ /' >&2; \
505 ## Using `:' as a PATH separator is not portable.
506 sc_tests_PATH_SEPARATOR:
507 @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
508 echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
513 @if grep 'mkdir_p' $(srcdir)/automake.in \
514 $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
515 echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
519 ## Try to make sure all @...@ substitutions are covered by our
520 ## substitution rule.
522 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
523 echo "Unresolved @...@ substitution in aclocal" 1>&2; \
526 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
527 echo "Unresolved @...@ substitution in automake" 1>&2; \
532 @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
533 echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
538 @if grep ' ' $(srcdir)/doc/automake.texi; then \
539 echo 'Do not use tabs in the manual.' 1>&2; \
544 @if grep -E '([^@]|^)@([ ][^@]|$$)' $(srcdir)/doc/automake.texi; \
546 echo 'Unescaped @.' 1>&2; \
551 git-dist: maintainer-check
552 ## Make sure the NEWS file is up-to-date.
553 @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
554 echo "NEWS not updated; not releasing" 1>&2; \
557 ## Build the distribution
558 $(MAKE) $(AM_MAKEFLAGS) distcheck
559 ## Finally, if anything was successful, commit the last changes and tag
560 ## the release in the repository. We don't use RCS keywords so it's OK
561 ## to distribute the files before they were committed.
562 $(am__cd) $(srcdir) && git commit -a -s && \
563 git tag -s "v$(VERSION)" -m "Release $(VERSION)"
565 git-release: git-dist
567 *[a-z]) dest=alpha;; \
570 $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
571 --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
574 thisver="v$(VERSION)"; \
575 if test -z "$$OLDVERSION"; then \
576 prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
577 else prevno="$$OLDVERSION"; fi; \
579 git diff $$prevver..$$thisver $(PACKAGE) \
580 > $(PACKAGE)-$$prevno-$(VERSION).diff
582 ## Check our path lengths.
584 ($(am__cd) $(distdir) && \
585 ## FIXME there's got to be a better way! pathchk should take the list
586 ## of files on stdin, at least.
587 find . -print | xargs pathchk -p); \
589 find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
593 ## Program to use to fetch files.
595 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
596 WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
597 WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
598 WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
599 WGET_GCC = $(WGET) 'http://gcc.gnu.org/viewcvs/*checkout*/trunk/'
601 ## Files that we fetch and which we compare against.
602 ## FIXME should be a lot more here
611 ## Fetch the latest versions of files we care about.
613 rm -rf Fetchdir > /dev/null 2>&1
615 ## If a get fails then that is a problem.
616 ($(am__cd) Fetchdir && \
617 $(WGET_SV_GIT_CF)config.guess -O config.guess && \
618 $(WGET_SV_GIT_CF)config.sub -O config.sub && \
619 $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
620 $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
621 $(WGET_GCC)config-ml.in -O config-ml.in && \
622 $(WGET_GCC)symlink-tree -O symlink-tree)
623 ## Don't exit after test because we want to give as many errors as
625 @stat=0; for file in $(FETCHFILES); do \
626 if diff -u $(srcdir)/lib/$$file Fetchdir/$$file \
627 >>Fetchdir/update.patch 2>/dev/null; then :; \
630 echo "Updating $(srcdir)/lib/$$file ..."; \
631 cp Fetchdir/$$file $(srcdir)/lib/$$file; \
635 echo "See Fetchdir/update.patch for a log of the changes."; \
638 ## Generate release statistics, for the table in automake.texi.
639 ## This has to be run in an up to date build tree, but there must
640 ## be no temp files nor unused other files lying around!
642 @am=`wc -l < automake` && \
643 acl=`wc -l < aclocal` && \
644 pmfiles="lib/Automake/*.pm" && \
645 if test . != '$(srcdir)'; then pmfiles="$$pmfiles $(srcdir)/lib/Automake/*.pm"; \
647 pm=`cat $$pmfiles | wc -l` && \
648 dot_am_files=`ls -1 $(srcdir)/lib/am/*.am | grep -v Makefile.am` && \
649 amf=`echo "$$dot_am_files" | wc -l` && \
650 aml=`cat $$dot_am_files | wc -l` && \
651 m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
652 m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
653 doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
654 echo "$$doc_text" && \
655 rm -f doc/unused.ps && \
656 doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
657 tests="tests/*.test"; \
658 if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
660 t=`ls -1 $$tests | wc -l` && \
661 tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
662 today=`date +%Y-%m-%d` && \
663 echo "add this to the table in doc/automake.texi after verification:" && \
664 printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
665 $$today $(VERSION) $$am $$acl $$pm $$aml "($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
666 .PHONY: release-stats