1 ## Process this file with automake to create Makefile.in. -*-Makefile-*-
3 ## Makefile for Autoconf.
5 ## Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
8 ## This program is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2, or (at your option)
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 include ../lib/freeze.mk
25 bin_SCRIPTS = autom4te \
26 autoconf autoheader autoreconf ifnames autoscan autoupdate
28 EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
29 autoscan.in autom4te.in
31 # Files that should be removed, but which Automake does not know.
32 MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
40 -e 's|@SHELL[@]|$(SHELL)|g' \
41 -e 's|@PERL[@]|$(PERL)|g' \
42 -e 's|@bindir[@]|$(bindir)|g' \
43 -e 's|@datadir[@]|$(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|@AWK[@]|$(AWK)|g' \
50 -e 's|@VERSION[@]|$(VERSION)|g' \
51 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
52 -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
54 # autoconf is written in M4sh.
55 # FIXME: this target should depend on the frozen files below lib/m4sugar,
56 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
57 # installation below the same $(prefix); work around this with --melt.
58 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
59 $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
61 ## All the scripts depend on Makefile so that they are rebuilt when the
62 ## prefix etc. changes. It took quite a while to have the rule correct,
64 ## Use chmod -w to prevent people from editing the wrong file by accident.
65 $(bin_SCRIPTS): Makefile
67 $(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
73 autoheader: $(srcdir)/autoheader.in
74 autom4te: $(srcdir)/autom4te.in
75 autoreconf: $(srcdir)/autoreconf.in
76 autoscan: $(srcdir)/autoscan.in
77 autoupdate: $(srcdir)/autoupdate.in
78 ifnames: $(srcdir)/ifnames.in
85 TAGS_DEPENDENCIES = $(EXTRA_DIST)
87 letters = abcdefghijklmnopqrstuvwxyz
88 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
90 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
91 ETAGS_PERL = --lang=perl \
92 autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
94 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
97 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)