summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: a6c94d45c57029016c34ec6d2dee0bb2a345c1ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# Makefile for Autoconf.
# Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = @srcdir@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
M4 = @M4@
AWK = @AWK@
PERL = @PERL@

# Programs that are ALWAYS installed (and are created in the build dir).
ASCRIPTS = autoconf autoheader autoreconf autoupdate ifnames 

# M4 input that is frozen.
M4FROZEN = autoconf.m4f autoheader.m4f

# All programs, including those only installed if you have perl.
SCRIPTS = $(ASCRIPTS) @SCRIPTS@

transform=@program_transform_name@

prefix = @prefix@
exec_prefix = @exec_prefix@

# Directory in which to install scripts.
bindir = @bindir@

# Directory in which to install library files.
datadir = @datadir@
acdatadir = $(datadir)/autoconf

# Directory in which to install documentation info files.
infodir = @infodir@

#### End of system configuration section. ####

SHELL = @SHELL@

SUBDIRS = testsuite

M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4

# Files that can be generated, but should be up to date for a distribution.
DISTDEP = info Makefile
# Files to distribute.
DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
	Makefile.in NEWS README TODO $(M4FILES) \
	acconfig.h acfunctions acheaders acidentifiers \
	acmakevars acprograms autoconf.info* \
	autoconf.sh autoconf.texi install.texi \
	autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
	config.guess config.sub configure configure.in \
	install-sh mkinstalldirs texinfo.tex \
	testsuite/Makefile.in testsuite/config/*.exp \
	testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
	standards.texi make-stds.texi standards.info*

editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \
	's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g' \
	-e 's,@''SHELL''@,$(SHELL),g'
editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'

all: ${SCRIPTS} ${M4FROZEN} info

.SUFFIXES:
.SUFFIXES: .sh .pl .m4 .m4f

.sh:
	rm -f $@ $@.tmp
	$(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@

.pl:
	rm -f $@ $@.tmp
	$(editpl) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@

.m4.m4f:
	@case `$(M4) --help </dev/null 2>&1` in \
	*reload-state*) echo freezing $*.m4; \
	  $(M4) -F $*.m4f -I${srcdir} ${srcdir}/$*.m4 ;; \
	*traditional*) ;; \
	*) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \
	esac

autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4

info: autoconf.info @standards_info@ INSTALL

# Use --no-split to avoid creating filenames > 14 chars.
autoconf.info: autoconf.texi install.texi
	$(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@

INSTALL: install.texi
	$(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
	--no-headers --no-validate

standards.info: standards.texi make-stds.texi
	$(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@

dvi: autoconf.dvi @standards_dvi@

autoconf.dvi: autoconf.texi
	$(TEXI2DVI) $(srcdir)/autoconf.texi

standards.dvi: standards.texi make-stds.texi
	$(TEXI2DVI) $(srcdir)/standards.texi

check: all
	rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`; \
	test -r install-sh || cp $(srcdir)/install-sh .; \
	cd testsuite && ${MAKE} $@ AUTOCONF=$$rootme/autoconf \
	AUTOCONFFLAGS="-m $$srcrootme"

installcheck: all install
	cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@

installdirs:
	$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)

install: all $(M4FILES) acconfig.h installdirs install-info
	for p in $(ASCRIPTS); do \
	  $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
	done
	for i in $(M4FROZEN); do \
	  $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
	done
	for i in $(M4FILES) acconfig.h; do \
	  $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
	done
	-if test -f autoscan; then \
	$(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
	for i in acfunctions acheaders acidentifiers acprograms \
	  acmakevars; do \
	$(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
	done; \
	else :; fi

# Don't cd, to avoid breaking install-sh references.
install-info: info installdirs
	if test -f autoconf.info; then \
	  for i in *.info*; do \
	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
	  done; \
	else \
	  for i in $(srcdir)/*.info*; do \
	    $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
	  done; \
	fi

uninstall:
	for p in $(SCRIPTS); do \
	  rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
	done
	rm -fr $(acdatadir)
	cd $(infodir) && rm -f autoconf.info*
	if test -f standards.info || test -f $(srcdir)/standards.info; \
	then cd $(infodir) && rm -f standards.info*; fi

${srcdir}/configure: configure.in $(M4FILES)
	cd $(srcdir) && \
	rm -f configure configure.tmp && \
	$(M4) autoconf.m4 configure.in > configure.tmp && \
	chmod +x configure.tmp && mv configure.tmp configure
Makefile: Makefile.in config.status
	$(SHELL) ./config.status
config.status: configure
	$(SHELL) ./config.status --recheck

maintainer-clean::
	@echo "This command is intended for maintainers to use;"
	@echo "rebuilding the deleted files requires makeinfo."
	rm -f TAGS *.info* INSTALL

clean mostlyclean distclean maintainer-clean::
	for dir in $(SUBDIRS); do \
	  echo making $@ in $$dir ; \
	  (cd $$dir && $(MAKE) $@) ; \
	done

clean mostlyclean distclean maintainer-clean::
	rm -f $(SCRIPTS) *.tmp 
	rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
	rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
	rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas

distclean maintainer-clean::
	rm -f Makefile config.status config.cache config.log

TAGS:
	etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi

# Don't depend on DISTFILES because there's no rule for "standards.info*".
dist: $(DISTDEP)
	distname=`sed -e '/define(AC_ACVERSION,/!d' \
	-e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' -e q acgeneral.m4`; \
	rm -fr $$distname; \
	mkdir $$distname $$distname/testsuite $$distname/testsuite/config \
	$$distname/testsuite/lib $$distname/testsuite/autoconf.g \
	$$distname/testsuite/autoconf.s; \
	for file in $(DISTFILES); do \
	  ln $$file $$distname/$$file \
	  || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
	done; \
	chmod -R a+rX $$distname; \
	tar -chz -f $$distname.tar.gz $$distname; \
	rm -fr $$distname