1 ## Process this file with automake to create Makefile.in
3 ## Makefile for Automake.
5 # Copyright (C) 1995-2012 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ## Might be updated later.
23 MAINTAINERCLEANFILES =
30 # We want a handful of substitutions to be fully-expanded by make;
31 # then use config.status to substitute the remainder where a single
32 # expansion is sufficient. We use a funny notation here to avoid
33 # configure substitutions in our text.
35 -e "s,[@]configure_input[@],Generated from $$in; do not edit by hand.,g" \
36 -e 's,[@]datadir[@],$(datadir),g' \
37 -e 's,[@]amdir[@],$(amdir),g' \
38 -e 's,[@]bindir[@],$(bindir),g' \
39 -e 's,[@]docdir[@],$(docdir),g' \
40 -e 's,[@]pkgvdatadir[@],$(pkgvdatadir),g' \
41 -e 's,[@]scriptdir[@],$(scriptdir),g' \
42 -e 's,[@]automake_acdir[@],$(automake_acdir),g' \
43 -e 's,[@]system_acdir[@],$(system_acdir),g' \
44 ## Hack to avoid a spurious substitution in the Automake script (part 1).
45 -e 's,[@]am__isrc[@],!!@!!am__isrc!!@!!,g' \
46 | $(SHELL) ./config.status --file=- \
47 ## Hack to avoid a spurious substitution in the Automake script (part 2).
48 | sed -e 's,!!@!!am__isrc!!@!!,@''am__isrc@,g' \
51 # Generated files shouldn't contain unexpanded '@substitutions@', and
52 # should be made read-only, to prevent them from being edited by mistake
53 # instead of the file the are generated from.
54 generated_file_finalize = $(AM_V_at) \
55 if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
56 echo "$@ contains unexpanded substitution (see lines above)"; \
59 chmod a-w $@-t && mv -f $@-t $@
61 bin_SCRIPTS = automake aclocal
63 CLEANFILES += $(bin_SCRIPTS)
64 AUTOMAKESOURCES = automake.in aclocal.in
66 TAGS_FILES = $(AUTOMAKESOURCES)
75 ## Make versioned links. We only run the transform on the root name;
76 ## then we make a versioned link with the transformed base name. This
77 ## seemed like the most reasonable approach.
80 @for p in $(bin_SCRIPTS); do \
81 f="`echo $$p|sed '$(transform)'`"; \
82 fv="$$f-$(APIVERSION)"; \
83 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
84 echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
85 $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
89 @for p in $(bin_SCRIPTS); do \
90 f="`echo $$p|sed '$(transform)'`"; \
91 fv="$$f-$(APIVERSION)"; \
92 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
95 ## These files depend on Makefile so they are rebuilt if $(VERSION),
96 ## $(datadir) or other do_subst'ituted variables change.
99 automake aclocal: Makefile
100 $(AM_V_at)rm -f $@ $@-t
101 $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
102 ## We can't use '$(generated_file_finalize)' here, because currently
103 ## Automake contains occurrences of unexpanded @substitutions@ in
104 ## comments, and that is perfectly legit.
105 $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
107 ## The master location for INSTALL is lib/INSTALL.
108 ## This is where "make fetch" will install new versions.
109 ## Make sure we also update this copy.
111 $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
113 # We don't use the default name for the autom4te cache directory,
115 maintainer-clean-local:
116 rm -rf .autom4te.cache
119 ## -------------------------------------------------------------------- ##
120 ## Auxiliary scripts and files for use with "automake --add-missing". ##
121 ## -------------------------------------------------------------------- ##
123 dist_pkgvdata_DATA = \
128 ## These must all be executable when installed. However, if we use
129 ## _SCRIPTS, then the program transform will be applied, which is not
130 ## what we want. So we make them executable by hand.
150 @for f in $(dist_script_DATA); do echo $$f; done \
154 echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
155 chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
159 installcheck-local: installcheck-executable-scripts
160 installcheck-executable-scripts:
161 @for f in $(dist_script_DATA); do echo $$f; done \
164 path="$(pkgvdatadir)/$$f"; \
165 test -x "$$path" || echo $$path; \
167 | sed 's/$$/: not executable/' \
168 | grep . 1>&2 && exit 1; exit 0
171 ## ---------------------------------------------------- ##
172 ## Private perl modules used by automake and aclocal. ##
173 ## ---------------------------------------------------- ##
175 perllibdir = $(pkgvdatadir)/Automake
176 dist_perllib_DATA = \
177 lib/Automake/ChannelDefs.pm \
178 lib/Automake/Channels.pm \
179 lib/Automake/Condition.pm \
180 lib/Automake/Configure_ac.pm \
181 lib/Automake/DisjConditions.pm \
182 lib/Automake/FileUtils.pm \
183 lib/Automake/General.pm \
184 lib/Automake/Getopt.pm \
185 lib/Automake/Item.pm \
186 lib/Automake/ItemDef.pm \
187 lib/Automake/Location.pm \
188 lib/Automake/Options.pm \
189 lib/Automake/Rule.pm \
190 lib/Automake/RuleDef.pm \
191 lib/Automake/Variable.pm \
192 lib/Automake/VarDef.pm \
193 lib/Automake/Version.pm \
194 lib/Automake/XFile.pm \
197 nodist_perllib_DATA = lib/Automake/Config.pm
198 CLEANFILES += $(nodist_perllib_DATA)
200 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
201 $(AM_V_at)rm -f $@ $@-t
202 $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
203 $(AM_V_GEN)in=Config.in \
204 && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
205 $(generated_file_finalize)
206 EXTRA_DIST += lib/Automake/Config.in
209 ## --------------------- ##
210 ## Makefile fragments. ##
211 ## --------------------- ##
216 lib/am/clean-hdr.am \
219 lib/am/configure.am \
226 lib/am/header-vars.am \
229 lib/am/inst-vars.am \
231 lib/am/lang-compile.am \
238 lib/am/ltlibrary.am \
239 lib/am/mans-vars.am \
244 lib/am/remake-hdr.am \
248 lib/am/texi-vers.am \
249 lib/am/texibuild.am \
255 ## ------------------------------ ##
256 ## Automake-provided m4 macros. ##
257 ## ------------------------------ ##
259 dist_automake_ac_DATA = \
297 dist_system_ac_DATA = m4/acdir/README
299 # We build amversion.m4 here, instead of from config.status,
300 # because config.status is rerun each time one of configure's
301 # dependencies change and amversion.m4 happens to be a configure
302 # dependency. configure and amversion.m4 would be rebuilt in
304 # Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
305 # how amversion.m4 appears in our dependencies.
306 $(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
307 $(AM_V_at)rm -f $@-t $@
308 $(AM_V_GEN)in=amversion.in \
309 && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
310 $(generated_file_finalize)
311 EXTRA_DIST += m4/amversion.in
318 # Run the tests with a proper shell detected at configure time.
319 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
321 TEST_EXTENSIONS = .pl .sh .tap
322 SH_LOG_COMPILER = $(LOG_COMPILER)
323 TAP_LOG_COMPILER = $(LOG_COMPILER)
324 PL_LOG_COMPILER = $(PERL)
325 AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
327 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
329 AM_TAP_LOG_DRIVER_FLAGS = --merge
331 EXTRA_DIST += t/README t/ax/is t/ax/is_newest
333 TESTS = ## Will be updated later.
335 # Some testsuite-influential variables should be overridable from the
336 # test scripts, but not from the environment.
337 AM_TESTS_ENVIRONMENT = \
343 am_test_prefer_config_shell \
344 am_original_AUTOMAKE \
345 am_original_ACLOCAL \
347 eval test x"\$${$$v}" = x || unset $$v; \
349 # The 'AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
350 # re-execute themselves with the shell detected at configure time, since
351 # we are already running them under it explicitly in our setup (see e.g.
352 # the definition of TEST_LOG_COMPILER above).
353 AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC;
354 # We want warning messages and explanations for skipped tests to go to
355 # the console if possible, so set up 'stderr_fileno_' properly.
356 AM_TESTS_FD_REDIRECT = 9>&2
357 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
359 # Hand-written tests.
361 include $(srcdir)/t/list-of-tests.mk
363 TESTS += $(handwritten_TESTS)
364 EXTRA_DIST += $(handwritten_TESTS)
366 # Automatically-generated tests wrapping hand-written ones.
367 # Also, automatically-computed dependencies for tests.
369 include $(srcdir)/t/testsuite-part.am
371 TESTS += $(generated_TESTS)
372 EXTRA_DIST += $(generated_TESTS)
374 $(srcdir)/t/testsuite-part.am:
375 $(AM_V_at)rm -f t/testsuite-part.tmp $@
376 $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
377 --srcdir $(srcdir) > t/testsuite-part.tmp
378 $(AM_V_at)chmod a-w t/testsuite-part.tmp
379 $(AM_V_at)mv -f t/testsuite-part.tmp $@
380 EXTRA_DIST += gen-testsuite-part
382 ## The dependecies declared here are not truly complete, but such
383 ## completeness would cause more issues than it would solve. See
384 ## automake bug#11347.
385 $(generated_TESTS): $(srcdir)/gen-testsuite-part
386 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
388 # Static dependencies valid for each test case.
389 check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
392 t/ax/plain-functions.sh \
393 t/ax/tap-functions.sh
394 nodist_check_DATA = defs-static
396 # Few more static dependencies.
397 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
398 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
399 EXTRA_DIST += t/ax/distcheck-hook-m4.am
401 defs-static: defs-static.in Makefile
402 $(AM_V_at)rm -f $@ $@-t
403 $(AM_V_GEN)in=defs-static.in\
404 && $(do_subst) <$(srcdir)/defs-static.in >$@-t
405 $(generated_file_finalize)
406 EXTRA_DIST += defs-static.in
407 CLEANFILES += defs-static
409 # If two test scripts have the same basename, they will end up sharing
410 # the same log file, leading to all sort of undefined and undesired
412 check-no-repeated-test-name:
413 @LC_ALL=C; export LC_ALL; \
414 lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
415 | sort | uniq -c | awk '($$1 > 1) { print }' \
416 | sed 's/\.log$$//' | grep . >&2 \
418 echo $@: test names listed above are duplicated >&2; \
421 check-local: check-no-repeated-test-name
422 .PHONY: check-no-repeated-test-name
424 ## Checking the list of tests.
425 test_subdirs = t t/pm t/perf
426 include $(srcdir)/t/CheckListOfTests.am
428 # Run the testsuite with the installed aclocal and automake.
429 installcheck-local: installcheck-testsuite
430 installcheck-testsuite:
431 am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
433 clean-local: clean-local-check
434 .PHONY: clean-local-check
436 -set x t/*.dir; shift; \
437 if test "$$#,$$1" = "1,*.dir"; then \
438 : there is no test directory to clean; \
440 find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
445 ## ---------------- ##
447 ## ---------------- ##
449 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
450 doc_automake_TEXINFOS = doc/fdl.texi
451 doc_automake_history_TEXINFOS = doc/fdl.texi
456 doc/aclocal-$(APIVERSION).1 \
457 doc/automake-$(APIVERSION).1
459 $(man1_MANS): $(srcdir)/configure.ac
461 CLEANFILES += $(man1_MANS)
462 EXTRA_DIST += doc/help2man
467 && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
469 && $(PERL) $(srcdir)/doc/help2man --output=$@
471 doc/aclocal.1 doc/automake.1:
474 && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
475 && echo ".so man1/$$f-$(APIVERSION).1" > $@
477 doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
478 $(update_mans) aclocal-$(APIVERSION)
479 doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
480 $(update_mans) automake-$(APIVERSION)
483 ## ---------------------------- ##
484 ## Example package "amhello". ##
485 ## ---------------------------- ##
488 doc/amhello/configure.ac \
489 doc/amhello/Makefile.am \
491 doc/amhello/src/main.c \
492 doc/amhello/src/Makefile.am
494 amhello_configury = \
505 dist_noinst_DATA = $(amhello_sources)
506 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
508 # We depend on configure.ac so that we regenerate the tarball
509 # whenever the Automake version changes.
510 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
511 # configure in 't/wrap'.
512 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
514 && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
516 && $(am__cd) $(srcdir)/doc/amhello \
517 && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
518 && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
519 && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
520 && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
521 && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
522 && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
523 && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
524 && $(am_AUTORECONF) -vfi \
526 && $(MAKE) $(AM_MAKEFLAGS) distcheck \
527 && $(MAKE) $(AM_MAKEFLAGS) distclean \
528 && rm -rf $(amhello_configury) \
529 && mv -f amhello-1.0.tar.gz ..
532 ## ------------------------------------------------- ##
533 ## Third-party, obsolescent or experimental stuff. ##
534 ## ------------------------------------------------- ##
537 contrib/check-html.am \
538 contrib/multilib/README \
539 contrib/multilib/config-ml.in \
540 contrib/multilib/symlink-tree \
541 contrib/multilib/multilib.am \
542 contrib/multilib/multi.m4 \
546 ## --------------------------------------------------- ##
547 ## Older files, kept mostly for historical interest. ##
548 ## --------------------------------------------------- ##
551 old/ChangeLog-tests \
564 ##########################################################################
566 ## Everything past here is useful to the maintainer, but probably not
569 ##########################################################################
572 ## --------------------------------------------------------- ##
573 ## Automatic generation of the ChangeLog from git history. ##
574 ## --------------------------------------------------------- ##
576 gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
577 gitlog_to_changelog_fixes = $(srcdir)/.git-log-fix
578 gitlog_to_changelog_options = --amend=$(gitlog_to_changelog_fixes) \
579 --since='2011-12-28 00:00:00' \
580 --no-cluster --format '%s%n%n%b'
582 EXTRA_DIST += lib/gitlog-to-changelog
583 EXTRA_DIST += $(gitlog_to_changelog_fixes)
585 # When executed from a git checkout, generate the ChangeLog from the git
586 # history. When executed from an extracted distribution tarball, just
587 # copy the distributed ChangeLog in the build directory (and if this
588 # fails, or if no distributed ChangeLog file is present, complain and
591 # We need the apparently useless dependency from another .PHONY target
592 # 'am--changelog-regen-hook' to work around a bug of Solaris make, which
593 # doesn't execute the recipe of a target named as an existing file, even
594 # if such target is declared '.PHONY' (yikes!)
596 .PHONY: am--changelog-regen-hook
597 am--changelog-regen-hook:
598 ChangeLog: am--changelog-regen-hook
599 $(AM_V_GEN)set -e; set -u; \
600 ## The ChangeLog should be regenerated unconditionally when working from
601 ## checked-out sources; otherwise, if we're working from a distribution
602 ## tarball, we expect the ChangeLog to be distributed, so check that it
603 ## is indeed present in the source directory.
604 if test -d $(srcdir)/.git; then \
606 && $(gitlog_to_changelog_command) \
607 $(gitlog_to_changelog_options) >$@-t \
611 elif test ! -f $(srcdir)/$@; then \
612 echo "Source tree is not a git checkout, and no pre-existent" \
613 "$@ file has been found there" >&2; \
617 # Ensure tests are world-executable.
618 # FIXME: this should be turned into a maintainer check...
620 $(am__cd) $(distdir)/t && chmod a+rx *.sh *.tap
623 ## --------------------------- ##
624 ## Perl coverage statistics. ##
625 ## --------------------------- ##
627 PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
628 PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
631 check-coverage-run recheck-coverage-run: all
632 $(mkinstalldirs) $(PERL_COVERAGE_DB)
633 PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
634 WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
635 $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
637 check-coverage-report:
638 @if test ! -d "$(PERL_COVERAGE_DB)"; then \
639 echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
640 echo "Please run \"make check-coverage\" first" >&2; \
643 $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
645 # We don't use direct dependencies here because we'd like to be able
646 # to invoke the report even after interrupted check-coverage.
647 check-coverage: check-coverage-run
648 $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
650 recheck-coverage: recheck-coverage-run
651 $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
654 rm -rf "$(PERL_COVERAGE_DB)"
655 clean-local: clean-coverage
657 .PHONY: check-coverage recheck-coverage check-coverage-run \
658 recheck-coverage-run check-coverage-report clean-coverage
661 ## ---------------------------------------------------- ##
662 ## Tagging and/or uploading stable and beta releases. ##
663 ## ---------------------------------------------------- ##
667 EXTRA_DIST += lib/gnupload
669 version_rx = ^[1-9][0-9]*\.[0-9][0-9]*(\.[0-9][0-9]*)?
670 stable_version_rx = $(version_rx)$$
671 beta_version_rx = $(version_rx)[bdfhjlnprtvxz]$$
672 match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
674 ## Check that we don't have uncommitted or unstaged changes.
675 ## TODO: Maybe the git suite already offers a shortcut to verify if the
676 ## TODO: working directory is "clean" or not? If yes, use that instead
677 ## TODO: of duplicating the logic here.
678 git_must_have_clean_workdir = \
679 $(GIT) rev-parse --verify HEAD >/dev/null \
680 && $(GIT) update-index -q --refresh \
681 && $(GIT) diff-files --quiet \
682 && $(GIT) diff-index --quiet --cached HEAD \
683 || fatal "you have uncommitted or unstaged changes"
685 determine_release_type = \
686 if $(match_version) '$(stable_version_rx)'; then \
687 release_type='Release' dest=ftp; \
688 elif $(match_version) '$(beta_version_rx)'; then \
689 release_type='Beta release' dest=alpha; \
691 fatal "invalid version '$(VERSION)' for a release"; \
694 git-tag-release: maintainer-check
696 fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \
697 case '$(AM_TAG_DRYRUN)' in \
698 ""|[nN]|[nN]o|NO) run="";; \
699 *) run="echo Running:";; \
701 $(determine_release_type); \
702 $(git_must_have_clean_workdir); \
703 ## If all was successful, tag the release in the local repository.
704 $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
708 fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \
709 $(determine_release_type); \
710 dest=$$dest.gnu.org:automake; \
711 $(git_must_have_clean_workdir); \
712 ## Check that we are releasing from a valid tag.
713 tag=`$(GIT) describe` \
714 && case $$tag in "v$(VERSION)") true;; *) false;; esac \
715 || fatal "you can only create a release from a tagged version"; \
716 ## Build and upload the distribution tarball(s).
717 $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \
718 echo Will upload to $$dest: $(DIST_ARCHIVES); \
719 $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES)
721 .PHONY: git-upload-release git-tag-release
724 ## ------------------------------------------------------------------ ##
725 ## Explore differences of autogenerated files in different commits. ##
726 ## ------------------------------------------------------------------ ##
728 ## Visually comparing differences between the Makefile.in files in
729 ## automake's own build system as generated in two different branches
730 ## might help to catch bugs and blunders. This has already happened a
731 ## few times in the past, when we used to version-control Makefile.in.
734 NEW_COMMIT=$${NEW_COMMIT-"HEAD"}; \
735 OLD_COMMIT=$${OLD_COMMIT-"HEAD~1"}; \
736 am_gitdir='$(abs_top_srcdir)/.git'; \
737 get_autofiles_from_rev () \
740 && echo "$@: will get files from revision $$rev" \
741 && $(GIT) clone -q --depth 1 "$$am_gitdir" tmp \
743 && $(GIT) checkout -q "$$rev" \
744 && echo "$@: bootstrapping $$rev" \
745 && $(SHELL) ./bootstrap.sh \
746 && echo "$@: copying files from $$rev" \
747 && makefile_ins=`find . -name Makefile.in` \
748 && (tar cf - configure aclocal.m4 $$makefile_ins) | \
749 (cd .. && $(am__cd) "$$dir" && tar xf -) \
754 ## Before proceeding, ensure the specified revisions truly exist.
755 && $(GIT) --git-dir="$$am_gitdir" describe $$OLD_COMMIT >/dev/null \
756 && $(GIT) --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
759 && $(am__cd) $$outdir \
761 && get_autofiles_from_rev $$OLD_COMMIT old \
762 && get_autofiles_from_rev $$NEW_COMMIT new \
765 ## With lots of eye candy; we like our developers pampered and spoiled :-)
766 compare-autodiffs: autodiffs
768 : $${COLORDIFF=colordiff} $${DIFF=diff}; \
770 if test ! -d "$$dir"; then \
771 echo "$@: $$dir: Not a directory" >&2; \
774 mydiff=false mypager=false; \
776 if ($$COLORDIFF -r . .) </dev/null >/dev/null 2>&1; then \
777 mydiff=$$COLORDIFF; \
785 if test "$$mydiff" = false; then \
786 if ($$DIFF -r -u . .); then \
789 echo "$@: no good-enough diff program specified" >&2; \
793 st=0; $$mydiff -r -u $$dir/old $$dir/new | $$mypager || st=$$?; \
796 .PHONY: autodiffs compare-autodiffs
799 ## --------------------------------------------------------------------- ##
800 ## Synchronize third-party files that are committed in our repository. ##
801 ## --------------------------------------------------------------------- ##
803 ## Program to use to fetch files.
805 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
806 WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
807 WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
808 WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
810 ## Files that we fetch and which we compare against.
811 ## The 'lib/COPYING' file must still be synced by hand.
817 gitlog-to-changelog \
821 ## Fetch the latest versions of files we care about.
823 rm -rf Fetchdir > /dev/null 2>&1
825 ## If a get fails then that is a problem.
826 ($(am__cd) Fetchdir && \
827 $(WGET_SV_GIT_CF)config.guess -O config.guess && \
828 $(WGET_SV_GIT_CF)config.sub -O config.sub && \
829 $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
830 $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
831 $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
832 $(WGET_SV_GIT_GL)build-aux/update-copyright -O update-copyright && \
833 $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
834 ## Don't exit after test because we want to give as many errors as
836 @stat=0; for file in $(FETCHFILES); do \
837 if diff -u $(srcdir)/lib/$$file Fetchdir/$$file \
838 >>Fetchdir/update.patch 2>/dev/null; then :; \
841 echo "Updating $(srcdir)/lib/$$file ..."; \
842 cp Fetchdir/$$file $(srcdir)/lib/$$file; \
846 echo "See Fetchdir/update.patch for a log of the changes."; \
851 ## ------------------------------------------------ ##
852 ## Update copyright years of all committed files. ##
853 ## ------------------------------------------------ ##
855 EXTRA_DIST += lib/update-copyright
857 update_copyright_env = \
858 UPDATE_COPYRIGHT_FORCE=1 \
859 UPDATE_COPYRIGHT_USE_INTERVALS=2
861 .PHONY: update-copyright
864 current_year=`date +%Y` && test -n "$$current_year" \
865 || { echo "$@: cannot get current year" >&2; exit 1; }; \
866 sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
867 bootstrap.sh configure.ac; \
868 excluded_re=`echo $(FETCHFILES) \
869 | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \
871 | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \
872 | grep -Ev "^($$excluded_re)$$" \
873 | $(update_copyright_env) xargs $(srcdir)/lib/$@