* doc/autoconf.texi: Use @acronym more consistently for acronyms
[autoconf.git] / bin / Makefile.am
blob10c928fea2a22875daaa171f80d6c2882813fdbb
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
6 ## Foundation, Inc.
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)
11 ## any later version.
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
21 ## 02110-1301, USA.
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
35 ## ------------- ##
36 ## The scripts.  ##
37 ## ------------- ##
39 edit = sed \
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 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
56         $(MY_AUTOM4TE) --language M4sh --cache '' $(srcdir)/autoconf.as -o $@
58 ## All the scripts depend on Makefile so that they are rebuilt when the
59 ## prefix etc. changes.  It took quite a while to have the rule correct,
60 ## don't break it!
61 ## Use chmod -w to prevent people from editing the wrong file by accident.
62 $(bin_SCRIPTS): Makefile
63         rm -f $@ $@.tmp
64         $(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
65         chmod +x $@.tmp
66         chmod a-w $@.tmp
67         mv $@.tmp $@
69 autoconf: autoconf.in
70 autoheader: $(srcdir)/autoheader.in
71 autom4te: $(srcdir)/autom4te.in
72 autoreconf: $(srcdir)/autoreconf.in
73 autoscan: $(srcdir)/autoscan.in
74 autoupdate: $(srcdir)/autoupdate.in
75 ifnames: $(srcdir)/ifnames.in
78 ## --------------- ##
79 ## Building TAGS.  ##
80 ## --------------- ##
82 TAGS_DEPENDENCIES = $(EXTRA_DIST)
84 letters = abcdefghijklmnopqrstuvwxyz
85 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
86 DIGITS = 0123456789
87 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
88 ETAGS_PERL = --lang=perl \
89   autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
90   ifnames.in
91 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
92   autoconf.in
94 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)