1 ## Process this file with automake to create Makefile.in
3 ## Makefile for Automake.
5 # Copyright (C) 1995-2013 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)
74 # Make versioned links. We only run the transform on the root name;
75 # then we make a versioned link with the transformed base name. This
76 # seemed like the most reasonable approach.
79 @for p in $(bin_SCRIPTS); do \
80 f=`echo $$p | sed '$(transform)'`; \
81 fv="$$f-$(APIVERSION)"; \
82 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
83 echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
84 $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
88 @for p in $(bin_SCRIPTS); do \
89 f=`echo $$p | sed '$(transform)'`; \
90 fv="$$f-$(APIVERSION)"; \
91 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
94 # These files depend on Makefile so they are rebuilt if $(VERSION),
95 # $(datadir) or other do_subst'ituted variables change.
98 automake aclocal: Makefile
99 $(AM_V_at)rm -f $@ $@-t
100 $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
101 ## We can't use '$(generated_file_finalize)' here, because currently
102 ## Automake contains occurrences of unexpanded @substitutions@ in
103 ## comments, and that is perfectly legit.
104 $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
106 # The master location for INSTALL is lib/INSTALL.
107 # This is where "make fetch" will install new versions.
108 # Make sure we also update this copy.
110 $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
112 # We don't use the default name for the autom4te cache directory,
114 maintainer-clean-local:
115 rm -rf .autom4te.cache
117 # So that automake won't complain about the missing ChangeLog.
118 # The real rule for ChangeLog generation is now in main/maint.mk
119 # (as it is maintainer-specific).
123 ## -------------------------------------------------------------------- ##
124 ## Auxiliary scripts and files for use with "automake --add-missing". ##
125 ## -------------------------------------------------------------------- ##
127 dist_pkgvdata_DATA = \
132 # These must all be executable when installed. However, if we use
133 # _SCRIPTS, then the program transform will be applied, which is not
134 # what we want. So we make them executable by hand.
153 @for f in $(dist_script_DATA); do echo $$f; done \
157 echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
158 chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
162 installcheck-local: installcheck-executable-scripts
163 installcheck-executable-scripts:
164 @for f in $(dist_script_DATA); do echo $$f; done \
167 path="$(pkgvdatadir)/$$f"; \
168 test -x "$$path" || echo $$path; \
170 | sed 's/$$/: not executable/' \
171 | grep . 1>&2 && exit 1; exit 0
174 ## ---------------------------------------------------- ##
175 ## Private perl modules used by automake and aclocal. ##
176 ## ---------------------------------------------------- ##
178 perllibdir = $(pkgvdatadir)/Automake
179 dist_perllib_DATA = \
180 lib/Automake/ChannelDefs.pm \
181 lib/Automake/Channels.pm \
182 lib/Automake/Condition.pm \
183 lib/Automake/Configure_ac.pm \
184 lib/Automake/DisjConditions.pm \
185 lib/Automake/FileUtils.pm \
186 lib/Automake/General.pm \
187 lib/Automake/Getopt.pm \
188 lib/Automake/Item.pm \
189 lib/Automake/ItemDef.pm \
190 lib/Automake/Location.pm \
191 lib/Automake/Options.pm \
192 lib/Automake/Rule.pm \
193 lib/Automake/RuleDef.pm \
194 lib/Automake/Variable.pm \
195 lib/Automake/VarDef.pm \
196 lib/Automake/Version.pm \
197 lib/Automake/XFile.pm \
200 nodist_perllib_DATA = lib/Automake/Config.pm
201 CLEANFILES += $(nodist_perllib_DATA)
203 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
204 $(AM_V_at)rm -f $@ $@-t
205 $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
206 $(AM_V_GEN)in=Config.in \
207 && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
208 $(generated_file_finalize)
209 EXTRA_DIST += lib/Automake/Config.in
212 ## --------------------- ##
213 ## Makefile fragments. ##
214 ## --------------------- ##
219 lib/am/clean-hdr.am \
222 lib/am/configure.am \
229 lib/am/header-vars.am \
232 lib/am/inst-vars.am \
234 lib/am/lang-compile.am \
241 lib/am/ltlibrary.am \
242 lib/am/mans-vars.am \
247 lib/am/remake-hdr.am \
251 lib/am/texi-vers.am \
252 lib/am/texibuild.am \
258 ## ------------------------------ ##
259 ## Automake-provided m4 macros. ##
260 ## ------------------------------ ##
262 dist_automake_ac_DATA = \
296 automake_internal_acdir = $(automake_acdir)/internal
297 dist_automake_internal_ac_DATA = m4/internal/ac-config-macro-dirs.m4
299 dist_system_ac_DATA = m4/acdir/README
301 # We build amversion.m4 here, instead of from config.status,
302 # because config.status is rerun each time one of configure's
303 # dependencies change and amversion.m4 happens to be a configure
304 # dependency. configure and amversion.m4 would be rebuilt in
306 # Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
307 # how amversion.m4 appears in our dependencies.
308 $(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
309 $(AM_V_at)rm -f $@-t $@
310 $(AM_V_GEN)in=amversion.in \
311 && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
312 $(generated_file_finalize)
313 EXTRA_DIST += m4/amversion.in
320 # Run the tests with a proper shell detected at configure time.
321 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
323 TEST_EXTENSIONS = .pl .sh .tap
324 SH_LOG_COMPILER = $(LOG_COMPILER)
325 TAP_LOG_COMPILER = $(LOG_COMPILER)
326 PL_LOG_COMPILER = $(PERL)
327 AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
329 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
331 AM_TAP_LOG_DRIVER_FLAGS = --merge
333 EXTRA_DIST += t/README t/ax/is t/ax/is_newest
335 ## Will be updated later.
338 # Some testsuite-influential variables should be overridable from the
339 # test scripts, but not from the environment.
340 # Keep this in sync with the similar list in 'runtest.in'.
341 AM_TESTS_ENVIRONMENT = \
346 am_test_prefer_config_shell \
347 am_original_AUTOMAKE \
348 am_original_ACLOCAL \
349 am_test_lib_sourced \
352 eval test x"\$${$$v}" = x || unset $$v; \
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 # For sourcing of extra "shell libraries" by our test scripts. As per
360 # POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
361 # in case it is given with a relative name containing no slashes.
362 AM_TESTS_ENVIRONMENT += \
363 if test $(srcdir) != .; then \
364 PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
366 PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
369 # Hand-written tests.
371 include $(srcdir)/t/list-of-tests.mk
373 TESTS += $(handwritten_TESTS)
374 EXTRA_DIST += $(handwritten_TESTS)
376 # Automatically-generated tests wrapping hand-written ones.
377 # Also, automatically-computed dependencies for tests.
379 include $(srcdir)/t/testsuite-part.am
381 TESTS += $(generated_TESTS)
382 EXTRA_DIST += $(generated_TESTS)
384 $(srcdir)/t/testsuite-part.am:
385 $(AM_V_at)rm -f t/testsuite-part.tmp $@
386 $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
387 --srcdir $(srcdir) > t/testsuite-part.tmp
388 $(AM_V_at)chmod a-w t/testsuite-part.tmp
389 $(AM_V_at)mv -f t/testsuite-part.tmp $@
390 EXTRA_DIST += gen-testsuite-part
392 # The dependecies declared here are not truly complete, but such
393 # completeness would cause more issues than it would solve. See
394 # automake bug#11347.
395 $(generated_TESTS): $(srcdir)/gen-testsuite-part
396 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
398 # Hand-written tests for stuff in 'contrib/'.
399 include $(srcdir)/contrib/t/local.am
400 TESTS += $(contrib_TESTS)
401 EXTRA_DIST += $(contrib_TESTS)
403 # Static dependencies valid for each test case (also further
404 # extended later). Note that use 'noinst_' rather than 'check_'
405 # as the prefix, because we really want them to be built by
406 # "make all". This makes it easier to run the test cases by
407 # hand after having simply configured and built the package.
409 nodist_noinst_SCRIPTS = \
410 t/wrap/aclocal-$(APIVERSION) \
411 t/wrap/automake-$(APIVERSION)
416 t/ax/am-test-lib.sh \
417 t/ax/tap-functions.sh
419 # Few more static dependencies.
420 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
421 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
422 EXTRA_DIST += t/ax/distcheck-hook-m4.am
424 t/ax/test-defs.sh: t/ax/test-defs.in Makefile
425 $(AM_V_at)rm -f $@ $@-t
426 $(AM_V_at)$(MKDIR_P) t/ax
427 $(AM_V_GEN)in=t/ax/test-defs.in \
428 && $(do_subst) <$(srcdir)/$$in >$@-t
429 $(generated_file_finalize)
430 EXTRA_DIST += t/ax/test-defs.in
431 CLEANFILES += t/ax/test-defs.sh
432 nodist_noinst_DATA = t/ax/test-defs.sh
434 ## Will be updated soon.
437 t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
438 $(AM_V_at)rm -f $@ $@-t
439 $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
441 && $(do_subst) <$(srcdir)/$$in >$@-t \
443 $(generated_file_finalize)
444 EXTRA_DIST += t/ax/shell-no-trail-bslash.in
445 CLEANFILES += t/ax/shell-no-trail-bslash
446 noinst_SCRIPTS += t/ax/shell-no-trail-bslash
448 runtest: runtest.in Makefile
449 $(AM_V_at)rm -f $@ $@-t
450 $(AM_V_GEN)in=runtest.in \
452 && $(do_subst) <$(srcdir)/runtest.in >$@-t \
454 $(generated_file_finalize)
455 EXTRA_DIST += runtest.in
456 CLEANFILES += runtest
457 noinst_SCRIPTS += runtest
459 # If two test scripts have the same basename, they will end up sharing
460 # the same log file, leading to all sort of undefined and undesired
462 check-no-repeated-test-name:
463 @LC_ALL=C; export LC_ALL; \
464 lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
465 | sort | uniq -c | awk '($$1 > 1) { print }' \
466 | sed 's/\.log$$//' | grep . >&2 \
468 echo $@: test names listed above are duplicated >&2; \
471 check-local: check-no-repeated-test-name
472 .PHONY: check-no-repeated-test-name
474 # Check that our test cases are syntactically correct.
475 # See automake bug#11898.
478 err () { echo "$@: $$*" >&2; st=1; }; \
479 ## The user might do something like "make check TESTS=t/foo" or
480 ## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
481 ## 't/foo.sh' to be run; this has worked well until today, and
482 ## we want to continue supporting this use case.
483 bases=`for log in : $(TEST_LOGS); do echo $$log; done \
484 | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
485 for bas in $$bases; do \
486 for suf in sh tap pl; do \
488 ## Emulate VPATH search.
489 if test -f $$tst; then \
491 elif test -f $(srcdir)/$$tst; then \
492 tst=$(srcdir)/$$tst; \
498 test -n "$$tst" || err "couldn't find test '$$bas'"; \
499 ## Don't check that perl tests are valid shell scripts!
500 test $$suf = pl && continue; \
501 $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
502 $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
503 || err "test '$$tst' syntactically invalid"; \
506 check-local: check-tests-syntax
507 .PHONY: check-tests-syntax
509 # Recipes with a trailing backslash character (possibly followed by
510 # blank characters only) can cause spurious syntax errors with at
511 # least older bash versions (e.g., bash 2.05b), and can be potentially
512 # be unportable to other weaker shells. Run the testsuite in a way
513 # that helps catching such problems in Automake-generated recipes.
514 # See automake bug#10436.
515 check-no-trailing-backslash-in-recipes:
516 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
517 CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
518 .PHONY: check-no-trailing-backslash-in-recipes
520 ## Checking the list of tests.
521 test_subdirs = t t/pm contrib/t
522 include $(srcdir)/t/CheckListOfTests.am
524 # Run the testsuite with the installed aclocal and automake.
525 installcheck-local: installcheck-testsuite
526 installcheck-testsuite:
527 am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
532 $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
533 TESTS='$(perf_TESTS)' check
534 PERF_TEST_SUITE_LOG = t/perf/test-suite.log
535 CLEANFILES += $(PERF_TEST_SUITE_LOG)
536 EXTRA_DIST += $(perf_TESTS)
538 clean-local: clean-local-check
539 .PHONY: clean-local-check
541 ## Directories candidate to be test directories match this wildcard.
542 @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
543 ## The 'nullglob' bash option is not portable, so use perl.
544 dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
545 if test -n "$$dirs"; then \
546 ## Errors in find are acceptable, errors in rm are not.
547 find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
548 echo " rm -rf $$dirs"; \
549 rm -rf $$dirs || exit 1; \
553 ## ---------------- ##
555 ## ---------------- ##
557 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
558 doc_automake_TEXINFOS = doc/fdl.texi
559 doc_automake_history_TEXINFOS = doc/fdl.texi
564 doc/aclocal-$(APIVERSION).1 \
565 doc/automake-$(APIVERSION).1
567 $(man1_MANS): $(srcdir)/configure.ac
569 CLEANFILES += $(man1_MANS)
570 EXTRA_DIST += doc/help2man
575 && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
577 && $(PERL) $(srcdir)/doc/help2man --output=$@
579 doc/aclocal.1 doc/automake.1:
582 && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
583 && echo ".so man1/$$f-$(APIVERSION).1" > $@
585 doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
586 $(update_mans) aclocal-$(APIVERSION)
587 doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
588 $(update_mans) automake-$(APIVERSION)
591 ## ---------------------------- ##
592 ## Example package "amhello". ##
593 ## ---------------------------- ##
596 doc/amhello/configure.ac \
597 doc/amhello/Makefile.am \
599 doc/amhello/src/main.c \
600 doc/amhello/src/Makefile.am
602 amhello_configury = \
613 dist_noinst_DATA += $(amhello_sources)
614 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
616 # We depend on configure.ac so that we regenerate the tarball
617 # whenever the Automake version changes.
618 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
619 # configure in 't/wrap'.
620 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
621 $(AM_V_GEN)tmp=amhello-output.tmp \
622 && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
624 && $(am__cd) $(srcdir)/doc/amhello \
625 && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
626 && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
627 && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
628 && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
629 && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
630 && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
631 && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
633 { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
634 && $(am_AUTORECONF) -vfi \
636 && $(MAKE) $(AM_MAKEFLAGS) distcheck \
637 && $(MAKE) $(AM_MAKEFLAGS) distclean \
639 if $(AM_V_P); then :; else \
640 echo "$@: recipe failed." >&5; \
641 echo "See file '`pwd`/$$tmp' for details" >&5; \
646 && rm -rf $(amhello_configury) $$tmp \
647 && mv -f amhello-1.0.tar.gz ..
650 ## ------------------------------------------------- ##
651 ## Third-party, obsolescent or experimental stuff. ##
652 ## ------------------------------------------------- ##
655 contrib/check-html.am \
656 contrib/multilib/README \
657 contrib/multilib/config-ml.in \
658 contrib/multilib/symlink-tree \
659 contrib/multilib/multilib.am \
660 contrib/multilib/multi.m4 \
664 ## --------------------------------------------------- ##
665 ## Older files, kept mostly for historical interest. ##
666 ## --------------------------------------------------- ##
669 old/ChangeLog-tests \
681 ## ---------------------------------------- ##
682 ## Maintainer-specific files and scripts. ##
683 ## ---------------------------------------- ##
690 maint/syntax-checks.mk