Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
[make.git] / Makefile.in
blobace70fbf66005d464924017ab530626466e98dc1
1 # NOTE: If you have no `make' program at all to process this makefile, run
2 # `build.sh' instead.
4 # Copyright (C) 1988,89,91,92,93,94,95,96 Free Software Foundation, Inc.
5 # This file is part of GNU Make.
7 # GNU Make is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
12 # GNU Make is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Make; see the file COPYING. If not, write to
19 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 # Makefile for GNU Make
25 # Ultrix 2.2 make doesn't expand the value of VPATH.
26 VPATH = @srcdir@
27 # This must repeat the value, because configure will remove `VPATH = .'.
28 srcdir = @srcdir@
30 CC = @CC@
32 CFLAGS = @CFLAGS@
33 CPPFLAGS = @CPPFLAGS@
34 LDFLAGS = @LDFLAGS@
36 # Define these for your system as follows:
37 # -DNO_ARCHIVES To disable `ar' archive support.
38 # -DNO_FLOAT To avoid using floating-point numbers.
39 # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
40 # Some compilers apparently accept this
41 # without complaint but produce losing code,
42 # so beware.
43 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
44 # See also `config.h'.
45 defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
47 # Which flavor of remote job execution support to use.
48 # The code is found in `remote-$(REMOTE).c'.
49 REMOTE = @REMOTE@
51 # If your system doesn't have alloca, or the one provided is bad, define this.
52 ALLOCA = @ALLOCA@
53 ALLOCA_SRC = $(srcdir)/alloca.c
55 # If your system needs extra libraries loaded in, define them here.
56 # System V probably need -lPW for alloca. HP-UX 7.0's alloca in
57 # libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
58 # alloca.c instead on those machines.
59 LOADLIBES = @LIBS@
61 # Any extra object files your system needs.
62 extras = @LIBOBJS@
64 # Common prefix for machine-independent installed files.
65 prefix = @prefix@
66 # Common prefix for machine-dependent installed files.
67 exec_prefix = @exec_prefix@
69 # Directory to install `make' in.
70 bindir = $(exec_prefix)/bin
71 # Directory to find libraries in for `-lXXX'.
72 libdir = $(exec_prefix)/lib
73 # Directory to search by default for included makefiles.
74 includedir = $(prefix)/include
75 # Directory to install the Info files in.
76 infodir = $(prefix)/info
77 # Directory to install the man page in.
78 mandir = $(prefix)/man/man$(manext)
79 # Number to put on the man page filename.
80 manext = 1
81 # Prefix to put on installed `make' binary file name.
82 binprefix =
83 # Prefix to put on installed `make' man page file name.
84 manprefix = $(binprefix)
86 # Whether or not make needs to be installed setgid.
87 # The value should be either `true' or `false'.
88 # On many systems, the getloadavg function (used to implement the `-l'
89 # switch) will not work unless make is installed setgid kmem.
90 install_setgid = @NEED_SETGID@
91 # Install make setgid to this group so it can read /dev/kmem.
92 group = @KMEM_GROUP@
94 # Program to install `make'.
95 INSTALL_PROGRAM = @INSTALL_PROGRAM@
96 # Program to install the man page.
97 INSTALL_DATA = @INSTALL_DATA@
98 # Generic install program.
99 INSTALL = @INSTALL@
101 # Program to format Texinfo source into Info files.
102 MAKEINFO = makeinfo
103 # Program to format Texinfo source into DVI files.
104 TEXI2DVI = texi2dvi
106 # Programs to make tags files.
107 ETAGS = etags -w
108 CTAGS = ctags -w
110 objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
111 rule.o implicit.o default.o variable.o expand.o function.o \
112 vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
113 getopt.o getopt1.o glob/libglob.a \
114 $(ALLOCA) $(extras)
115 srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
116 $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c \
117 $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c \
118 $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c \
119 $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c \
120 $(srcdir)/vpath.c $(srcdir)/version.c \
121 $(srcdir)/remote-$(REMOTE).c \
122 $(srcdir)/ar.c $(srcdir)/arscan.c \
123 $(srcdir)/signame.c $(srcdir)/signame.h \
124 $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h \
125 $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/filedef.h \
126 $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \
127 $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
130 .SUFFIXES:
131 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
133 all: make
134 info: make.info
135 dvi: make.dvi
136 # Some makes apparently use .PHONY as the default goal if it is before `all'.
137 .PHONY: all check info dvi
139 make.info: make.texinfo
140 $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
142 make.dvi: make.texinfo
143 $(TEXI2DVI) $(srcdir)/make.texinfo
145 make.ps: make.dvi
146 dvi2ps make.dvi > make.ps
148 make: $(objs)
149 $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
150 mv -f make.new make
152 # -I. is needed to find config.h in the build directory.
153 .c.o:
154 $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
155 $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
157 # For some losing Unix makes.
158 SHELL = /bin/sh
159 @SET_MAKE@
161 glob/libglob.a: FORCE config.h
162 cd glob; $(MAKE) libglob.a
163 FORCE:
165 tagsrcs = $(srcs) $(srcdir)/remote-*.c
166 TAGS: $(tagsrcs)
167 $(ETAGS) $(tagsrcs)
168 tags: $(tagsrcs)
169 $(CTAGS) $(tagsrcs)
171 .PHONY: install installdirs
172 install: installdirs \
173 $(bindir)/$(binprefix)make $(infodir)/make.info \
174 $(mandir)/$(manprefix)make.$(manext)
176 installdirs:
177 $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
179 $(bindir)/$(binprefix)make: make
180 $(INSTALL_PROGRAM) make $@.new
181 @if $(install_setgid); then \
182 if chgrp $(group) $@.new && chmod g+s $@.new; then \
183 echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
184 else \
185 echo "$@ needs to be owned by group $(group) and setgid;"; \
186 echo "otherwise the \`-l' option will probably not work."; \
187 echo "You may need special privileges to install $@."; \
188 fi; \
189 else true; fi
190 # Some systems can't deal with renaming onto a running binary.
191 -rm -f $@.old
192 -mv $@ $@.old
193 mv $@.new $@
195 $(infodir)/make.info: make.info
196 if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
197 for file in $${dir}/make.info*; do \
198 name="`basename $$file`"; \
199 $(INSTALL_DATA) $$file \
200 `echo $@ | sed "s,make.info\$$,$$name,"`; \
201 done
202 # Run install-info only if it exists.
203 # Use `if' instead of just prepending `-' to the
204 # line so we notice real errors from install-info.
205 # We use `$(SHELL) -c' because some shells do not
206 # fail gracefully when there is an unknown command.
207 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
208 if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
209 install-info --infodir=$(infodir) $$dir/make.info; \
210 else true; fi
212 $(mandir)/$(manprefix)make.$(manext): make.man
213 $(INSTALL_DATA) $(srcdir)/make.man $@
216 loadavg: loadavg.c config.h
217 $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
218 loadavg.c $(LOADLIBES) -o $@
219 # We copy getloadavg.c into a different file rather than compiling it
220 # directly because some compilers clobber getloadavg.o in the process.
221 loadavg.c: getloadavg.c
222 ln $(srcdir)/getloadavg.c loadavg.c || \
223 cp $(srcdir)/getloadavg.c loadavg.c
224 check-loadavg: loadavg
225 @echo The system uptime program believes the load average to be:
226 -uptime
227 @echo The GNU load average checking code believes:
228 ./loadavg
229 check: check-loadavg
232 .PHONY: clean realclean distclean mostlyclean
233 clean: glob-clean
234 -rm -f make loadavg *.o core make.dvi
235 distclean: clean glob-realclean
236 -rm -f Makefile config.h config.status build.sh stamp-config
237 -rm -f config.log config.cache
238 -rm -f TAGS tags
239 -rm -f make.?? make.??s make.log make.toc make.*aux
240 -rm -f loadavg.c
241 realclean: distclean
242 -rm -f make.info*
243 mostlyclean: clean
245 .PHONY: glob-clean glob-realclean
246 glob-clean glob-realclean:
247 cd glob; $(MAKE) $@
249 Makefile: config.status $(srcdir)/Makefile.in
250 $(SHELL) config.status
251 glob/Makefile: config.status $(srcdir)/glob/Makefile.in
252 $(SHELL) config.status
253 config.h: stamp-config ;
254 stamp-config: config.status $(srcdir)/config.h.in
255 $(SHELL) config.status
256 touch stamp-config
258 #configure: configure.in aclocal.m4
259 # cd $(srcdir) && autoconf $(ACFLAGS)
260 #config.h.in: configure.in aclocal.m4
261 # cd $(srcdir) && autoheader $(ACFLAGS)
263 # This tells versions [3.59,3.63) of GNU make not to export all variables.
264 .NOEXPORT:
266 # The automatically generated dependencies below may omit config.h
267 # because it is included with ``#include <config.h>'' rather than
268 # ``#include "config.h"''. So we add the explicit dependency to make sure.
269 $(objs): config.h
271 # Automatically generated dependencies will be put at the end of the file.
273 # Automatically generated dependencies.
274 commands.o: commands.c make.h dep.h filedef.h variable.h job.h \
275 commands.h
276 job.o: job.c make.h job.h filedef.h commands.h variable.h
277 dir.o: dir.c make.h
278 file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
279 misc.o: misc.c make.h dep.h
280 main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
281 getopt.h
282 read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
283 glob/glob.h
284 remake.o: remake.c make.h filedef.h job.h commands.h dep.h
285 rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \
286 rule.h
287 implicit.o: implicit.c make.h rule.h dep.h filedef.h
288 default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \
289 variable.h
290 variable.o: variable.c make.h dep.h filedef.h job.h commands.h \
291 variable.h
292 expand.o: expand.c make.h filedef.h job.h commands.h variable.h
293 function.o: function.c make.h filedef.h variable.h dep.h job.h \
294 commands.h
295 vpath.o: vpath.c make.h filedef.h variable.h
296 version.o: version.c
297 ar.o: ar.c make.h filedef.h dep.h
298 arscan.o: arscan.c make.h
299 signame.o: signame.c signame.h
300 remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h
301 getopt.o: getopt.c
302 getopt1.o: getopt1.c getopt.h
303 getloadavg.o: getloadavg.c