1 # Make Autoconf commands.
3 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 2, or (at your option)
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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 include ../lib/freeze.mk
23 bin_SCRIPTS = autom4te \
24 autoconf autoheader autoreconf ifnames autoscan autoupdate
26 EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
27 autoscan.in autom4te.in
29 # Files that should be removed, but which Automake does not know.
30 MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
32 # Get the release year from ../ChangeLog.
34 `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
41 -e 's|@SHELL[@]|$(SHELL)|g' \
42 -e 's|@PERL[@]|$(PERL)|g' \
43 -e 's|@bindir[@]|$(bindir)|g' \
44 -e 's|@datadir[@]|$(pkgdatadir)|g' \
45 -e 's|@prefix[@]|$(prefix)|g' \
46 -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
47 -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
48 -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
49 -e 's|@M4[@]|$(M4)|g' \
50 -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|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 # autoconf is written in M4sh.
58 # FIXME: this target should depend on the frozen files below lib/m4sugar,
59 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
60 # installation below the same $(prefix); work around this with --melt.
61 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
62 $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
64 ## All the scripts depend on Makefile so that they are rebuilt when the
65 ## prefix etc. changes. It took quite a while to have the rule correct,
67 ## Use chmod -w to prevent people from editing the wrong file by accident.
68 $(bin_SCRIPTS): Makefile
71 test -f ./$@.in || srcdir=$(srcdir)/; \
72 $(edit) $${srcdir}$@.in >$@.tmp
78 autoheader: $(srcdir)/autoheader.in
79 autom4te: $(srcdir)/autom4te.in
80 autoreconf: $(srcdir)/autoreconf.in
81 autoscan: $(srcdir)/autoscan.in
82 autoupdate: $(srcdir)/autoupdate.in
83 ifnames: $(srcdir)/ifnames.in
90 TAGS_DEPENDENCIES = $(EXTRA_DIST)
92 letters = abcdefghijklmnopqrstuvwxyz
93 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
95 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
96 ETAGS_PERL = --lang=perl \
97 autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
99 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
102 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)