* Makefile.am: Put only a single '#' into the copyright notice,
[autoconf.git] / bin / Makefile.am
blob26d3529970d1ff73f9520b1fe2f0340c1c3dc66c
1 # Make Autoconf commands.
3 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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)
9 # 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
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
33 ## ------------- ##
34 ## The scripts.  ##
35 ## ------------- ##
37 edit = sed \
38         -e 's|@SHELL[@]|$(SHELL)|g' \
39         -e 's|@PERL[@]|$(PERL)|g' \
40         -e 's|@bindir[@]|$(bindir)|g' \
41         -e 's|@datadir[@]|$(pkgdatadir)|g' \
42         -e 's|@prefix[@]|$(prefix)|g' \
43         -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
44         -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
45         -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
46         -e 's|@M4[@]|$(M4)|g' \
47         -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
48         -e 's|@AWK[@]|$(AWK)|g' \
49         -e 's|@VERSION[@]|$(VERSION)|g' \
50         -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
51         -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
53 # autoconf is written in M4sh.
54 # FIXME: this target should depend on the frozen files below lib/m4sugar,
55 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
56 # installation below the same $(prefix); work around this with --melt.
57 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
58         $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
60 ## All the scripts depend on Makefile so that they are rebuilt when the
61 ## prefix etc. changes.  It took quite a while to have the rule correct,
62 ## don't break it!
63 ## Use chmod -w to prevent people from editing the wrong file by accident.
64 $(bin_SCRIPTS): Makefile
65         rm -f $@ $@.tmp
66         srcdir=''; \
67           test -f ./$@.in || srcdir=$(srcdir)/; \
68           $(edit) $${srcdir}$@.in >$@.tmp
69         chmod +x $@.tmp
70         chmod a-w $@.tmp
71         mv $@.tmp $@
73 autoconf: autoconf.in
74 autoheader: $(srcdir)/autoheader.in
75 autom4te: $(srcdir)/autom4te.in
76 autoreconf: $(srcdir)/autoreconf.in
77 autoscan: $(srcdir)/autoscan.in
78 autoupdate: $(srcdir)/autoupdate.in
79 ifnames: $(srcdir)/ifnames.in
82 ## --------------- ##
83 ## Building TAGS.  ##
84 ## --------------- ##
86 TAGS_DEPENDENCIES = $(EXTRA_DIST)
88 letters = abcdefghijklmnopqrstuvwxyz
89 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
90 DIGITS = 0123456789
91 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
92 ETAGS_PERL = --lang=perl \
93   autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
94   ifnames.in
95 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
96   autoconf.in
98 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)