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 = \
168 sc_diff_automake_in_automake \
170 sc_no_brace_variable_expansions \
172 sc_no_for_variable_in_macro \
174 sc_pre_normal_post_install_uninstall \
176 sc_perl_no_split_regex_space \
177 sc_cd_in_backquotes \
179 sc_perl_at_uscore_in_scalar_context \
180 sc_perl_local_no_parens \
182 sc_AMDEP_TRUE_in_automake_in \
183 sc_tests_make_without_am_makeflags \
184 sc_tests_plain_make \
185 sc_tests_plain_autoconf \
186 sc_tests_plain_autoupdate \
187 sc_tests_plain_automake \
188 sc_tests_here_document_format \
189 sc_tests_Exit_not_exit \
190 sc_tests_automake_fails \
191 sc_tests_plain_aclocal \
192 sc_tests_plain_perl \
193 sc_tests_required_after_defs \
194 sc_tests_overriding_macros_on_cmdline \
195 sc_tests_plain_sleep \
196 sc_tests_plain_egrep_fgrep \
197 sc_tests_PATH_SEPARATOR \
198 sc_tests_logs_duplicate_prefixes \
199 sc_tests_makefile_variable_order \
202 sc_unquoted_DESTDIR \
206 .PHONY: $(syntax_check_rules)
207 $(syntax_check_rules): automake aclocal
208 maintainer-check: $(syntax_check_rules)
210 ## Look for test whose names can cause spurious failures when used as
211 ## first argument to AC_INIT (chiefly because they might contain an
212 ## m4/m4sugar builtin or macro name).
262 @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
263 m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
264 if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \
265 echo "the names of the tests above can be problematic" 1>&2; \
266 echo "Avoid test names that contain names of m4 macros" 1>&2; \
270 ## This check avoids accidental configure substitutions in the source.
271 ## There are exactly 8 lines that should be modified. This works out
272 ## to 28 lines of diffs.
273 sc_diff_automake_in_automake:
274 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
275 echo "found too many diffs between automake.in and automake" 1>&2; \
276 diff -c $(srcdir)/automake.in automake; \
280 ## Syntax check with default Perl (on my machine, Perl 5).
282 perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
283 perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
285 ## expect no instances of '${...}'. However, $${...} is ok, since that
286 ## is a shell construct, not a Makefile construct.
287 sc_no_brace_variable_expansions:
288 @if grep -F '$${' $(srcdir)/lib/am/[a-z]*.am | \
289 grep -F -v '$$$$'; then \
290 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
294 ## Make sure `rm' is called with `-f'.
296 @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
297 grep -E '\<rm ([^-]|\-[^f ]*\>)'; then \
298 echo "Suspicious 'rm' invocation." 1>&2; \
302 ## Never use something like `for file in $(FILES)', this doesn't work
303 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
304 ## commonly used in Java filenames).
305 sc_no_for_variable_in_macro:
306 @if grep 'for .* in \$$(' $(srcdir)/lib/am/[a-z]*.am; then \
307 echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
311 ## Make sure all invocations of mkinstalldirs are correct.
313 @if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
314 grep -F -v '$$(mkinstalldirs)'; then \
315 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
319 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
320 sc_pre_normal_post_install_uninstall:
321 @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \
322 $(srcdir)/lib/am/[a-z]*.am | \
323 grep -v ':##' | grep -v ': @\$$('; then \
324 echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the lines above" 1>&2; \
328 ## We never want to use "undef", only "delete", but for $/.
330 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
331 grep -F -v 'undef $$/'; then \
332 echo "Found undef in automake.in; use delete instead" 1>&2; \
336 ## We never want split (/ /,...), only split (' ', ...).
337 sc_perl_no_split_regex_space:
338 @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
339 echo "Found bad split in the lines above." 1>&2; \
343 ## Look for cd within backquotes
345 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
346 $(srcdir)/lib/am/*.am; then \
347 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
351 ## Look for cd to a relative directory (may be influenced by CDPATH).
352 ## Skip some known directories that are OK.
354 @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
355 $(srcdir)/lib/am/*.am | \
356 grep -v 'echo.*cd ' | \
357 grep -v 'am__cd =' | \
358 grep -v '^[^#]*cd [./]' | \
359 grep -v '^[^#]*cd \$$(top_builddir)' | \
360 grep -v '^[^#]*cd "\$$\$$am__cwd' | \
361 grep -v '^[^#]*cd \$$(abs' | \
362 grep -v '^[^#]*cd "\$$(DESTDIR)'; then \
363 echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
367 ## Using @_ in a scalar context is most probably a programming error.
368 sc_perl_at_uscore_in_scalar_context:
369 @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
370 echo "Using @_ in a scalar context in the lines above." 1>&2; \
374 ## Forbid using parens with `local' to ease counting.
375 sc_perl_local_no_parens:
376 @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
377 echo "Don't use \`local' with parens: use several \`local' above." >&2; \
381 ## Allow only `local $_' in Automake.
383 @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
384 grep '^[ \t]*local [^*]'; then \
385 echo "Please avoid \`local'." 1>&2; \
389 ## Don't let AMDEP_TRUE substitution appear in automake.in.
390 sc_AMDEP_TRUE_in_automake_in:
391 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
392 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
396 ## Tests should never call make directly.
397 sc_tests_make_without_am_makeflags:
398 @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
399 grep -v 'AM_MAKEFLAGS'; then \
400 echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
404 ## Tests should never call make directly.
406 @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
407 echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
411 ## Tests should never call autoconf directly.
412 sc_tests_plain_autoconf:
413 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf'; then \
414 echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF" instead.' 1>&2; \
418 ## Tests should never call autoupdate directly.
419 sc_tests_plain_autoupdate:
420 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoupdate'; then \
421 echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE" instead.' 1>&2; \
425 ## Tests should never call automake directly.
426 sc_tests_plain_automake:
427 @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[ ]*automake([^:]|$$)'; then \
428 echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE" instead.' 1>&2; \
432 ## Tests should only use END and EOF for here documents
433 ## (so that the next test is effective).
434 sc_tests_here_document_format:
435 @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF'; then \
436 echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
440 ## Tests should never call exit directly, but use Exit.
441 ## This is so that the exit status is transported correctly across the 0 trap.
442 ## Ignore comments, and ignore one perl line in ext2.test.
443 sc_tests_Exit_not_exit:
444 @found=false; for file in $(srcdir)/tests/*.test; do \
445 res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
446 -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
447 if test -n "$$res"; then \
448 echo "$$file:$$res"; \
453 echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
457 ## Use AUTOMAKE_fails when appropriate
458 sc_tests_automake_fails:
459 @if grep -v '^#' $(srcdir)/tests/*.test | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
460 echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
464 ## Tests should never call aclocal directly.
465 sc_tests_plain_aclocal:
466 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal'; then \
467 echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL" instead.' 1>&2; \
471 ## Tests should never call perl directly.
473 @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl'; then \
474 echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.' 1>&2; \
478 ## Setting `required' after sourcing `./defs' is a bug.
479 sc_tests_required_after_defs:
480 @for file in $(srcdir)/tests/*.test; do \
481 if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
482 echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
487 ## Overriding a Makefile macro on the command line is not portable when
488 ## recursive targets are used. Better use an envvar. SHELL is an exception,
489 ## POSIX says it can't come from the environment. V and DESTDIRS are exceptions,
490 ## too, as package authors are urged not to initialize them anywhere.
491 sc_tests_overriding_macros_on_cmdline:
492 @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; then \
493 echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
494 echo ' in the above lines, it is more portable.' 1>&2; \
497 @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' $(srcdir)/tests/*.test | \
498 grep '\$$MAKE .*=' ; then \
499 echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
500 echo 'it is more portable.' 1>&2; \
503 @if grep 'SHELL=.*\$$MAKE' $(srcdir)/tests/*.test; then \
504 echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
505 echo 'the above lines.' 1>&2; \
509 ## Never use `sleep 1' to create files with different timestamps.
510 ## Use `$sleep' instead. Some filesystems (e.g., Windows') have only
511 ## a 2sec resolution.
512 sc_tests_plain_sleep:
513 @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
514 echo 'Do not use "sleep x" in the above tests. Use "$$sleep" instead.' 1>&2; \
518 ## fgrep and egrep are not required by POSIX.
519 sc_tests_plain_egrep_fgrep:
520 @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
521 echo 'Do not use egrep or fgrep in test cases. Use $$FGREP or $$EGREP.' 1>&2; \
524 @if grep -E '\b[ef]grep\b' $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
525 echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
529 ## Rule to ensure that the testsuite has been run before. We don't depend on `check'
530 ## here, because that would be very wasteful in the common case. We could run
531 ## `make check RECHECK_LOGS=' and avoid toplevel races with AM_RECURSIVE_TARGETS.
532 ## Suggest keeping test directories around for greppability of the Makefile.in files.
533 sc_ensure_testsuite_has_run:
534 @if test ! -f tests/test-suite.log; then \
535 echo "Run \`env keep_testdirs=yes make check' before \`maintainer-check'" >&2; \
538 .PHONY: sc_ensure_testsuite_has_run
540 ## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
541 ## This test actually depends on the testsuite having been run before.
542 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
543 @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
544 echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
548 ## Ensure variables are listed before rules in Makefile.in files we generate.
549 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
550 @for file in `find tests -name Makefile.in -print`; do \
553 -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
556 ## Allow @ so we match conditionals.
557 -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
558 if test -n "$$latevars"; then \
559 echo 'Ensure variables are expanded before rules' >&2; \
560 echo "Variables are expanded too late in $$file:" >&2; \
561 echo "$$latevars" | sed 's/^/ /' >&2; \
566 ## Using `:' as a PATH separator is not portable.
567 sc_tests_PATH_SEPARATOR:
568 @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
569 echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
574 @if grep 'mkdir_p' $(srcdir)/automake.in \
575 $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
576 echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
580 ## Try to make sure all @...@ substitutions are covered by our
581 ## substitution rule.
583 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
584 echo "Unresolved @...@ substitution in aclocal" 1>&2; \
587 @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
588 echo "Unresolved @...@ substitution in automake" 1>&2; \
593 @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
594 echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
599 @if grep ' ' $(srcdir)/doc/automake.texi; then \
600 echo 'Do not use tabs in the manual.' 1>&2; \
605 @if grep -E '([^@]|^)@([ ][^@]|$$)' $(srcdir)/doc/automake.texi; \
607 echo 'Unescaped @.' 1>&2; \
612 git-dist: maintainer-check
613 ## Make sure the NEWS file is up-to-date.
614 @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
615 echo "NEWS not updated; not releasing" 1>&2; \
618 ## Build the distribution
619 $(MAKE) $(AM_MAKEFLAGS) distcheck
620 ## Finally, if anything was successful, commit the last changes and tag
621 ## the release in the repository. We don't use RCS keywords so it's OK
622 ## to distribute the files before they were committed.
623 $(am__cd) $(srcdir) && git commit -a -s && \
624 git tag -s "v$(VERSION)" -m "Release $(VERSION)"
626 git-release: git-dist
628 *[a-z]) dest=alpha;; \
631 $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
632 --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
635 thisver="v$(VERSION)"; \
636 if test -z "$$OLDVERSION"; then \
637 prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
638 else prevno="$$OLDVERSION"; fi; \
640 git diff $$prevver..$$thisver $(PACKAGE) \
641 > $(PACKAGE)-$$prevno-$(VERSION).diff
643 ## Check our path lengths.
645 ($(am__cd) $(distdir) && \
646 ## FIXME there's got to be a better way! pathchk should take the list
647 ## of files on stdin, at least.
648 find . -print | xargs pathchk -p); \
650 find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
654 ## Program to use to fetch files.
656 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
657 WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
658 WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
659 WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
660 WGET_GCC = $(WGET) 'http://gcc.gnu.org/viewcvs/*checkout*/trunk/'
662 ## Files that we fetch and which we compare against.
663 ## FIXME should be a lot more here
672 ## Fetch the latest versions of files we care about.
674 rm -rf Fetchdir > /dev/null 2>&1
676 ## If a get fails then that is a problem.
677 ($(am__cd) Fetchdir && \
678 $(WGET_SV_GIT_CF)config.guess -O config.guess && \
679 $(WGET_SV_GIT_CF)config.sub -O config.sub && \
680 $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
681 $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
682 $(WGET_GCC)config-ml.in -O config-ml.in && \
683 $(WGET_GCC)symlink-tree -O symlink-tree)
684 ## Don't exit after test because we want to give as many errors as
686 @stat=0; for file in $(FETCHFILES); do \
687 if diff -u $(srcdir)/lib/$$file Fetchdir/$$file \
688 >>Fetchdir/update.patch 2>/dev/null; then :; \
691 echo "Updating $(srcdir)/lib/$$file ..."; \
692 cp Fetchdir/$$file $(srcdir)/lib/$$file; \
696 echo "See Fetchdir/update.patch for a log of the changes."; \
699 ## Generate release statistics, for the table in automake.texi.
700 ## This has to be run in an up to date build tree, but there must
701 ## be no temp files nor unused other files lying around!
703 @am=`wc -l < automake` && \
704 acl=`wc -l < aclocal` && \
705 pmfiles="lib/Automake/*.pm" && \
706 if test . != '$(srcdir)'; then pmfiles="$$pmfiles $(srcdir)/lib/Automake/*.pm"; \
708 pm=`cat $$pmfiles | wc -l` && \
709 dot_am_files=`ls -1 $(srcdir)/lib/am/*.am | grep -v Makefile.am` && \
710 amf=`echo "$$dot_am_files" | wc -l` && \
711 aml=`cat $$dot_am_files | wc -l` && \
712 m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
713 m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
714 doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
715 echo "$$doc_text" && \
716 rm -f doc/unused.ps && \
717 doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
718 tests="tests/*.test"; \
719 if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
721 t=`ls -1 $$tests | wc -l` && \
722 tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
723 today=`date +%Y-%m-%d` && \
724 echo "add this to the table in doc/automake.texi after verification:" && \
725 printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
726 $$today $(VERSION) $$am $$acl $$pm $$aml "($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
727 .PHONY: release-stats