Tweak wording about SHELL in Makefile.
[autoconf.git] / Makefile.am
blob3ccaf2b5128d7c7a22f51e2298e38fcbe08c19c5
1 # Make Autoconf.
3 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 Free
4 # Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 # bin/ must be run first, as it builds executables needed for tests.
20 # autom4te uses autotest.m4f to generate `testsuite', so build tests last.
21 # Rules in man/ use scripts from both bin/ and tests/, so *it* goes last.
22 SUBDIRS = bin . lib doc tests man
24 ACLOCAL_AMFLAGS = -I m4
26 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
27              BUGS COPYINGv3 \
28              GNUmakefile maint.mk cfg.mk \
29              build-aux/git-version-gen \
30              build-aux/announce-gen build-aux/gnupload \
31              .prev-version .version
33 MAINTAINERCLEANFILES = $(abs_srcdir)/INSTALL
35 ## --------- ##
36 ## INSTALL.  ##
37 ## --------- ##
39 ## abs_srcdir is necessary for case-insensitive make to distinguish from
40 ## 'make install'.  But automake also insists that the plain target INSTALL
41 ## exist prior to 'make dist'.
42 INSTALL: $(abs_srcdir)/INSTALL
44 pkgdata_DATA = $(abs_srcdir)/INSTALL
45 AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
46 $(abs_srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
47         $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $@ \
48           $(top_srcdir)/doc/install.texi
50 ## maintainer-check ##
51 maintainer-check: maintainer-check-tests
52 maintainer-check-tests: all
53         cd tests && $(MAKE) $(AM_MAKEFLAGS) maintainer-check
56 ## ----------------------------------- ##
57 ## Updating Perl files from Automake.  ##
58 ## ----------------------------------- ##
60 WGET = wget
61 WGETFLAGS = -C off
63 ## Fetch the latest versions of files we care about.
64 automake_gitweb = \
65   http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;hb=HEAD;
66 autom4te_files = \
67   Autom4te/Configure_ac.pm \
68   Autom4te/Channels.pm \
69   Autom4te/FileUtils.pm \
70   Autom4te/Struct.pm \
71   Autom4te/XFile.pm
73 autom4te-update:
74         rm -f -r Fetchdir > /dev/null 2>&1
75         mkdir -p Fetchdir/Autom4te
76         for file in $(autom4te_files); do \
77           infile=`echo $$file | sed 's/Autom4te/Automake/g'`; \
78           $(WGET) $(WGET_FLAGS) \
79             "$(automake_gitweb)f=lib/$$infile" \
80             -O "Fetchdir/$$file" || exit; \
81         done
82         perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm
83         for file in $(autom4te_files); do \
84           $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file || exit; \
85         done
87 # Version string management.  There are two files to be aware of:
88 # .tarball-version - present only in a distribution tarball, and not in
89 #   a checked-out repository.  Created with contents that were learned at
90 #   the last time autoconf was run, and used by git-version-gen.  Must not
91 #   be present in either $(srcdir) or $(builddir) for git-version-gen to
92 #   give accurate answers during normal development with a checked out tree,
93 #   but must be present in a tarball when there is no version control system.
94 #   Therefore, it cannot be used in any dependencies.  GNUmakefile has
95 #   hooks to force a reconfigure at distribution time to get the value
96 #   correct, without penalizing normal development with extra reconfigures.
97 # .version - present in a checked-out repository and in a distribution
98 #   tarball.  At least as current as the most recent .tarball-version
99 #   creation.  Usable in dependencies, particularly for files that don't
100 #   want to depend on config.h but do want to track version changes.
101 BUILT_SOURCES = $(top_srcdir)/.version
102 $(top_srcdir)/.version:
103         echo $(VERSION) > $@-t && mv $@-t $@
105 # Arrange so that .tarball-version appears only in distribution tarballs,
106 # never in a checked-out repository.
107 dist-hook:
108         echo $(VERSION) > $(distdir)/.tarball-version
110 # Arrange to remove the symlink to GNUmakefile in VPATH builds.
111 # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed.
112 distclean-local:
113         if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi