plans: add the "PLANS" directory
[platform/upstream/automake.git] / Makefile.am
1 ## Process this file with automake to create Makefile.in
2
3 ## Makefile for Automake.
4
5 # Copyright (C) 1995-2013 Free Software Foundation, Inc.
6
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)
10 # any later version.
11
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.
16
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/>.
19
20 ## Might be updated later.
21 CLEANFILES =
22 DISTCLEANFILES =
23 MAINTAINERCLEANFILES =
24 EXTRA_DIST =
25
26 ## ------------ ##
27 ##  Top level.  ##
28 ## ------------ ##
29
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.
34 do_subst = ( sed \
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' \
49   )
50
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)"; \
57     exit 1; \
58   fi; \
59   chmod a-w $@-t && mv -f $@-t $@
60
61 bin_SCRIPTS = automake aclocal
62
63 CLEANFILES += $(bin_SCRIPTS)
64 AUTOMAKESOURCES = automake.in aclocal.in
65
66 TAGS_FILES = $(AUTOMAKESOURCES)
67
68 EXTRA_DIST += \
69   $(AUTOMAKESOURCES) \
70   bootstrap.sh \
71   GNUmakefile \
72   maint.mk \
73   syntax-checks.mk \
74   HACKING \
75   PLANS
76
77 # Make versioned links.  We only run the transform on the root name;
78 # then we make a versioned link with the transformed base name.  This
79 # seemed like the most reasonable approach.
80 install-exec-hook:
81         @$(POST_INSTALL)
82         @for p in $(bin_SCRIPTS); do \
83           f=`echo $$p | sed '$(transform)'`; \
84           fv="$$f-$(APIVERSION)"; \
85           rm -f "$(DESTDIR)$(bindir)/$$fv"; \
86           echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
87           $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
88         done
89
90 uninstall-hook:
91         @for p in $(bin_SCRIPTS); do \
92           f=`echo $$p | sed '$(transform)'`; \
93           fv="$$f-$(APIVERSION)"; \
94           rm -f "$(DESTDIR)$(bindir)/$$fv"; \
95         done
96
97 # These files depend on Makefile so they are rebuilt if $(VERSION),
98 # $(datadir) or other do_subst'ituted variables change.
99 automake: automake.in
100 aclocal: aclocal.in
101 automake aclocal: Makefile
102         $(AM_V_at)rm -f $@ $@-t
103         $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
104 ## We can't use '$(generated_file_finalize)' here, because currently
105 ## Automake contains occurrences of unexpanded @substitutions@ in
106 ## comments, and that is perfectly legit.
107         $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
108
109 # The master location for INSTALL is lib/INSTALL.
110 # This is where "make fetch" will install new versions.
111 # Make sure we also update this copy.
112 INSTALL: lib/INSTALL
113         $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
114
115 # We don't use the default name for the autom4te cache directory,
116 # so we need this.
117 maintainer-clean-local:
118         rm -rf .autom4te.cache
119
120 # So that automake won't complain about the missing ChangeLog.
121 # The real rule for ChangeLog generation is now in maint.mk (as
122 # it is maintainer-specific).
123 ChangeLog:
124
125
126 ## -------------------------------------------------------------------- ##
127 ##  Auxiliary scripts and files for use with "automake --add-missing".  ##
128 ## -------------------------------------------------------------------- ##
129
130 dist_pkgvdata_DATA = \
131   lib/COPYING \
132   lib/INSTALL \
133   lib/texinfo.tex
134
135 # These must all be executable when installed.  However, if we use
136 # _SCRIPTS, then the program transform will be applied, which is not
137 # what we want.  So we make them executable by hand.
138 dist_script_DATA = \
139   lib/config.guess \
140   lib/config.sub \
141   lib/install-sh \
142   lib/mdate-sh \
143   lib/missing \
144   lib/mkinstalldirs \
145   lib/ylwrap \
146   lib/depcomp \
147   lib/compile \
148   lib/py-compile \
149   lib/ar-lib \
150   lib/test-driver \
151   lib/tap-driver.sh \
152   lib/tap-driver.pl
153
154 install-data-hook:
155         @$(POST_INSTALL)
156         @for f in $(dist_script_DATA); do echo $$f; done \
157           | sed 's,^lib/,,' \
158           | ( st=0; \
159               while read f; do \
160                 echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
161                 chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
162               done; \
163               exit $$st )
164
165 installcheck-local: installcheck-executable-scripts
166 installcheck-executable-scripts:
167         @for f in $(dist_script_DATA); do echo $$f; done \
168           | sed 's,^lib/,,' \
169           | while read f; do \
170               path="$(pkgvdatadir)/$$f"; \
171               test -x "$$path" || echo $$path; \
172             done \
173           | sed 's/$$/: not executable/' \
174           | grep . 1>&2 && exit 1; exit 0
175
176
177 ## ---------------------------------------------------- ##
178 ##  Private perl modules used by automake and aclocal.  ##
179 ## ---------------------------------------------------- ##
180
181 perllibdir = $(pkgvdatadir)/Automake
182 dist_perllib_DATA = \
183   lib/Automake/ChannelDefs.pm \
184   lib/Automake/Channels.pm \
185   lib/Automake/Condition.pm \
186   lib/Automake/Configure_ac.pm \
187   lib/Automake/DisjConditions.pm \
188   lib/Automake/FileUtils.pm \
189   lib/Automake/General.pm \
190   lib/Automake/Getopt.pm \
191   lib/Automake/Item.pm \
192   lib/Automake/ItemDef.pm \
193   lib/Automake/Location.pm \
194   lib/Automake/Options.pm \
195   lib/Automake/Rule.pm \
196   lib/Automake/RuleDef.pm \
197   lib/Automake/Variable.pm \
198   lib/Automake/VarDef.pm \
199   lib/Automake/Version.pm \
200   lib/Automake/XFile.pm \
201   lib/Automake/Wrap.pm
202
203 nodist_perllib_DATA = lib/Automake/Config.pm
204 CLEANFILES += $(nodist_perllib_DATA)
205
206 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
207         $(AM_V_at)rm -f $@ $@-t
208         $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
209         $(AM_V_GEN)in=Config.in \
210           && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
211         $(generated_file_finalize)
212 EXTRA_DIST += lib/Automake/Config.in
213
214
215 ## --------------------- ##
216 ##  Makefile fragments.  ##
217 ## --------------------- ##
218
219 dist_am_DATA = \
220   lib/am/check.am \
221   lib/am/check2.am \
222   lib/am/clean-hdr.am \
223   lib/am/clean.am \
224   lib/am/compile.am \
225   lib/am/configure.am \
226   lib/am/data.am \
227   lib/am/dejagnu.am \
228   lib/am/depend.am \
229   lib/am/depend2.am \
230   lib/am/distdir.am \
231   lib/am/footer.am \
232   lib/am/header-vars.am \
233   lib/am/header.am \
234   lib/am/install.am \
235   lib/am/inst-vars.am \
236   lib/am/java.am \
237   lib/am/lang-compile.am \
238   lib/am/lex.am \
239   lib/am/library.am \
240   lib/am/libs.am \
241   lib/am/libtool.am \
242   lib/am/lisp.am \
243   lib/am/ltlib.am \
244   lib/am/ltlibrary.am \
245   lib/am/mans-vars.am \
246   lib/am/mans.am \
247   lib/am/program.am \
248   lib/am/progs.am \
249   lib/am/python.am \
250   lib/am/remake-hdr.am \
251   lib/am/scripts.am \
252   lib/am/subdirs.am \
253   lib/am/tags.am \
254   lib/am/texi-vers.am \
255   lib/am/texibuild.am \
256   lib/am/texinfos.am \
257   lib/am/vala.am \
258   lib/am/yacc.am
259
260
261 ## ------------------------------ ##
262 ##  Automake-provided m4 macros.  ##
263 ## ------------------------------ ##
264
265 dist_automake_ac_DATA = \
266   m4/amversion.m4 \
267   m4/ar-lib.m4 \
268   m4/as.m4 \
269   m4/auxdir.m4 \
270   m4/cond.m4 \
271   m4/cond-if.m4 \
272   m4/depend.m4 \
273   m4/depout.m4 \
274   m4/dmalloc.m4 \
275   m4/extra-recurs.m4 \
276   m4/gcj.m4 \
277   m4/init.m4 \
278   m4/install-sh.m4 \
279   m4/lead-dot.m4 \
280   m4/lex.m4 \
281   m4/lispdir.m4 \
282   m4/maintainer.m4 \
283   m4/make.m4 \
284   m4/minuso.m4 \
285   m4/missing.m4 \
286   m4/mkdirp.m4 \
287   m4/obsolete-err.m4 \
288   m4/options.m4 \
289   m4/python.m4 \
290   m4/runlog.m4 \
291   m4/sanity.m4 \
292   m4/silent.m4 \
293   m4/strip.m4 \
294   m4/substnot.m4 \
295   m4/tar.m4 \
296   m4/upc.m4 \
297   m4/vala.m4
298
299 automake_internal_acdir = $(automake_acdir)/internal
300 dist_automake_internal_ac_DATA = m4/internal/ac-config-macro-dirs.m4
301
302 dist_system_ac_DATA = m4/acdir/README
303
304 # We build amversion.m4 here, instead of from config.status,
305 # because config.status is rerun each time one of configure's
306 # dependencies change and amversion.m4 happens to be a configure
307 # dependency.  configure and amversion.m4 would be rebuilt in
308 # loop otherwise.
309 # Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
310 # how amversion.m4 appears in our dependencies.
311 $(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
312         $(AM_V_at)rm -f $@-t $@
313         $(AM_V_GEN)in=amversion.in \
314           && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
315         $(generated_file_finalize)
316 EXTRA_DIST += m4/amversion.in
317
318
319 ## ------------ ##
320 ##  Testsuite.  ##
321 ## ------------ ##
322
323 # Run the tests with a proper shell detected at configure time.
324 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
325
326 TEST_EXTENSIONS = .pl .sh .tap
327 SH_LOG_COMPILER = $(LOG_COMPILER)
328 TAP_LOG_COMPILER = $(LOG_COMPILER)
329 PL_LOG_COMPILER = $(PERL)
330 AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
331
332 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
333
334 AM_TAP_LOG_DRIVER_FLAGS = --merge
335
336 EXTRA_DIST += t/README t/ax/is t/ax/is_newest
337
338 ## Will be updated later.
339 TESTS =
340
341 # Some testsuite-influential variables should be overridable from the
342 # test scripts, but not from the environment.
343 # Keep this in sync with the similar list in 'runtest.in'.
344 AM_TESTS_ENVIRONMENT = \
345   for v in \
346     required \
347     am_test_protocol \
348     am_serial_tests \
349     am_test_prefer_config_shell \
350     am_original_AUTOMAKE \
351     am_original_ACLOCAL \
352     am_test_lib_sourced \
353     test_lib_sourced \
354   ; do \
355     eval test x"\$${$$v}" = x || unset $$v; \
356   done;
357 # We want warning messages and explanations for skipped tests to go to
358 # the console if possible, so set up 'stderr_fileno_' properly.
359 AM_TESTS_FD_REDIRECT = 9>&2
360 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
361
362 # For sourcing of extra "shell libraries" by our test scripts.  As per
363 # POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
364 # in case it is given with a relative name containing no slashes.
365 AM_TESTS_ENVIRONMENT += \
366   if test $(srcdir) != .; then \
367     PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
368   fi; \
369   PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
370   export PATH;
371
372 # Hand-written tests.
373
374 include $(srcdir)/t/list-of-tests.mk
375
376 TESTS += $(handwritten_TESTS)
377 EXTRA_DIST += $(handwritten_TESTS)
378
379 # Automatically-generated tests wrapping hand-written ones.
380 # Also, automatically-computed dependencies for tests.
381
382 include $(srcdir)/t/testsuite-part.am
383
384 TESTS += $(generated_TESTS)
385 EXTRA_DIST += $(generated_TESTS)
386
387 $(srcdir)/t/testsuite-part.am:
388         $(AM_V_at)rm -f t/testsuite-part.tmp $@
389         $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
390           --srcdir $(srcdir) > t/testsuite-part.tmp
391         $(AM_V_at)chmod a-w t/testsuite-part.tmp
392         $(AM_V_at)mv -f t/testsuite-part.tmp $@
393 EXTRA_DIST += gen-testsuite-part
394
395 # The dependecies declared here are not truly complete, but such
396 # completeness would cause more issues than it would solve.  See
397 # automake bug#11347.
398 $(generated_TESTS): $(srcdir)/gen-testsuite-part
399 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
400
401 # Hand-written tests for stuff in 'contrib/'.
402 include $(srcdir)/contrib/t/local.am
403 TESTS += $(contrib_TESTS)
404 EXTRA_DIST += $(contrib_TESTS)
405
406 # Static dependencies valid for each test case (also further
407 # extended later).  Note that use 'noinst_' rather than 'check_'
408 # as the prefix, because we really want them to be built by
409 # "make all".  This makes it easier to run the test cases by
410 # hand after having simply configured and built the package.
411
412 nodist_noinst_SCRIPTS = \
413   t/wrap/aclocal-$(APIVERSION) \
414   t/wrap/automake-$(APIVERSION)
415
416 dist_noinst_DATA = \
417   t/ax/test-init.sh \
418   t/ax/test-lib.sh \
419   t/ax/am-test-lib.sh \
420   t/ax/tap-functions.sh
421
422 # Few more static dependencies.
423 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
424 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
425 EXTRA_DIST += t/ax/distcheck-hook-m4.am
426
427 t/ax/test-defs.sh: t/ax/test-defs.in Makefile
428         $(AM_V_at)rm -f $@ $@-t
429         $(AM_V_at)$(MKDIR_P) t/ax
430         $(AM_V_GEN)in=t/ax/test-defs.in \
431           && $(do_subst) <$(srcdir)/$$in >$@-t
432         $(generated_file_finalize)
433 EXTRA_DIST += t/ax/test-defs.in
434 CLEANFILES += t/ax/test-defs.sh
435 nodist_noinst_DATA = t/ax/test-defs.sh
436
437 ## Will be updated soon.
438 noinst_SCRIPTS =
439
440 t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
441         $(AM_V_at)rm -f $@ $@-t
442         $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
443           && $(MKDIR_P) t/ax \
444           && $(do_subst) <$(srcdir)/$$in >$@-t \
445           && chmod a+x $@-t
446         $(generated_file_finalize)
447 EXTRA_DIST += t/ax/shell-no-trail-bslash.in
448 CLEANFILES += t/ax/shell-no-trail-bslash
449 noinst_SCRIPTS += t/ax/shell-no-trail-bslash
450
451 runtest: runtest.in Makefile
452         $(AM_V_at)rm -f $@ $@-t
453         $(AM_V_GEN)in=runtest.in \
454           && $(MKDIR_P) t/ax \
455           && $(do_subst) <$(srcdir)/runtest.in >$@-t \
456           && chmod a+x $@-t
457         $(generated_file_finalize)
458 EXTRA_DIST += runtest.in
459 CLEANFILES += runtest
460 noinst_SCRIPTS += runtest
461
462 # If two test scripts have the same basename, they will end up sharing
463 # the same log file, leading to all sort of undefined and undesired
464 # behaviours.
465 check-no-repeated-test-name:
466         @LC_ALL=C; export LC_ALL; \
467          lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
468            | sort | uniq -c | awk '($$1 > 1) { print }' \
469            | sed 's/\.log$$//' | grep . >&2 \
470            && { \
471              echo $@: test names listed above are duplicated >&2; \
472              exit 1; \
473            }; :
474 check-local: check-no-repeated-test-name
475 .PHONY: check-no-repeated-test-name
476
477 # Check that our test cases are syntactically correct.
478 # See automake bug#11898.
479 check-tests-syntax:
480         @st=0; \
481         err () { echo "$@: $$*" >&2; st=1; }; \
482 ## The user might do something like "make check TESTS=t/foo" or
483 ## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
484 ## 't/foo.sh' to be run; this has worked well until today, and
485 ## we want to continue supporting this use case.
486         bases=`for log in : $(TEST_LOGS); do echo $$log; done \
487           | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
488         for bas in $$bases; do \
489           for suf in sh tap pl; do \
490             tst=$$bas.$$suf; \
491 ## Emulate VPATH search.
492             if test -f $$tst; then \
493               break; \
494             elif test -f $(srcdir)/$$tst; then \
495               tst=$(srcdir)/$$tst; \
496               break; \
497             else \
498               tst=''; \
499             fi; \
500           done; \
501           test -n "$$tst" || err "couldn't find test '$$bas'"; \
502 ## Don't check that perl tests are valid shell scripts!
503           test $$suf = pl && continue; \
504           $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
505           $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
506             || err "test '$$tst' syntactically invalid"; \
507         done; \
508         exit $$st
509 check-local: check-tests-syntax
510 .PHONY: check-tests-syntax
511
512 # Recipes with a trailing backslash character (possibly followed by
513 # blank characters only) can cause spurious syntax errors with at
514 # least older bash versions (e.g., bash 2.05b), and can be potentially
515 # be unportable to other weaker shells.  Run the testsuite in a way
516 # that helps catching such problems in Automake-generated recipes.
517 # See automake bug#10436.
518 check-no-trailing-backslash-in-recipes:
519         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
520           CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
521 .PHONY: check-no-trailing-backslash-in-recipes
522
523 ## Checking the list of tests.
524 test_subdirs = t t/pm contrib/t
525 include $(srcdir)/t/CheckListOfTests.am
526
527 # Run the testsuite with the installed aclocal and automake.
528 installcheck-local: installcheck-testsuite
529 installcheck-testsuite:
530         am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
531
532 # Performance tests.
533 .PHONY: perf
534 perf: all
535         $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
536                                 TESTS='$(perf_TESTS)' check
537 PERF_TEST_SUITE_LOG = t/perf/test-suite.log
538 CLEANFILES += $(PERF_TEST_SUITE_LOG)
539 EXTRA_DIST += $(perf_TESTS)
540
541 clean-local: clean-local-check
542 .PHONY: clean-local-check
543 clean-local-check:
544 ## Directories candidate to be test directories match this wildcard.
545         @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
546 ## The 'nullglob' bash option is not portable, so use perl.
547         dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
548         if test -n "$$dirs"; then \
549 ## Errors in find are acceptable, errors in rm are not.
550             find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
551             echo " rm -rf $$dirs"; \
552             rm -rf $$dirs || exit 1; \
553         fi
554
555
556 ## ---------------- ##
557 ##  Documentation.  ##
558 ## ---------------- ##
559
560 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
561 doc_automake_TEXINFOS = doc/fdl.texi
562 doc_automake_history_TEXINFOS = doc/fdl.texi
563
564 man1_MANS = \
565   doc/aclocal.1 \
566   doc/automake.1 \
567   doc/aclocal-$(APIVERSION).1 \
568   doc/automake-$(APIVERSION).1
569
570 $(man1_MANS): $(srcdir)/configure.ac
571
572 CLEANFILES += $(man1_MANS)
573 EXTRA_DIST += doc/help2man
574
575 update_mans = \
576   $(AM_V_GEN): \
577     && $(MKDIR_P) doc \
578     && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
579     && export PATH \
580     && $(PERL) $(srcdir)/doc/help2man --output=$@
581
582 doc/aclocal.1 doc/automake.1:
583         $(AM_V_GEN): \
584           && $(MKDIR_P) doc \
585           && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
586           && echo ".so man1/$$f-$(APIVERSION).1" > $@
587
588 doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
589         $(update_mans) aclocal-$(APIVERSION)
590 doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
591         $(update_mans) automake-$(APIVERSION)
592
593
594 ## ---------------------------- ##
595 ##  Example package "amhello".  ##
596 ## ---------------------------- ##
597
598 amhello_sources = \
599   doc/amhello/configure.ac \
600   doc/amhello/Makefile.am \
601   doc/amhello/README \
602   doc/amhello/src/main.c \
603   doc/amhello/src/Makefile.am
604
605 amhello_configury = \
606   aclocal.m4 \
607   autom4te.cache \
608   Makefile.in \
609   config.h.in \
610   configure \
611   depcomp \
612   install-sh \
613   missing \
614   src/Makefile.in
615
616 dist_noinst_DATA += $(amhello_sources)
617 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
618
619 # We depend on configure.ac so that we regenerate the tarball
620 # whenever the Automake version changes.
621 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
622 # configure in 't/wrap'.
623 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
624         $(AM_V_GEN)tmp=amhello-output.tmp \
625           && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
626           && export PATH \
627           && $(am__cd) $(srcdir)/doc/amhello \
628           && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
629           && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
630           && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
631           && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
632           && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
633           && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
634           && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
635           && ( \
636             { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
637               && $(am_AUTORECONF) -vfi \
638               && ./configure \
639               && $(MAKE) $(AM_MAKEFLAGS) distcheck \
640               && $(MAKE) $(AM_MAKEFLAGS) distclean \
641               || { \
642                 if $(AM_V_P); then :; else \
643                   echo "$@: recipe failed." >&5; \
644                   echo "See file '`pwd`/$$tmp' for details" >&5; \
645                 fi; \
646                 exit 1; \
647               } \
648           ) \
649           && rm -rf $(amhello_configury) $$tmp \
650           && mv -f amhello-1.0.tar.gz ..
651
652
653 ## ------------------------------------------------- ##
654 ##  Third-party, obsolescent or experimental stuff.  ##
655 ## ------------------------------------------------- ##
656
657 EXTRA_DIST += \
658   contrib/check-html.am \
659   contrib/multilib/README \
660   contrib/multilib/config-ml.in \
661   contrib/multilib/symlink-tree \
662   contrib/multilib/multilib.am \
663   contrib/multilib/multi.m4 \
664   contrib/README
665
666
667 ## --------------------------------------------------- ##
668 ##  Older files, kept mostly for historical interest.  ##
669 ## --------------------------------------------------- ##
670
671 EXTRA_DIST += \
672   old/ChangeLog-tests \
673   old/ChangeLog.96 \
674   old/ChangeLog.98 \
675   old/ChangeLog.00 \
676   old/ChangeLog.01 \
677   old/ChangeLog.02 \
678   old/ChangeLog.03 \
679   old/ChangeLog.04 \
680   old/ChangeLog.09 \
681   old/ChangeLog.11 \
682   old/TODO
683
684 ## ---------------------------------------- ##
685 ##  Maintainer-specific files and scripts.  ##
686 ## ---------------------------------------- ##
687   
688 EXTRA_DIST += \
689   maint/am-ft \
690   maint/am-xft \
691   maint/rename-tests