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