1 ## Process this file with automake to create Makefile.in
3 ## Makefile for Automake.
5 # Copyright (C) 1995-2013 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ## Might be updated later.
23 MAINTAINERCLEANFILES =
29 nodist_noinst_SCRIPTS =
35 # We want a handful of substitutions to be fully-expanded by make;
36 # then use config.status to substitute the remainder where a single
37 # expansion is sufficient. We use a funny notation here to avoid
38 # configure substitutions in our text.
40 -e "s,[@]configure_input[@],Generated from $$in; do not edit by hand.,g" \
41 -e 's,[@]datadir[@],$(datadir),g' \
42 -e 's,[@]amdir[@],$(amdir),g' \
43 -e 's,[@]bindir[@],$(bindir),g' \
44 -e 's,[@]docdir[@],$(docdir),g' \
45 -e 's,[@]pkgvdatadir[@],$(pkgvdatadir),g' \
46 -e 's,[@]scriptdir[@],$(scriptdir),g' \
47 -e 's,[@]automake_acdir[@],$(automake_acdir),g' \
48 -e 's,[@]system_acdir[@],$(system_acdir),g' \
49 ## Hack to avoid a spurious substitution in the Automake script (part 1).
50 -e 's,[@]am__isrc[@],!!@!!am__isrc!!@!!,g' \
51 | $(SHELL) ./config.status --file=- \
52 ## Hack to avoid a spurious substitution in the Automake script (part 2).
53 | sed -e 's,!!@!!am__isrc!!@!!,@''am__isrc@,g' \
56 # Generated files shouldn't contain unexpanded '@substitutions@', and
57 # should be made read-only, to prevent them from being edited by mistake
58 # instead of the file the are generated from.
59 generated_file_finalize = $(AM_V_at) \
60 if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
61 echo "$@ contains unexpanded substitution (see lines above)"; \
64 chmod a-w $@-t && mv -f $@-t $@
66 bin_SCRIPTS = automake aclocal
68 CLEANFILES += $(bin_SCRIPTS)
69 AUTOMAKESOURCES = automake.in aclocal.in
71 TAGS_FILES += $(AUTOMAKESOURCES)
80 # For some tests or targets, we need to have the just-build automake and
81 # aclocal scripts avaiable on PATH.
83 { PATH='$(abs_builddir)/t/wrap'$(PATH_SEPARATOR)$$PATH && export PATH; }
85 # Make versioned links. We only run the transform on the root name;
86 # then we make a versioned link with the transformed base name. This
87 # seemed like the most reasonable approach.
90 @for p in $(bin_SCRIPTS); do \
91 f=`echo $$p | sed '$(transform)'`; \
92 fv="$$f-$(APIVERSION)"; \
93 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
94 echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
95 $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
99 @for p in $(bin_SCRIPTS); do \
100 f=`echo $$p | sed '$(transform)'`; \
101 fv="$$f-$(APIVERSION)"; \
102 rm -f "$(DESTDIR)$(bindir)/$$fv"; \
105 # These files depend on Makefile so they are rebuilt if $(VERSION),
106 # $(datadir) or other do_subst'ituted variables change.
107 automake: automake.in
109 automake aclocal: Makefile lib/gen-perl-protos
110 $(AM_V_GEN)rm -f $@ $@-t $@-t2 \
111 ## Common substitutions.
112 && in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
113 ## Auto-compute prototypes of perl subroutines.
114 && $(PERL) -w $(srcdir)/lib/gen-perl-protos $@-t > $@-t2 \
115 && mv -f $@-t2 $@-t \
116 ## We can't use '$(generated_file_finalize)' here, because currently
117 ## Automake contains occurrences of unexpanded @substitutions@ in
118 ## comments, and that is perfectly legit.
119 && chmod a+x,a-w $@-t && mv -f $@-t $@
120 EXTRA_DIST += lib/gen-perl-protos
122 # The master location for INSTALL is lib/INSTALL.
123 # This is where "make fetch" will install new versions.
124 # Make sure we also update this copy.
126 $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
128 # We don't use the default name for the autom4te cache directory,
130 maintainer-clean-local:
131 rm -rf .autom4te.cache
133 # So that automake won't complain about the missing ChangeLog.
134 # The real rule for ChangeLog generation is now in maintainer/maint.mk
135 # (as it is maintainer-specific).
138 # Third-party, obsolescent or experimental stuff.
140 contrib/check-html.am \
141 contrib/multilib/README \
142 contrib/multilib/config-ml.in \
143 contrib/multilib/symlink-tree \
144 contrib/multilib/multilib.am \
145 contrib/multilib/multi.m4 \
148 # Older files, kept mostly for historical interest.
150 old/ChangeLog-tests \
162 # Maintainer-specific files and scripts.
166 maintainer/rename-tests \
167 maintainer/maint.mk \
168 maintainer/syntax-checks.mk
170 # Most work delegated to sub-dir makefile fragments.
171 include $(srcdir)/doc/Makefile.inc
172 include $(srcdir)/lib/Makefile.inc
173 include $(srcdir)/lib/Automake/Makefile.inc
174 include $(srcdir)/lib/am/Makefile.inc
175 include $(srcdir)/m4/Makefile.inc
176 include $(srcdir)/t/Makefile.inc
178 # vim: ft=automake noet