* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Set
[autoconf.git] / bin / Makefile.am
blob8a0c6af106c32de4a7e94dd998b5a8d9d04ce35e
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, 2006 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|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
50         -e 's|@AWK[@]|$(AWK)|g' \
51         -e 's|@VERSION[@]|$(VERSION)|g' \
52         -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
53         -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
55 # autoconf is written in M4sh.
56 # FIXME: this target should depend on the frozen files below lib/m4sugar,
57 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
58 # installation below the same $(prefix); work around this with --melt.
59 autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
60         $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
62 ## All the scripts depend on Makefile so that they are rebuilt when the
63 ## prefix etc. changes.  It took quite a while to have the rule correct,
64 ## don't break it!
65 ## Use chmod -w to prevent people from editing the wrong file by accident.
66 $(bin_SCRIPTS): Makefile
67         rm -f $@ $@.tmp
68         $(edit) `test -f ./$@.in || echo $(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)