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)
76 ## Make versioned links. We only run the transform on the root name;
77 ## then we make a versioned link with the transformed base name. This
78 ## seemed like the most reasonable approach.
81 @for p in $(bin_SCRIPTS); do \
82 f="`echo $$p|sed '$(transform)'`"; \
83 fv="$$f-$(APIVERSION)"; \
84 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
85 echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
86 $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
90 @for p in $(bin_SCRIPTS); do \
91 f="`echo $$p|sed '$(transform)'`"; \
92 fv="$$f-$(APIVERSION)"; \
93 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
96 ## These files depend on Makefile so they are rebuilt if $(VERSION),
97 ## $(datadir) or other do_subst'ituted variables change.
100 automake aclocal: Makefile
101 $(AM_V_at)rm -f $@ $@-t
102 $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
103 ## We can't use '$(generated_file_finalize)' here, because currently
104 ## Automake contains occurrences of unexpanded @substitutions@ in
105 ## comments, and that is perfectly legit.
106 $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
108 ## The master location for INSTALL is lib/INSTALL.
109 ## This is where "make fetch" will install new versions.
110 ## Make sure we also update this copy.
112 $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
114 # We don't use the default name for the autom4te cache directory,
116 maintainer-clean-local:
117 rm -rf .autom4te.cache
120 ## -------------------------------------------------------------------- ##
121 ## Auxiliary scripts and files for use with "automake --add-missing". ##
122 ## -------------------------------------------------------------------- ##
124 dist_pkgvdata_DATA = \
129 ## These must all be executable when installed. However, if we use
130 ## _SCRIPTS, then the program transform will be applied, which is not
131 ## what we want. So we make them executable by hand.
151 @for f in $(dist_script_DATA); do echo $$f; done \
155 echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
156 chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
160 installcheck-local: installcheck-executable-scripts
161 installcheck-executable-scripts:
162 @for f in $(dist_script_DATA); do echo $$f; done \
165 path="$(pkgvdatadir)/$$f"; \
166 test -x "$$path" || echo $$path; \
168 | sed 's/$$/: not executable/' \
169 | grep . 1>&2 && exit 1; exit 0
172 ## ---------------------------------------------------- ##
173 ## Private perl modules used by automake and aclocal. ##
174 ## ---------------------------------------------------- ##
176 perllibdir = $(pkgvdatadir)/Automake
177 dist_perllib_DATA = \
178 lib/Automake/ChannelDefs.pm \
179 lib/Automake/Channels.pm \
180 lib/Automake/Condition.pm \
181 lib/Automake/Configure_ac.pm \
182 lib/Automake/DisjConditions.pm \
183 lib/Automake/FileUtils.pm \
184 lib/Automake/General.pm \
185 lib/Automake/Getopt.pm \
186 lib/Automake/Item.pm \
187 lib/Automake/ItemDef.pm \
188 lib/Automake/Location.pm \
189 lib/Automake/Options.pm \
190 lib/Automake/Rule.pm \
191 lib/Automake/RuleDef.pm \
192 lib/Automake/Variable.pm \
193 lib/Automake/VarDef.pm \
194 lib/Automake/Version.pm \
195 lib/Automake/XFile.pm \
198 nodist_perllib_DATA = lib/Automake/Config.pm
199 CLEANFILES += $(nodist_perllib_DATA)
201 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
202 $(AM_V_at)rm -f $@ $@-t
203 $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
204 $(AM_V_GEN)in=Config.in \
205 && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
206 $(generated_file_finalize)
207 EXTRA_DIST += lib/Automake/Config.in
210 ## --------------------- ##
211 ## Makefile fragments. ##
212 ## --------------------- ##
217 lib/am/clean-hdr.am \
220 lib/am/configure.am \
227 lib/am/header-vars.am \
230 lib/am/inst-vars.am \
232 lib/am/lang-compile.am \
239 lib/am/ltlibrary.am \
240 lib/am/mans-vars.am \
245 lib/am/remake-hdr.am \
249 lib/am/texi-vers.am \
250 lib/am/texibuild.am \
256 ## ------------------------------ ##
257 ## Automake-provided m4 macros. ##
258 ## ------------------------------ ##
260 dist_automake_ac_DATA = \
298 dist_system_ac_DATA = m4/acdir/README
300 # We build amversion.m4 here, instead of from config.status,
301 # because config.status is rerun each time one of configure's
302 # dependencies change and amversion.m4 happens to be a configure
303 # dependency. configure and amversion.m4 would be rebuilt in
305 # Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
306 # how amversion.m4 appears in our dependencies.
307 $(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
308 $(AM_V_at)rm -f $@-t $@
309 $(AM_V_GEN)in=amversion.in \
310 && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
311 $(generated_file_finalize)
312 EXTRA_DIST += m4/amversion.in
319 # Run the tests with a proper shell detected at configure time.
320 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
322 TEST_EXTENSIONS = .pl .sh .tap
323 SH_LOG_COMPILER = $(LOG_COMPILER)
324 TAP_LOG_COMPILER = $(LOG_COMPILER)
325 PL_LOG_COMPILER = $(PERL)
326 AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
328 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
330 AM_TAP_LOG_DRIVER_FLAGS = --merge
332 EXTRA_DIST += t/README t/ax/is t/ax/is_newest
334 TESTS = ## Will be updated later.
336 # Some testsuite-influential variables should be overridable from the
337 # test scripts, but not from the environment.
338 # Keep this in sync with the similar list in 'runtest.in'.
339 AM_TESTS_ENVIRONMENT = \
344 am_test_prefer_config_shell \
345 am_original_AUTOMAKE \
346 am_original_ACLOCAL \
347 am_test_lib_sourced \
350 eval test x"\$${$$v}" = x || unset $$v; \
352 # We want warning messages and explanations for skipped tests to go to
353 # the console if possible, so set up 'stderr_fileno_' properly.
354 AM_TESTS_FD_REDIRECT = 9>&2
355 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
357 # For sourcing of extra "shell libraries" by our test scripts. As per
358 # POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
359 # in case it is given with a relative name containing no slashes.
360 AM_TESTS_ENVIRONMENT += \
361 if test $(srcdir) != .; then \
362 PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
364 PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
367 # Hand-written tests.
369 include $(srcdir)/t/list-of-tests.mk
371 TESTS += $(handwritten_TESTS)
372 EXTRA_DIST += $(handwritten_TESTS)
374 # Automatically-generated tests wrapping hand-written ones.
375 # Also, automatically-computed dependencies for tests.
377 include $(srcdir)/t/testsuite-part.am
379 TESTS += $(generated_TESTS)
380 EXTRA_DIST += $(generated_TESTS)
382 $(srcdir)/t/testsuite-part.am:
383 $(AM_V_at)rm -f t/testsuite-part.tmp $@
384 $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
385 --srcdir $(srcdir) > t/testsuite-part.tmp
386 $(AM_V_at)chmod a-w t/testsuite-part.tmp
387 $(AM_V_at)mv -f t/testsuite-part.tmp $@
388 EXTRA_DIST += gen-testsuite-part
390 ## The dependecies declared here are not truly complete, but such
391 ## completeness would cause more issues than it would solve. See
392 ## automake bug#11347.
393 $(generated_TESTS): $(srcdir)/gen-testsuite-part
394 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
396 # Static dependencies valid for each test case (also further
397 # extended later). Note that use 'noinst_' rather than 'check_'
398 # as the prefix, because we really want them to be built by
399 # "make all". This makes it easier to run the test cases by
400 # hand after having simply configured and built the package.
402 nodist_noinst_SCRIPTS = \
403 t/wrap/aclocal-$(APIVERSION) \
404 t/wrap/automake-$(APIVERSION)
409 t/ax/am-test-lib.sh \
410 t/ax/tap-functions.sh
412 # Few more static dependencies.
413 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
414 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
415 EXTRA_DIST += t/ax/distcheck-hook-m4.am
417 t/ax/test-defs.sh: t/ax/test-defs.in Makefile
418 $(AM_V_at)rm -f $@ $@-t
419 $(AM_V_at)$(MKDIR_P) t/ax
420 $(AM_V_GEN)in=t/ax/test-defs.in \
421 && $(do_subst) <$(srcdir)/$$in >$@-t
422 $(generated_file_finalize)
423 EXTRA_DIST += t/ax/test-defs.in
424 CLEANFILES += t/ax/test-defs.sh
425 nodist_noinst_DATA = t/ax/test-defs.sh
427 noinst_SCRIPTS = # Will be updated soon.
429 t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
430 $(AM_V_at)rm -f $@ $@-t
431 $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
433 && $(do_subst) <$(srcdir)/$$in >$@-t \
435 $(generated_file_finalize)
436 EXTRA_DIST += t/ax/shell-no-trail-bslash.in
437 CLEANFILES += t/ax/shell-no-trail-bslash
438 noinst_SCRIPTS += t/ax/shell-no-trail-bslash
440 runtest: runtest.in Makefile
441 $(AM_V_at)rm -f $@ $@-t
442 $(AM_V_GEN)in=runtest.in \
444 && $(do_subst) <$(srcdir)/runtest.in >$@-t \
446 $(generated_file_finalize)
447 EXTRA_DIST += runtest.in
448 CLEANFILES += runtest
449 noinst_SCRIPTS += runtest
451 # If two test scripts have the same basename, they will end up sharing
452 # the same log file, leading to all sort of undefined and undesired
454 check-no-repeated-test-name:
455 @LC_ALL=C; export LC_ALL; \
456 lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
457 | sort | uniq -c | awk '($$1 > 1) { print }' \
458 | sed 's/\.log$$//' | grep . >&2 \
460 echo $@: test names listed above are duplicated >&2; \
463 check-local: check-no-repeated-test-name
464 .PHONY: check-no-repeated-test-name
466 # Check that our test cases are syntactically correct.
467 # See automake bug#11898.
470 err () { echo "$@: $$*" >&2; st=1; }; \
471 ## The user might do something like "make check TESTS=t/foo" or
472 ## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
473 ## 't/foo.sh' to be run; this has worked well until today, and
474 ## we want to continue supporting this use case.
475 bases=`for log in : $(TEST_LOGS); do echo $$log; done \
476 | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
477 for bas in $$bases; do \
478 for suf in sh tap pl; do \
480 ## Emulate VPATH search.
481 if test -f $$tst; then \
483 elif test -f $(srcdir)/$$tst; then \
484 tst=$(srcdir)/$$tst; \
490 test -n "$$tst" || err "couldn't find test '$$bas'"; \
491 ## Don't check that perl tests are valid shell scripts!
492 test $$suf = pl && continue; \
493 $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
494 $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
495 || err "test '$$tst' syntactically invalid"; \
498 check-local: check-tests-syntax
499 .PHONY: check-tests-syntax
501 # Recipes with a trailing backslash character (possibly followed by
502 # blank characters only) can cause spurious syntax errors with at
503 # least older bash versions (e.g., bash 2.05b), and can be potentially
504 # be unportable to other weaker shells. Run the testsuite in a way
505 # that helps catching such problems in Automake-generated recipes.
506 # See automake bug#10436.
507 check-no-trailing-backslash-in-recipes:
508 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
509 CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
510 .PHONY: check-no-trailing-backslash-in-recipes
512 ## Checking the list of tests.
513 test_subdirs = t t/pm
514 include $(srcdir)/t/CheckListOfTests.am
516 # Run the testsuite with the installed aclocal and automake.
517 installcheck-local: installcheck-testsuite
518 installcheck-testsuite:
519 am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
524 $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
525 TESTS='$(perf_TESTS)' check
526 PERF_TEST_SUITE_LOG = t/perf/test-suite.log
527 CLEANFILES += $(PERF_TEST_SUITE_LOG)
528 EXTRA_DIST += $(perf_TESTS)
530 clean-local: clean-local-check
531 .PHONY: clean-local-check
533 -set x t/*.dir; shift; \
534 if test "$$#,$$1" = "1,*.dir"; then \
535 : there is no test directory to clean; \
537 find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
542 ## ---------------- ##
544 ## ---------------- ##
546 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
547 doc_automake_TEXINFOS = doc/fdl.texi
548 doc_automake_history_TEXINFOS = doc/fdl.texi
553 doc/aclocal-$(APIVERSION).1 \
554 doc/automake-$(APIVERSION).1
556 $(man1_MANS): $(srcdir)/configure.ac
558 CLEANFILES += $(man1_MANS)
559 EXTRA_DIST += doc/help2man
564 && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
566 && $(PERL) $(srcdir)/doc/help2man --output=$@
568 doc/aclocal.1 doc/automake.1:
571 && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
572 && echo ".so man1/$$f-$(APIVERSION).1" > $@
574 doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
575 $(update_mans) aclocal-$(APIVERSION)
576 doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
577 $(update_mans) automake-$(APIVERSION)
580 ## ---------------------------- ##
581 ## Example package "amhello". ##
582 ## ---------------------------- ##
585 doc/amhello/configure.ac \
586 doc/amhello/Makefile.am \
588 doc/amhello/src/main.c \
589 doc/amhello/src/Makefile.am
591 amhello_configury = \
602 dist_noinst_DATA += $(amhello_sources)
603 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
605 # We depend on configure.ac so that we regenerate the tarball
606 # whenever the Automake version changes.
607 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
608 # configure in 't/wrap'.
609 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
611 && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
613 && $(am__cd) $(srcdir)/doc/amhello \
614 && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
615 && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
616 && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
617 && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
618 && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
619 && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
620 && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
621 && $(am_AUTORECONF) -vfi \
623 && $(MAKE) $(AM_MAKEFLAGS) distcheck \
624 && $(MAKE) $(AM_MAKEFLAGS) distclean \
625 && rm -rf $(amhello_configury) \
626 && mv -f amhello-1.0.tar.gz ..
629 ## ------------------------------------------------- ##
630 ## Third-party, obsolescent or experimental stuff. ##
631 ## ------------------------------------------------- ##
634 contrib/check-html.am \
635 contrib/multilib/README \
636 contrib/multilib/config-ml.in \
637 contrib/multilib/symlink-tree \
638 contrib/multilib/multilib.am \
639 contrib/multilib/multi.m4 \
643 ## --------------------------------------------------- ##
644 ## Older files, kept mostly for historical interest. ##
645 ## --------------------------------------------------- ##
648 old/ChangeLog-tests \