maint: update copyright year
[autoconf.git] / bin / Makefile.am
blobd19dc125d64517ddeca7d4d00e8eeb68799a089d
1 # Make Autoconf commands.
3 # Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 include ../lib/freeze.mk
20 bin_SCRIPTS = autom4te \
21               autoconf autoheader autoreconf ifnames autoscan autoupdate
23 EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
24              autoscan.in autom4te.in
26 # Files that should be removed, but which Automake does not know.
27 MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
29 # Get the release year from ../ChangeLog.
30 RELEASE_YEAR = \
31   `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
33 ## ------------- ##
34 ## The scripts.  ##
35 ## ------------- ##
37 edit = sed \
38         -e 's|@SHELL[@]|$(SHELL)|g' \
39         -e 's|@PERL[@]|$(PERL)|g' \
40         -e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \
41         -e 's|@bindir[@]|$(bindir)|g' \
42         -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
43         -e 's|@prefix[@]|$(prefix)|g' \
44         -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
45         -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
46         -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
47         -e 's|@M4[@]|$(M4)|g' \
48         -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
49         -e 's|@M4_GNU[@]|$(M4_GNU)|g' \
50         -e 's|@AWK[@]|$(AWK)|g' \
51         -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \
52         -e 's|@VERSION[@]|$(VERSION)|g' \
53         -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
54         -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
56 $(top_builddir)/bin/autom4te: autom4te
58 # autoconf is written in M4sh.
59 # FIXME: this target should depend on the frozen files below lib/m4sugar,
60 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
61 # installation below the same $(prefix); work around this with --melt.
62 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
63         $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
65 ## All the scripts depend on Makefile so that they are rebuilt when the
66 ## prefix etc. changes.  It took quite a while to have the rule correct,
67 ## don't break it!
68 ## Use chmod -w to prevent people from editing the wrong file by accident.
69 $(bin_SCRIPTS): Makefile
70         rm -f $@ $@.tmp
71         srcdir=''; \
72           test -f ./$@.in || srcdir=$(srcdir)/; \
73           $(edit) $${srcdir}$@.in >$@.tmp
74         chmod +x $@.tmp
75         chmod a-w $@.tmp
76         mv $@.tmp $@
78 autoconf: autoconf.in
79 autoheader: $(srcdir)/autoheader.in
80 autom4te: $(srcdir)/autom4te.in
81 autoreconf: $(srcdir)/autoreconf.in
82 autoscan: $(srcdir)/autoscan.in
83 autoupdate: $(srcdir)/autoupdate.in
84 ifnames: $(srcdir)/ifnames.in
87 ## --------------- ##
88 ## Building TAGS.  ##
89 ## --------------- ##
91 TAGS_DEPENDENCIES = $(EXTRA_DIST)
93 letters = abcdefghijklmnopqrstuvwxyz
94 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
95 DIGITS = 0123456789
96 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
97 ETAGS_PERL = --lang=perl \
98   autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
99   ifnames.in
100 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
101   autoconf.in
103 ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)