1 # Make Autoconf commands.
3 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 # 2009, 2010 Free 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 include ../lib/freeze.mk
21 bin_SCRIPTS = autom4te \
22 autoconf autoheader autoreconf ifnames autoscan autoupdate
24 EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
25 autoscan.in autom4te.in
27 # Files that should be removed, but which Automake does not know.
28 MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
30 # Get the release year from ../ChangeLog.
32 `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
39 -e 's|@SHELL[@]|$(SHELL)|g' \
40 -e 's|@PERL[@]|$(PERL)|g' \
41 -e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \
42 -e 's|@bindir[@]|$(bindir)|g' \
43 -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
44 -e 's|@prefix[@]|$(prefix)|g' \
45 -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
46 -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
47 -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
48 -e 's|@M4[@]|$(M4)|g' \
49 -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
50 -e 's|@M4_GNU[@]|$(M4_GNU)|g' \
51 -e 's|@AWK[@]|$(AWK)|g' \
52 -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \
53 -e 's|@VERSION[@]|$(VERSION)|g' \
54 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
55 -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
57 $(top_builddir)/bin/autom4te: autom4te
59 # autoconf is written in M4sh.
60 # FIXME: this target should depend on the frozen files below lib/m4sugar,
61 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
62 # installation below the same $(prefix); work around this with --melt.
63 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
64 $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
66 ## All the scripts depend on Makefile so that they are rebuilt when the
67 ## prefix etc. changes. It took quite a while to have the rule correct,
69 ## Use chmod -w to prevent people from editing the wrong file by accident.
70 $(bin_SCRIPTS): Makefile
73 test -f ./$@.in || srcdir=$(srcdir)/; \
74 $(edit) $${srcdir}$@.in >$@.tmp
80 autoheader: $(srcdir)/autoheader.in
81 autom4te: $(srcdir)/autom4te.in
82 autoreconf: $(srcdir)/autoreconf.in
83 autoscan: $(srcdir)/autoscan.in
84 autoupdate: $(srcdir)/autoupdate.in
85 ifnames: $(srcdir)/ifnames.in
92 TAGS_DEPENDENCIES = $(EXTRA_DIST)
94 letters = abcdefghijklmnopqrstuvwxyz
95 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
97 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
98 ETAGS_PERL = --lang=perl \
99 autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
101 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
104 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)