Quick changes for make 3.76.1.
[platform/upstream/make.git] / Makefile.ami
1 # NOTE: If you have no `make' program at all to process this makefile, run
2 # `build.sh' instead.
3 #
4 # Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
5 # This file is part of GNU Make.
6 #
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.
11 #
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.
16 #
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.
20
21 #
22 #       Makefile for GNU Make
23 #
24
25 CC = sc
26 RM = delete
27
28 CFLAGS =
29 CPPFLAGS =
30 LDFLAGS =
31
32 # Define these for your system as follows:
33 #       -DNO_ARCHIVES           To disable `ar' archive support.
34 #       -DNO_FLOAT              To avoid using floating-point numbers.
35 #       -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
36 #                               Some compilers apparently accept this
37 #                               without complaint but produce losing code,
38 #                               so beware.
39 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
40 # See also `config.h'.
41 defines =
42
43 # Which flavor of remote job execution support to use.
44 # The code is found in `remote-$(REMOTE).c'.
45 REMOTE = stub
46
47 # If you are using the GNU C library, or have the GNU getopt functions in
48 # your C library, you can comment these out.
49 GETOPT = getopt.o getopt1.o
50 GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
51
52 # If you are using the GNU C library, or have the GNU glob functions in
53 # your C library, you can comment this out.  GNU make uses special hooks
54 # into the glob functions to be more efficient (by using make's directory
55 # cache for globbing), so you must use the GNU functions even if your
56 # system's C library has the 1003.2 glob functions already.  Also, the glob
57 # functions in the AIX and HPUX C libraries are said to be buggy.
58 GLOB = glob/glob.lib
59
60 # If your system doesn't have alloca, or the one provided is bad, define this.
61 ALLOCA = alloca.o
62 ALLOCA_SRC = $(srcdir)alloca.c
63
64 # If your system needs extra libraries loaded in, define them here.
65 # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
66 # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
67 # alloca.c instead on those machines.
68 LOADLIBES =
69
70 # Any extra object files your system needs.
71 extras = amiga.o
72
73 # Common prefix for machine-independent installed files.
74 prefix =
75 # Common prefix for machine-dependent installed files.
76 exec_prefix =
77
78 # Directory to install `make' in.
79 bindir = sc:c
80 # Directory to find libraries in for `-lXXX'.
81 libdir = lib:
82 # Directory to search by default for included makefiles.
83 includedir = include:
84 # Directory to install the Info files in.
85 infodir = doc:
86 # Directory to install the man page in.
87 mandir = t:
88 # Number to put on the man page filename.
89 manext = 1
90 # Prefix to put on installed `make' binary file name.
91 binprefix =
92 # Prefix to put on installed `make' man page file name.
93 manprefix = $(binprefix)
94
95 # Whether or not make needs to be installed setgid.
96 # The value should be either `true' or `false'.
97 # On many systems, the getloadavg function (used to implement the `-l'
98 # switch) will not work unless make is installed setgid kmem.
99 install_setgid = false
100 # Install make setgid to this group so it can read /dev/kmem.
101 group = sys
102
103 # Program to install `make'.
104 INSTALL_PROGRAM = copy
105 # Program to install the man page.
106 INSTALL_DATA = copy
107 # Generic install program.
108 INSTALL = copy
109
110 # Program to format Texinfo source into Info files.
111 MAKEINFO = makeinfo
112 # Program to format Texinfo source into DVI files.
113 TEXI2DVI = texi2dvi
114
115 # Programs to make tags files.
116 ETAGS = etags -w
117 CTAGS = ctags -w
118
119 objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o      \
120        rule.o implicit.o default.o variable.o expand.o function.o       \
121        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o     \
122        $(GETOPT) $(ALLOCA) $(extras)
123 srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c             \
124        $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c         \
125        $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c             \
126        $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c        \
127        $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c     \
128        $(srcdir)vpath.c $(srcdir)version.c                            \
129        $(srcdir)remote-$(REMOTE).c                                     \
130        $(srcdir)ar.c $(srcdir)arscan.c                                \
131        $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC)            \
132        $(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h            \
133        $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h                \
134        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
135
136
137 .SUFFIXES:
138 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
139
140 all: make
141 info: make.info
142 dvi: make.dvi
143 # Some makes apparently use .PHONY as the default goal if it is before `all'.
144 .PHONY: all check info dvi
145
146 make.info: make.texinfo
147         $(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
148
149 make.dvi: make.texinfo
150         $(TEXI2DVI) $(srcdir)make.texinfo
151
152 make.ps: make.dvi
153         dvi2ps make.dvi > make.ps
154
155 make: $(objs) $(GLOB)
156         $(CC) Link $(LDFLAGS) $(objs) Lib $(GLOB) $(LOADLIBES) To make.new
157         -delete make
158         rename make.new make
159
160 TMPFILE = t:Make$$
161
162 $(GLOB):
163         cd glob @@\
164         $(MAKE) -$(MAKEFLAGS) -f Makefile
165
166 # -I. is needed to find config.h in the build directory.
167 OUTPUT_OPTION =
168 .c.o:
169         $(CC) $(defines) IDir "" IDir glob \
170               $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
171
172 # For some losing Unix makes.
173 SHELL = /bin/sh
174 #@SET_MAKE@
175
176 glob/libglob.a: FORCE config.h
177         cd glob; $(MAKE) libglob.a
178 FORCE:
179
180 tagsrcs = $(srcs) $(srcdir)remote-*.c
181
182 .PHONY: install installdirs
183 install: installdirs \
184          $(bindir)$(binprefix)make $(infodir)make.info \
185          $(mandir)$(manprefix)make.$(manext)
186
187 installdirs:
188         $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
189
190 $(bindir)$(binprefix)make: make
191         $(INSTALL_PROGRAM) make $@.new
192         @if $(install_setgid); then \
193            if chgrp $(group) $@.new && chmod g+s $@.new; then \
194              echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
195            else \
196              echo "$@ needs to be owned by group $(group) and setgid;"; \
197              echo "otherwise the \`-l' option will probably not work."; \
198              echo "You may need special privileges to install $@."; \
199            fi; \
200          else true; fi
201 # Some systems can't deal with renaming onto a running binary.
202         -$(RM) $@.old
203         -mv $@ $@.old
204         mv $@.new $@
205
206 $(infodir)make.info: make.info
207         if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
208         for file in $${dir}/make.info*; do \
209           name="`basename $$file`"; \
210           $(INSTALL_DATA) $$file \
211             `echo $@ | sed "s,make.info\$$,$$name,"`; \
212         done
213 # Run install-info only if it exists.
214 # Use `if' instead of just prepending `-' to the
215 # line so we notice real errors from install-info.
216 # We use `$(SHELL) -c' because some shells do not
217 # fail gracefully when there is an unknown command.
218         if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
219           if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
220           install-info --infodir=$(infodir) $$dir/make.info; \
221         else true; fi
222
223 $(mandir)$(manprefix)make.$(manext): make.man
224         $(INSTALL_DATA) $(srcdir)make.man $@
225
226
227 loadavg: loadavg.c config.h
228         $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
229               loadavg.c $(LOADLIBES) -o $@
230 # We copy getloadavg.c into a different file rather than compiling it
231 # directly because some compilers clobber getloadavg.o in the process.
232 loadavg.c: getloadavg.c
233         ln $(srcdir)getloadavg.c loadavg.c || \
234         cp $(srcdir)getloadavg.c loadavg.c
235 check-loadavg: loadavg
236         @echo The system uptime program believes the load average to be:
237         -uptime
238         @echo The GNU load average checking code believes:
239         ./loadavg
240 check: check-loadavg
241
242
243 .PHONY: clean realclean distclean mostlyclean
244 clean: glob-clean
245         -$(RM) make loadavg "#?.o" core make.dvi
246
247 distclean: clean glob-realclean
248         -$(RM) Makefile config.h config.status build.sh
249         -$(RM) config.log config.cache
250         -$(RM) TAGS tags
251         -$(RM) make.?? make.??s make.log make.toc make.*aux
252         -$(RM) loadavg.c
253
254 realclean: distclean
255         -$(RM) make.info*
256 mostlyclean: clean
257
258 .PHONY: glob-clean glob-realclean
259 glob-clean glob-realclean:
260         cd glob @@\
261         $(MAKE) $@
262
263 # This tells versions [3.59,3.63) of GNU make not to export all variables.
264 .NOEXPORT:
265
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
270
271 # Automatically generated dependencies will be put at the end of the file.
272
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 amiga.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
304 amiga.o: amiga.c make.h variable.h amiga.h