Merge branch '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-2012 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   syntax-checks.mk \
73   HACKING
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
119 ## -------------------------------------------------------------------- ##
120 ##  Auxiliary scripts and files for use with "automake --add-missing".  ##
121 ## -------------------------------------------------------------------- ##
122
123 dist_pkgvdata_DATA = \
124   lib/COPYING \
125   lib/INSTALL \
126   lib/texinfo.tex
127
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.
131 dist_script_DATA = \
132   lib/config.guess \
133   lib/config.sub \
134   lib/install-sh \
135   lib/mdate-sh \
136   lib/missing \
137   lib/mkinstalldirs \
138   lib/ylwrap \
139   lib/depcomp \
140   lib/compile \
141   lib/py-compile \
142   lib/ar-lib \
143   lib/test-driver \
144   lib/tap-driver.sh \
145   lib/tap-driver.pl
146
147 install-data-hook:
148         @$(POST_INSTALL)
149         @for f in $(dist_script_DATA); do echo $$f; done \
150           | sed 's,^lib/,,' \
151           | ( st=0; \
152               while read f; do \
153                 echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
154                 chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
155               done; \
156               exit $$st )
157
158 installcheck-local: installcheck-executable-scripts
159 installcheck-executable-scripts:
160         @for f in $(dist_script_DATA); do echo $$f; done \
161           | sed 's,^lib/,,' \
162           | while read f; do \
163               path="$(pkgvdatadir)/$$f"; \
164               test -x "$$path" || echo $$path; \
165             done \
166           | sed 's/$$/: not executable/' \
167           | grep . 1>&2 && exit 1; exit 0
168
169
170 ## ---------------------------------------------------- ##
171 ##  Private perl modules used by automake and aclocal.  ##
172 ## ---------------------------------------------------- ##
173
174 perllibdir = $(pkgvdatadir)/Automake
175 dist_perllib_DATA = \
176   lib/Automake/ChannelDefs.pm \
177   lib/Automake/Channels.pm \
178   lib/Automake/Condition.pm \
179   lib/Automake/Configure_ac.pm \
180   lib/Automake/DisjConditions.pm \
181   lib/Automake/FileUtils.pm \
182   lib/Automake/General.pm \
183   lib/Automake/Getopt.pm \
184   lib/Automake/Item.pm \
185   lib/Automake/ItemDef.pm \
186   lib/Automake/Location.pm \
187   lib/Automake/Options.pm \
188   lib/Automake/Rule.pm \
189   lib/Automake/RuleDef.pm \
190   lib/Automake/Variable.pm \
191   lib/Automake/VarDef.pm \
192   lib/Automake/Version.pm \
193   lib/Automake/XFile.pm \
194   lib/Automake/Wrap.pm
195
196 nodist_perllib_DATA = lib/Automake/Config.pm
197 CLEANFILES += $(nodist_perllib_DATA)
198
199 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
200         $(AM_V_at)rm -f $@ $@-t
201         $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
202         $(AM_V_GEN)in=Config.in \
203           && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
204         $(generated_file_finalize)
205 EXTRA_DIST += lib/Automake/Config.in
206
207
208 ## --------------------- ##
209 ##  Makefile fragments.  ##
210 ## --------------------- ##
211
212 dist_am_DATA = \
213   lib/am/check.am \
214   lib/am/check2.am \
215   lib/am/clean-hdr.am \
216   lib/am/clean.am \
217   lib/am/compile.am \
218   lib/am/configure.am \
219   lib/am/data.am \
220   lib/am/dejagnu.am \
221   lib/am/depend.am \
222   lib/am/depend2.am \
223   lib/am/distdir.am \
224   lib/am/footer.am \
225   lib/am/header-vars.am \
226   lib/am/header.am \
227   lib/am/install.am \
228   lib/am/inst-vars.am \
229   lib/am/java.am \
230   lib/am/lang-compile.am \
231   lib/am/lex.am \
232   lib/am/library.am \
233   lib/am/libs.am \
234   lib/am/libtool.am \
235   lib/am/lisp.am \
236   lib/am/ltlib.am \
237   lib/am/ltlibrary.am \
238   lib/am/mans-vars.am \
239   lib/am/mans.am \
240   lib/am/program.am \
241   lib/am/progs.am \
242   lib/am/python.am \
243   lib/am/remake-hdr.am \
244   lib/am/scripts.am \
245   lib/am/subdirs.am \
246   lib/am/tags.am \
247   lib/am/texi-vers.am \
248   lib/am/texibuild.am \
249   lib/am/texinfos.am \
250   lib/am/vala.am \
251   lib/am/yacc.am
252
253
254 ## ------------------------------ ##
255 ##  Automake-provided m4 macros.  ##
256 ## ------------------------------ ##
257
258 dist_automake_ac_DATA = \
259   m4/amversion.m4 \
260   m4/ar-lib.m4 \
261   m4/as.m4 \
262   m4/auxdir.m4 \
263   m4/cond.m4 \
264   m4/cond-if.m4 \
265   m4/depend.m4 \
266   m4/depout.m4 \
267   m4/dmalloc.m4 \
268   m4/extra-recurs.m4 \
269   m4/gcj.m4 \
270   m4/init.m4 \
271   m4/install-sh.m4 \
272   m4/lead-dot.m4 \
273   m4/lex.m4 \
274   m4/lispdir.m4 \
275   m4/maintainer.m4 \
276   m4/make.m4 \
277   m4/minuso.m4 \
278   m4/missing.m4 \
279   m4/mkdirp.m4 \
280   m4/options.m4 \
281   m4/protos.m4 \
282   m4/python.m4 \
283   m4/runlog.m4 \
284   m4/sanity.m4 \
285   m4/silent.m4 \
286   m4/strip.m4 \
287   m4/substnot.m4 \
288   m4/tar.m4 \
289   m4/upc.m4 \
290   m4/vala.m4
291
292 automake_internal_acdir = $(automake_acdir)/internal
293 dist_automake_internal_ac_DATA = m4/internal/ac-config-macro-dirs.m4
294
295 dist_system_ac_DATA = m4/acdir/README
296
297 # We build amversion.m4 here, instead of from config.status,
298 # because config.status is rerun each time one of configure's
299 # dependencies change and amversion.m4 happens to be a configure
300 # dependency.  configure and amversion.m4 would be rebuilt in
301 # loop otherwise.
302 # Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
303 # how amversion.m4 appears in our dependencies.
304 $(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
305         $(AM_V_at)rm -f $@-t $@
306         $(AM_V_GEN)in=amversion.in \
307           && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
308         $(generated_file_finalize)
309 EXTRA_DIST += m4/amversion.in
310
311
312 ## ------------ ##
313 ##  Testsuite.  ##
314 ## ------------ ##
315
316 # Run the tests with a proper shell detected at configure time.
317 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
318
319 TEST_EXTENSIONS = .pl .sh .tap
320 SH_LOG_COMPILER = $(LOG_COMPILER)
321 TAP_LOG_COMPILER = $(LOG_COMPILER)
322 PL_LOG_COMPILER = $(PERL)
323 AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
324
325 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
326
327 AM_TAP_LOG_DRIVER_FLAGS = --merge
328
329 EXTRA_DIST += t/README t/ax/is t/ax/is_newest
330
331 TESTS = ## Will be updated later.
332
333 # Some testsuite-influential variables should be overridable from the
334 # test scripts, but not from the environment.
335 # Keep this in sync with the similar list in 'runtest.in'.
336 AM_TESTS_ENVIRONMENT = \
337   for v in \
338     required \
339     am_test_protocol \
340     am_serial_tests \
341     am_test_prefer_config_shell \
342     am_original_AUTOMAKE \
343     am_original_ACLOCAL \
344     am_test_lib_sourced \
345     test_lib_sourced \
346   ; do \
347     eval test x"\$${$$v}" = x || unset $$v; \
348   done;
349 # We want warning messages and explanations for skipped tests to go to
350 # the console if possible, so set up 'stderr_fileno_' properly.
351 AM_TESTS_FD_REDIRECT = 9>&2
352 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
353
354 # For sourcing of extra "shell libraries" by our test scripts.  As per
355 # POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
356 # in case it is given with a relative name containing no slashes.
357 AM_TESTS_ENVIRONMENT += \
358   if test $(srcdir) != .; then \
359     PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
360   fi; \
361   PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
362   export PATH;
363
364 # Hand-written tests.
365
366 include $(srcdir)/t/list-of-tests.mk
367
368 TESTS += $(handwritten_TESTS)
369 EXTRA_DIST += $(handwritten_TESTS)
370
371 # Automatically-generated tests wrapping hand-written ones.
372 # Also, automatically-computed dependencies for tests.
373
374 include $(srcdir)/t/testsuite-part.am
375
376 TESTS += $(generated_TESTS)
377 EXTRA_DIST += $(generated_TESTS)
378
379 $(srcdir)/t/testsuite-part.am:
380         $(AM_V_at)rm -f t/testsuite-part.tmp $@
381         $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
382           --srcdir $(srcdir) > t/testsuite-part.tmp
383         $(AM_V_at)chmod a-w t/testsuite-part.tmp
384         $(AM_V_at)mv -f t/testsuite-part.tmp $@
385 EXTRA_DIST += gen-testsuite-part
386
387 ## The dependecies declared here are not truly complete, but such
388 ## completeness would cause more issues than it would solve.  See
389 ## automake bug#11347.
390 $(generated_TESTS): $(srcdir)/gen-testsuite-part
391 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
392
393 # Hand-written tests for stuff in 'contrib/'.
394 include $(srcdir)/contrib/t/local.am
395 TESTS += $(contrib_TESTS)
396 EXTRA_DIST += $(contrib_TESTS)
397
398 # Static dependencies valid for each test case (also further
399 # extended later).  Note that use 'noinst_' rather than 'check_'
400 # as the prefix, because we really want them to be built by
401 # "make all".  This makes it easier to run the test cases by
402 # hand after having simply configured and built the package.
403
404 nodist_noinst_SCRIPTS = \
405   t/wrap/aclocal-$(APIVERSION) \
406   t/wrap/automake-$(APIVERSION)
407
408 dist_noinst_DATA = \
409   t/ax/test-init.sh \
410   t/ax/test-lib.sh \
411   t/ax/am-test-lib.sh \
412   t/ax/tap-functions.sh
413
414 # Few more static dependencies.
415 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
416 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
417 EXTRA_DIST += t/ax/distcheck-hook-m4.am
418
419 t/ax/test-defs.sh: t/ax/test-defs.in Makefile
420         $(AM_V_at)rm -f $@ $@-t
421         $(AM_V_at)$(MKDIR_P) t/ax
422         $(AM_V_GEN)in=t/ax/test-defs.in \
423           && $(do_subst) <$(srcdir)/$$in >$@-t
424         $(generated_file_finalize)
425 EXTRA_DIST += t/ax/test-defs.in
426 CLEANFILES += t/ax/test-defs.sh
427 nodist_noinst_DATA = t/ax/test-defs.sh
428
429 noinst_SCRIPTS = # Will be updated soon.
430
431 t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
432         $(AM_V_at)rm -f $@ $@-t
433         $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
434           && $(MKDIR_P) t/ax \
435           && $(do_subst) <$(srcdir)/$$in >$@-t \
436           && chmod a+x $@-t
437         $(generated_file_finalize)
438 EXTRA_DIST += t/ax/shell-no-trail-bslash.in
439 CLEANFILES += t/ax/shell-no-trail-bslash
440 noinst_SCRIPTS += t/ax/shell-no-trail-bslash
441
442 runtest: runtest.in Makefile
443         $(AM_V_at)rm -f $@ $@-t
444         $(AM_V_GEN)in=runtest.in \
445           && $(MKDIR_P) t/ax \
446           && $(do_subst) <$(srcdir)/runtest.in >$@-t \
447           && chmod a+x $@-t
448         $(generated_file_finalize)
449 EXTRA_DIST += runtest.in
450 CLEANFILES += runtest
451 noinst_SCRIPTS += runtest
452
453 # If two test scripts have the same basename, they will end up sharing
454 # the same log file, leading to all sort of undefined and undesired
455 # behaviours.
456 check-no-repeated-test-name:
457         @LC_ALL=C; export LC_ALL; \
458          lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
459            | sort | uniq -c | awk '($$1 > 1) { print }' \
460            | sed 's/\.log$$//' | grep . >&2 \
461            && { \
462              echo $@: test names listed above are duplicated >&2; \
463              exit 1; \
464            }; :
465 check-local: check-no-repeated-test-name
466 .PHONY: check-no-repeated-test-name
467
468 # Check that our test cases are syntactically correct.
469 # See automake bug#11898.
470 check-tests-syntax:
471         @st=0; \
472         err () { echo "$@: $$*" >&2; st=1; }; \
473 ## The user might do something like "make check TESTS=t/foo" or
474 ## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
475 ## 't/foo.sh' to be run; this has worked well until today, and
476 ## we want to continue supporting this use case.
477         bases=`for log in : $(TEST_LOGS); do echo $$log; done \
478           | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
479         for bas in $$bases; do \
480           for suf in sh tap pl; do \
481             tst=$$bas.$$suf; \
482 ## Emulate VPATH search.
483             if test -f $$tst; then \
484               break; \
485             elif test -f $(srcdir)/$$tst; then \
486               tst=$(srcdir)/$$tst; \
487               break; \
488             else \
489               tst=''; \
490             fi; \
491           done; \
492           test -n "$$tst" || err "couldn't find test '$$bas'"; \
493 ## Don't check that perl tests are valid shell scripts!
494           test $$suf = pl && continue; \
495           $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
496           $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
497             || err "test '$$tst' syntactically invalid"; \
498         done; \
499         exit $$st
500 check-local: check-tests-syntax
501 .PHONY: check-tests-syntax
502
503 # Recipes with a trailing backslash character (possibly followed by
504 # blank characters only) can cause spurious syntax errors with at
505 # least older bash versions (e.g., bash 2.05b), and can be potentially
506 # be unportable to other weaker shells.  Run the testsuite in a way
507 # that helps catching such problems in Automake-generated recipes.
508 # See automake bug#10436.
509 check-no-trailing-backslash-in-recipes:
510         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
511           CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
512 .PHONY: check-no-trailing-backslash-in-recipes
513
514 ## Checking the list of tests.
515 test_subdirs = t t/pm contrib/t
516 include $(srcdir)/t/CheckListOfTests.am
517
518 # Run the testsuite with the installed aclocal and automake.
519 installcheck-local: installcheck-testsuite
520 installcheck-testsuite:
521         am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
522
523 # Performance tests.
524 .PHONY: perf
525 perf: all
526         $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
527                                 TESTS='$(perf_TESTS)' check
528 PERF_TEST_SUITE_LOG = t/perf/test-suite.log
529 CLEANFILES += $(PERF_TEST_SUITE_LOG)
530 EXTRA_DIST += $(perf_TESTS)
531
532 clean-local: clean-local-check
533 .PHONY: clean-local-check
534 clean-local-check:
535 ## Directories candidate to be test directories match this wildcard.
536         @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
537 ## The 'nullglob' bash option is not portable, so use perl.
538         dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
539         if test -n "$$dirs"; then \
540 ## Errors in find are acceptable, errors in rm are not.
541             find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
542             echo " rm -rf $$dirs"; \
543             rm -rf $$dirs || exit 1; \
544         fi
545
546
547 ## ---------------- ##
548 ##  Documentation.  ##
549 ## ---------------- ##
550
551 info_TEXINFOS = doc/automake.texi doc/automake-history.texi
552 doc_automake_TEXINFOS = doc/fdl.texi
553 doc_automake_history_TEXINFOS = doc/fdl.texi
554
555 man1_MANS = \
556   doc/aclocal.1 \
557   doc/automake.1 \
558   doc/aclocal-$(APIVERSION).1 \
559   doc/automake-$(APIVERSION).1
560
561 $(man1_MANS): $(srcdir)/configure.ac
562
563 CLEANFILES += $(man1_MANS)
564 EXTRA_DIST += doc/help2man
565
566 update_mans = \
567   $(AM_V_GEN): \
568     && $(MKDIR_P) doc \
569     && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
570     && export PATH \
571     && $(PERL) $(srcdir)/doc/help2man --output=$@
572
573 doc/aclocal.1 doc/automake.1:
574         $(AM_V_GEN): \
575           && $(MKDIR_P) doc \
576           && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
577           && echo ".so man1/$$f-$(APIVERSION).1" > $@
578
579 doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
580         $(update_mans) aclocal-$(APIVERSION)
581 doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
582         $(update_mans) automake-$(APIVERSION)
583
584
585 ## ---------------------------- ##
586 ##  Example package "amhello".  ##
587 ## ---------------------------- ##
588
589 amhello_sources = \
590   doc/amhello/configure.ac \
591   doc/amhello/Makefile.am \
592   doc/amhello/README \
593   doc/amhello/src/main.c \
594   doc/amhello/src/Makefile.am
595
596 amhello_configury = \
597   aclocal.m4 \
598   autom4te.cache \
599   Makefile.in \
600   config.h.in \
601   configure \
602   depcomp \
603   install-sh \
604   missing \
605   src/Makefile.in
606
607 dist_noinst_DATA += $(amhello_sources)
608 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
609
610 # We depend on configure.ac so that we regenerate the tarball
611 # whenever the Automake version changes.
612 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
613 # configure in 't/wrap'.
614 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
615         $(AM_V_GEN): \
616           && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
617           && export PATH \
618           && $(am__cd) $(srcdir)/doc/amhello \
619           && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
620           && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
621           && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
622           && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
623           && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
624           && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
625           && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
626           && $(am_AUTORECONF) -vfi \
627           && ./configure \
628           && $(MAKE) $(AM_MAKEFLAGS) distcheck \
629           && $(MAKE) $(AM_MAKEFLAGS) distclean \
630           && rm -rf $(amhello_configury) \
631           && mv -f amhello-1.0.tar.gz ..
632
633
634 ## ------------------------------------------------- ##
635 ##  Third-party, obsolescent or experimental stuff.  ##
636 ## ------------------------------------------------- ##
637
638 EXTRA_DIST += \
639   contrib/check-html.am \
640   contrib/multilib/README \
641   contrib/multilib/config-ml.in \
642   contrib/multilib/symlink-tree \
643   contrib/multilib/multilib.am \
644   contrib/multilib/multi.m4 \
645   contrib/README
646
647
648 ## --------------------------------------------------- ##
649 ##  Older files, kept mostly for historical interest.  ##
650 ## --------------------------------------------------- ##
651
652 EXTRA_DIST += \
653   old/ChangeLog-tests \
654   old/ChangeLog.96 \
655   old/ChangeLog.98 \
656   old/ChangeLog.00 \
657   old/ChangeLog.01 \
658   old/ChangeLog.02 \
659   old/ChangeLog.03 \
660   old/ChangeLog.04 \
661   old/ChangeLog.09 \
662   old/ChangeLog.11 \
663   old/TODO
664
665
666 ##########################################################################
667
668 ## Everything past here is useful to the maintainer, but probably not
669 ## to anybody else.
670
671 ##########################################################################
672
673
674 ## --------------------------------------------------------- ##
675 ##  Automatic generation of the ChangeLog from git history.  ##
676 ## --------------------------------------------------------- ##
677
678 gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
679 gitlog_to_changelog_fixes = $(srcdir)/.git-log-fix
680 gitlog_to_changelog_options = --amend=$(gitlog_to_changelog_fixes) \
681                               --since='2011-12-28 00:00:00' \
682                               --no-cluster --format '%s%n%n%b'
683
684 EXTRA_DIST += lib/gitlog-to-changelog
685 EXTRA_DIST += $(gitlog_to_changelog_fixes)
686
687 # When executed from a git checkout, generate the ChangeLog from the git
688 # history.  When executed from an extracted distribution tarball, just
689 # copy the distributed ChangeLog in the build directory (and if this
690 # fails, or if no distributed ChangeLog file is present, complain and
691 # give an error).
692 #
693 # We need the apparently useless dependency from another .PHONY target
694 # 'am--changelog-regen-hook' to work around a bug of Solaris make, which
695 # doesn't execute the recipe of a target named as an existing file, even
696 # if such target is declared '.PHONY' (yikes!)
697 #
698 .PHONY: am--changelog-regen-hook
699 am--changelog-regen-hook:
700 ChangeLog: am--changelog-regen-hook
701         $(AM_V_GEN)set -e; set -u; \
702 ## The ChangeLog should be regenerated unconditionally when working from
703 ## checked-out sources; otherwise, if we're working from a distribution
704 ## tarball, we expect the ChangeLog to be distributed, so check that it
705 ## is indeed present in the source directory.
706         if test -d $(srcdir)/.git; then \
707           rm -f $@-t \
708             && $(gitlog_to_changelog_command) \
709                $(gitlog_to_changelog_options) >$@-t \
710             && chmod a-w $@-t \
711             && mv -f $@-t $@ \
712             || exit 1; \
713         elif test ! -f $(srcdir)/$@; then \
714           echo "Source tree is not a git checkout, and no pre-existent" \
715                "$@ file has been found there" >&2; \
716           exit 1; \
717         fi
718
719
720 ## --------------------------- ##
721 ##  Perl coverage statistics.  ##
722 ## --------------------------- ##
723
724 PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
725 PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
726 PERL_COVER = cover
727
728 check-coverage-run recheck-coverage-run: all
729         $(mkinstalldirs) $(PERL_COVERAGE_DB)
730         PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
731         WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
732         $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
733
734 check-coverage-report:
735         @if test ! -d "$(PERL_COVERAGE_DB)"; then \
736           echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
737           echo "Please run \"make check-coverage\" first" >&2; \
738           exit 1; \
739         fi
740         $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
741
742 # We don't use direct dependencies here because we'd like to be able
743 # to invoke the report even after interrupted check-coverage.
744 check-coverage: check-coverage-run
745         $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
746
747 recheck-coverage: recheck-coverage-run
748         $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
749
750 clean-coverage:
751         rm -rf "$(PERL_COVERAGE_DB)"
752 clean-local: clean-coverage
753
754 .PHONY: check-coverage recheck-coverage check-coverage-run \
755         recheck-coverage-run check-coverage-report clean-coverage
756
757
758 ## ---------------------------------------------------- ##
759 ##  Tagging and/or uploading stable and beta releases.  ##
760 ## ---------------------------------------------------- ##
761
762 GIT = git
763
764 EXTRA_DIST += lib/gnupload
765
766 base_version_rx = ^[1-9][0-9]*\.[0-9][0-9]*
767 stable_major_version_rx = $(base_version_rx)$$
768 stable_minor_version_rx = $(base_version_rx)\.[0-9][0-9]*$$
769 beta_version_rx = $(base_version_rx)(\.[0-9][0-9]*)?[bdfhjlnprtvxz]$$
770 match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
771
772 ## Check that we don't have uncommitted or unstaged changes.
773 ## TODO: Maybe the git suite already offers a shortcut to verify if the
774 ## TODO: working directory is "clean" or not?  If yes, use that instead
775 ## TODO: of duplicating the logic here.
776 git_must_have_clean_workdir = \
777   $(GIT) rev-parse --verify HEAD >/dev/null \
778     && $(GIT) update-index -q --refresh \
779     && $(GIT) diff-files --quiet \
780     && $(GIT) diff-index --quiet --cached HEAD \
781     || fatal "you have uncommitted or unstaged changes"
782
783 determine_release_type = \
784   if $(match_version) '$(stable_major_version_rx)'; then \
785     release_type='Major release'; \
786     announcement_type='major release'; \
787     dest=ftp; \
788   elif $(match_version) '$(stable_minor_version_rx)'; then \
789     release_type='Minor release'; \
790     announcement_type='maintenance release'; \
791     dest=ftp; \
792   elif $(match_version) '$(beta_version_rx)'; then \
793     release_type='Beta release'; \
794     announcement_type='test release'; \
795     dest=alpha; \
796   else \
797     fatal "invalid version '$(VERSION)' for a release"; \
798   fi
799
800 # Help the debugging of $(determine_release_type) and related code.
801 print-release-type:
802         @set -e -u \
803           && fatal () { echo "$@: $$*"; exit 0; } \
804           && $(determine_release_type) \
805           && echo "$$release_type $(VERSION);" \
806                   "it will be announced as a $$announcement_type"
807
808 git-tag-release: maintainer-check
809         @set -e; set -u; \
810         fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \
811         case '$(AM_TAG_DRYRUN)' in \
812           ""|[nN]|[nN]o|NO) run="";; \
813           *) run="echo Running:";; \
814         esac; \
815         $(determine_release_type); \
816         $(git_must_have_clean_workdir); \
817 ## If all was successful, tag the release in the local repository.
818         $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
819
820 git-upload-release:
821         @set -e; set -u; \
822         fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \
823         $(determine_release_type); \
824         dest=$$dest.gnu.org:automake; \
825         $(git_must_have_clean_workdir); \
826 ## Check that we are releasing from a valid tag.
827         tag=`$(GIT) describe` \
828           && case $$tag in "v$(VERSION)") true;; *) false;; esac \
829           || fatal "you can only create a release from a tagged version"; \
830 ## Build and upload the distribution tarball(s).
831         $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \
832         echo Will upload to $$dest: $(DIST_ARCHIVES); \
833         $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES)
834
835 .PHONY: print-release-type git-upload-release git-tag-release
836
837
838 ## ------------------------------------------------------------------ ##
839 ##  Explore differences of autogenerated files in different commits.  ##
840 ## ------------------------------------------------------------------ ##
841
842 ## Visually comparing differences between the Makefile.in files in
843 ## automake's own build system as generated in two different branches
844 ## might help to catch bugs and blunders.  This has already happened a
845 ## few times in the past, when we used to version-control Makefile.in.
846 autodiffs:
847         @set -u; \
848          NEW_COMMIT=$${NEW_COMMIT-"HEAD"}; \
849          OLD_COMMIT=$${OLD_COMMIT-"HEAD~1"}; \
850          am_gitdir='$(abs_top_srcdir)/.git'; \
851          get_autofiles_from_rev () \
852          { \
853              rev=$$1 dir=$$2 \
854                && echo "$@: will get files from revision $$rev" \
855                && $(GIT) clone -q --depth 1 "$$am_gitdir" tmp \
856                && $(am__cd) tmp \
857                && $(GIT) checkout -q "$$rev" \
858                && echo "$@: bootstrapping $$rev" \
859                && $(SHELL) ./bootstrap.sh \
860                && echo "$@: copying files from $$rev" \
861                && makefile_ins=`find . -name Makefile.in` \
862                && (tar cf - configure aclocal.m4 $$makefile_ins) | \
863                   (cd .. && $(am__cd) "$$dir" && tar xf -) \
864                && cd .. \
865                && rm -rf tmp; \
866          }; \
867          outdir=$@.dir \
868 ## Before proceeding, ensure the specified revisions truly exist.
869            && $(GIT) --git-dir="$$am_gitdir" describe $$OLD_COMMIT >/dev/null \
870            && $(GIT) --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
871            && rm -rf $$outdir \
872            && mkdir $$outdir \
873            && $(am__cd) $$outdir \
874            && mkdir new old \
875            && get_autofiles_from_rev $$OLD_COMMIT old \
876            && get_autofiles_from_rev $$NEW_COMMIT new \
877            && exit 0
878
879 ## With lots of eye candy; we like our developers pampered and spoiled :-)
880 compare-autodiffs: autodiffs
881         @set -u; \
882         : $${COLORDIFF=colordiff} $${DIFF=diff}; \
883         dir=autodiffs.dir; \
884         if test ! -d "$$dir"; then \
885           echo "$@: $$dir: Not a directory" >&2; \
886           exit 1; \
887         fi; \
888         mydiff=false mypager=false; \
889         if test -t 1; then \
890           if ($$COLORDIFF -r . .) </dev/null >/dev/null 2>&1; then \
891             mydiff=$$COLORDIFF; \
892             mypager="less -R"; \
893           else \
894             mypager=less; \
895           fi; \
896         else \
897           mypager=cat; \
898         fi; \
899         if test "$$mydiff" = false; then \
900           if ($$DIFF -r -u . .); then \
901             mydiff=$$DIFF; \
902           else \
903             echo "$@: no good-enough diff program specified" >&2; \
904             exit 1; \
905           fi; \
906         fi; \
907         st=0; $$mydiff -r -u $$dir/old $$dir/new | $$mypager || st=$$?; \
908         rm -rf $$dir; \
909         exit $$st
910 .PHONY: autodiffs compare-autodiffs
911
912 ## ---------------------------------------------- ##
913 ##  Help writing the announcement for a release.  ##
914 ## ---------------------------------------------- ##
915
916 PACKAGE_MAILINGLIST = automake@gnu.org
917
918 announcement: NEWS
919         $(AM_V_GEN): \
920           && rm -f $@ $@-t \
921           && fatal () { echo "$@: $$*" >&2; exit 1; } \
922           && $(determine_release_type) \
923           && ftp_base="ftp://$$dest.gnu.org/gnu/$(PACKAGE)" \
924           && X () { printf '%s\n' "$$*" >> $@-t; } \
925           && X "We are pleased to announce the $(PACKAGE_NAME) $(VERSION)" \
926                "$$announcement_type." \
927           && X \
928           && X "**TODO** Brief description of the release here." \
929           && X \
930           && X "**TODO** This description can span multiple paragraphs." \
931           && X \
932           && X "See below for the detailed list of changes since the" \
933           && X "previous version, as summarized by the NEWS file." \
934           && X \
935           && X "Download here:" \
936           && X \
937           && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.gz" \
938           && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.xz" \
939           && X \
940           && X "Please report bugs and problems to" \
941                "<$(PACKAGE_BUGREPORT)>," \
942           && X "and send general comments and feedback to" \
943                "<$(PACKAGE_MAILINGLIST)>." \
944           && X \
945           && X "Thanks to everyone who has reported problems, contributed" \
946           && X "patches, and helped testing Automake!" \
947           && X \
948           && X "-*-*-*-" \
949           && X \
950           && sed -n -e '/^~~~/q' -e p $(srcdir)/NEWS >> $@-t \
951           && mv -f $@-t $@
952 .PHONY: announcement
953 CLEANFILES += announcement
954
955 ## --------------------------------------------------------------------- ##
956 ##  Synchronize third-party files that are committed in our repository.  ##
957 ## --------------------------------------------------------------------- ##
958
959 # Program to use to fetch files.
960 WGET = wget
961
962 # Some repositories we sync files from.
963 SV_CVS    = 'http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/'
964 SV_GIT_CF = 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
965 SV_GIT_AC = 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
966 SV_GIT_GL = 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
967
968 # Files that we fetch and which we compare against.
969 # Note that the 'lib/COPYING' file must still be synced by hand.
970 FETCHFILES = \
971   $(SV_GIT_CF)config.guess \
972   $(SV_GIT_CF)config.sub \
973   $(SV_CVS)texinfo/texinfo/doc/texinfo.tex \
974   $(SV_CVS)texinfo/texinfo/util/gendocs.sh \
975   $(SV_CVS)texinfo/texinfo/util/gendocs_template \
976   $(SV_GIT_GL)build-aux/gitlog-to-changelog \
977   $(SV_GIT_GL)build-aux/gnupload \
978   $(SV_GIT_GL)build-aux/update-copyright \
979   $(SV_GIT_GL)doc/INSTALL
980
981 # Fetch the latest versions of few scripts and files we care about.
982 fetch:
983         $(AM_V_at)rm -rf Fetchdir
984         $(AM_V_at)mkdir Fetchdir
985         $(AM_V_GEN)set -e; \
986         if $(AM_V_P); then wget_opts=; else wget_opts=-nv; fi; \
987         for url in $(FETCHFILES); do \
988            file=`printf '%s\n' "$$url" | sed 's|^.*/||; s|^.*=||'`; \
989 ## A retrieval failure usually means a serious problem.  Just bail out.
990            $(WGET) $$wget_opts "$$url" -O Fetchdir/$$file || exit 1; \
991            if cmp Fetchdir/$$file $(srcdir)/lib/$$file >/dev/null; then \
992              : Nothing to do; \
993            else \
994              echo "$@: updating file $$file"; \
995 ## Ditto for a copying failure.
996              cp Fetchdir/$$file $(srcdir)/lib/$$file || exit 1; \
997            fi; \
998         done
999         $(AM_V_at)rm -rf Fetchdir
1000 .PHONY: fetch
1001
1002 ## ---------------------------------------------------------------------- ##
1003 ##  Generate and upload manuals in several formats, for the GNU website.  ##
1004 ## ---------------------------------------------------------------------- ##
1005
1006 web_manual_dir = doc/web-manual
1007
1008 RSYNC = rsync
1009 CVS = cvs
1010 CVSU = cvsu
1011 CVS_USER = $${USER}
1012 WEBCVS_ROOT = cvs.savannah.gnu.org:/web
1013
1014 web-manual:
1015         $(AM_V_at)rm -rf $(web_manual_dir)
1016         $(AM_V_GEN)tmp=$@.dir \
1017           && rm -rf $$tmp \
1018           && mkdir $$tmp \
1019           && $(am__cd) $$tmp \
1020           && GENDOCS_TEMPLATE_DIR='$(abs_srcdir)/lib' \
1021           && export GENDOCS_TEMPLATE_DIR \
1022 ## Needed to pacify extra checks from gendocs.sh.
1023           && $(LN_S) '$(abs_srcdir)/doc/$(PACKAGE).texi' . \
1024 ## Try to respect silent rules.
1025           && if $(AM_V_P); then :; else exec >/dev/null 2>&1; fi \
1026 ## Finally generate the manual in several formats.
1027           && $(SHELL) '$(abs_srcdir)/lib/gendocs.sh' \
1028              -I '$(abs_srcdir)/doc' --email $(PACKAGE_BUGREPORT) \
1029              $(PACKAGE) '$(PACKAGE_NAME)'
1030         $(AM_V_at)tmp=$@.dir \
1031          && mkdir $(web_manual_dir) \
1032          && mv -f $$tmp/manual/* $(web_manual_dir) \
1033          && rm -rf $$tmp \
1034          && { ! $(AM_V_P) || ls -l $(web_manual_dir); }
1035 .PHONY: web-manual
1036
1037 web-manual-update:
1038         $(AM_V_at)fatal () { echo "$@: $$*" >&2; exit 1; }; \
1039         $(determine_release_type); \
1040         case $$release_type in \
1041           [Mm]ajor\ release|[Mm]inor\ release);; \
1042           *) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \
1043              exit 1;; \
1044         esac
1045         $(AM_V_at)test -f $(web_manual_dir)/$(PACKAGE).html || { \
1046           echo 'You have to run "$(MAKE) web-manuals" before' \
1047                'invoking "$(MAKE) $@"' >&2; \
1048           exit 1; \
1049         }
1050         $(AM_V_GEN): \
1051           && CVS_RSH=ssh && export CVS_RSH=ssh \
1052           && tmp=$@.dir \
1053           && rm -rf $$tmp \
1054           && mkdir $$tmp \
1055           && $(am__cd) $$tmp \
1056           && $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \
1057                     co $(PACKAGE) \
1058           && cd .. \
1059 ## According to the rsync manpage, "a trailing slash on the source [...]
1060 ## avoids creating an additional directory level at the destination".
1061 ## So the trailing '/' after '$(web_manual_dir)' below is intended.
1062           && $(RSYNC) -avP $(web_manual_dir)/ $$tmp/$(PACKAGE)/manual \
1063           && ( \
1064             cd $$tmp/$(PACKAGE)/manual \
1065               && new_files=`$(CVSU) --types='?'` \
1066               && new_files=`echo "$$new_files" | sed s/^..//` \
1067               && { test -z "$$new_files" || $(CVS) add -ko $$new_files; } \
1068               && $(CVS) ci -m $(VERSION) \
1069             ) \
1070           && rm -rf $$tmp
1071 .PHONY: web-manual-update
1072
1073 clean-web-manual:
1074         $(AM_V_at)rm -rf $(web_manual_dir)
1075 .PHONY: clean-web-manual
1076 clean-local: clean-web-manual
1077
1078 EXTRA_DIST += lib/gendocs.sh lib/gendocs_template
1079
1080 ## ------------------------------------------------ ##
1081 ##  Update copyright years of all committed files.  ##
1082 ## ------------------------------------------------ ##
1083
1084 EXTRA_DIST += lib/update-copyright
1085
1086 update_copyright_env = \
1087   UPDATE_COPYRIGHT_FORCE=1 \
1088   UPDATE_COPYRIGHT_USE_INTERVALS=2
1089
1090 # In addition to the several README files, these as well are
1091 # not expected to have a copyright notice.
1092 files_without_copyright = \
1093   .autom4te.cfg \
1094   .git-log-fix \
1095   .gitattributes \
1096   .gitignore \
1097   INSTALL \
1098   COPYING \
1099   AUTHORS \
1100   THANKS \
1101   lib/INSTALL \
1102   lib/COPYING
1103
1104 # This script is in the public domain.
1105 files_without_copyright += lib/mkinstalldirs
1106
1107 # This script has an MIT-style license
1108 files_without_copyright += lib/install-sh
1109
1110 .PHONY: update-copyright
1111 update-copyright:
1112         $(AM_V_GEN)set -e; \
1113         current_year=`date +%Y` && test -n "$$current_year" \
1114           || { echo "$@: cannot get current year" >&2; exit 1; }; \
1115         sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
1116           bootstrap.sh configure.ac; \
1117         excluded_re=`( \
1118           for url in $(FETCHFILES); do echo "$$url"; done \
1119             | sed -e 's!^.*/!!' -e 's!^.*=!!' -e 's!^!lib/!' \
1120           && for f in $(files_without_copyright); do echo $$f; done \
1121         ) | sed -e '$$!s,$$,|,' | tr -d '\012\015'`; \
1122         $(GIT) ls-files \
1123           | grep -Ev '(^|/)README$$' \
1124           | grep -Ev "^($$excluded_re)$$" \
1125           | $(update_copyright_env) xargs $(srcdir)/lib/$@