parallel build
[platform/upstream/make.git] / SMakefile
1 # -*-Makefile-*- for building GNU make with smake
2 #
3 # NOTE: If you have no 'make' program at all to process this makefile,
4 # run 'build.sh' instead.
5 #
6 # Copyright (C) 1995-2013 Free Software Foundation, Inc.
7 # This file is part of GNU Make.
8 #
9 # GNU Make is free software; you can redistribute it and/or modify it under
10 # the terms of the GNU General Public License as published by the Free Software
11 # Foundation; either version 3 of the License, or (at your option) any later
12 # version.
13 #
14 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17 # details.
18 #
19 # You should have received a copy of the GNU General Public License along with
20 # this program.  If not, see <http://www.gnu.org/licenses/>.
21
22 #
23 #       Makefile for GNU Make
24 #
25
26 # Ultrix 2.2 make doesn't expand the value of VPATH.
27 VPATH = /make-4.0/
28 # This must repeat the value, because configure will remove 'VPATH = .'.
29 srcdir = /make-4.0/
30
31 CC = sc
32 RM = delete
33 MAKE = smake
34
35 CFLAGS =
36 CPPFLAGS =
37 LDFLAGS =
38
39 # Define these for your system as follows:
40 #       -DNO_ARCHIVES           To disable 'ar' archive support.
41 #       -DNO_FLOAT              To avoid using floating-point numbers.
42 #       -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
43 #                               Some compilers apparently accept this
44 #                               without complaint but produce losing code,
45 #                               so beware.
46 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
47 # See also 'config.h'.
48 defines =
49
50 # Which flavor of remote job execution support to use.
51 # The code is found in 'remote-$(REMOTE).c'.
52 REMOTE = stub
53
54 # If you are using the GNU C library, or have the GNU getopt functions in
55 # your C library, you can comment these out.
56 GETOPT = getopt.o getopt1.o
57 GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
58
59 # If you are using the GNU C library, or have the GNU glob functions in
60 # your C library, you can comment this out.  GNU make uses special hooks
61 # into the glob functions to be more efficient (by using make's directory
62 # cache for globbing), so you must use the GNU functions even if your
63 # system's C library has the 1003.2 glob functions already.  Also, the glob
64 # functions in the AIX and HPUX C libraries are said to be buggy.
65 GLOB = Lib glob/glob.lib
66
67 # If your system doesn't have alloca, or the one provided is bad, define this.
68 ALLOCA = alloca.o
69 ALLOCA_SRC = $(srcdir)alloca.c
70
71 # If your system needs extra libraries loaded in, define them here.
72 # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
73 # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
74 # alloca.c instead on those machines.
75 LOADLIBES =
76
77 # Any extra object files your system needs.
78 extras = amiga.o
79
80 # Common prefix for machine-independent installed files.
81 prefix =
82 # Common prefix for machine-dependent installed files.
83 exec_prefix =
84
85 # Directory to install 'make' in.
86 bindir = sc:c
87 # Directory to find libraries in for '-lXXX'.
88 libdir = lib:
89 # Directory to search by default for included makefiles.
90 includedir = include:
91 # Directory to install the Info files in.
92 infodir = doc:
93 # Directory to install the man page in.
94 mandir = t:
95 # Number to put on the man page filename.
96 manext = 1
97 # Prefix to put on installed 'make' binary file name.
98 binprefix =
99 # Prefix to put on installed 'make' man page file name.
100 manprefix = $(binprefix)
101
102 # Whether or not make needs to be installed setgid.
103 # The value should be either 'true' or 'false'.
104 # On many systems, the getloadavg function (used to implement the '-l'
105 # switch) will not work unless make is installed setgid kmem.
106 install_setgid = false
107 # Install make setgid to this group so it can read /dev/kmem.
108 group = sys
109
110 # Program to install 'make'.
111 INSTALL_PROGRAM = copy
112 # Program to install the man page.
113 INSTALL_DATA = copy
114 # Generic install program.
115 INSTALL = copy
116
117 # Program to format Texinfo source into Info files.
118 MAKEINFO = makeinfo
119 # Program to format Texinfo source into DVI files.
120 TEXI2DVI = texi2dvi
121
122 # Programs to make tags files.
123 ETAGS = etags -w
124 CTAGS = ctags -w
125
126 #guile = guile.o
127
128 objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o   \
129        rule.o implicit.o default.o variable.o expand.o function.o    \
130        vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o   \
131        output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA)       \
132        $(extras) $(guile)
133
134 srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c             \
135        $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c         \
136        $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c             \
137        $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c        \
138        $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c     \
139        $(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c           \
140        $(srcdir)guile.c $(srcdir)remote-$(REMOTE).c                  \
141        $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c           \
142        $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC)           \
143        $(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h            \
144        $(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h             \
145        $(srcdir)output.c $(srcdir)output.h                           \
146        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
147
148
149 .SUFFIXES:
150 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
151
152 all: make
153 info: make.info
154 dvi: make.dvi
155 # Some makes apparently use .PHONY as the default goal if it is before 'all'.
156 .PHONY: all check info dvi
157
158 make.info: make.texinfo
159         $(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
160
161 make.dvi: make.texinfo
162         $(TEXI2DVI) $(srcdir)make.texinfo
163
164 make.ps: make.dvi
165         dvi2ps make.dvi > make.ps
166
167 make: $(objs) glob/glob.lib
168         $(CC) Link $(LDFLAGS) $(objs) $(LOADLIBES) To make.new
169         -delete quiet make
170         rename make.new make
171
172 # -I. is needed to find config.h in the build directory.
173 .c.o:
174         $(CC) $(defines) IDir "" IDir $(srcdir)glob \
175               $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
176
177 glob/glob.lib:
178         execute <<
179             cd glob
180             smake
181 <
182
183 tagsrcs = $(srcs) $(srcdir)remote-*.c
184 TAGS: $(tagsrcs)
185         $(ETAGS) $(tagsrcs)
186 tags: $(tagsrcs)
187         $(CTAGS) $(tagsrcs)
188
189 .PHONY: install installdirs
190 install:
191         copy make sc:c
192
193 loadavg: loadavg.c config.h
194         $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
195               loadavg.c $(LOADLIBES) -o $@
196
197 clean: glob-clean
198         -$(RM) -f make loadavg *.o core make.dvi
199
200 distclean: clean glob-realclean
201         -$(RM) -f Makefile config.h config.status build.sh
202         -$(RM) -f config.log config.cache
203         -$(RM) -f TAGS tags
204         -$(RM) -f make.?? make.??s make.log make.toc make.*aux
205         -$(RM) -f loadavg.c
206
207 realclean: distclean
208         -$(RM) -f make.info*
209
210 mostlyclean: clean
211
212 .PHONY: glob-clean glob-realclean
213
214 glob-clean glob-realclean:
215         execute <<
216         cd glob
217         smake $@
218 <
219
220 # --------------- DEPENDENCIES
221 #
222
223 # .deps/alloca.Po
224 # dummy
225
226 # .deps/ar.Po
227 ar.o: ar.c makeint.h config.h \
228  gnumake.h \
229  getopt.h \
230  gettext.h \
231  filedef.h hash.h dep.h \
232
233 # .deps/arscan.Po
234 arscan.o: arscan.c makeint.h config.h \
235  gnumake.h \
236  getopt.h \
237  gettext.h \
238
239 # .deps/commands.Po
240 commands.o: commands.c \
241  makeint.h config.h \
242  gnumake.h \
243  getopt.h \
244  gettext.h \
245  filedef.h hash.h dep.h \
246  variable.h job.h output.h \
247  commands.h
248
249 # .deps/default.Po
250 default.o: default.c makeint.h config.h \
251  gnumake.h \
252  getopt.h \
253  gettext.h \
254  filedef.h hash.h variable.h rule.h dep.h job.h output.h \
255  commands.h
256
257 # .deps/dir.Po
258 dir.o: dir.c makeint.h config.h \
259  gnumake.h \
260  getopt.h \
261  gettext.h \
262  hash.h filedef.h dep.h \
263
264 # .deps/expand.Po
265 expand.o: expand.c makeint.h config.h \
266  gnumake.h \
267  getopt.h \
268  gettext.h \
269  filedef.h hash.h job.h output.h \
270  commands.h variable.h rule.h
271
272 # .deps/file.Po
273 file.o: file.c makeint.h config.h \
274  gnumake.h \
275  getopt.h \
276  gettext.h \
277  filedef.h hash.h dep.h job.h output.h \
278  commands.h variable.h \
279  debug.h
280
281 # .deps/function.Po
282 function.o: function.c makeint.h config.h \
283  gnumake.h \
284  getopt.h \
285  gettext.h \
286  filedef.h hash.h \
287  variable.h dep.h job.h output.h \
288  commands.h debug.h
289
290 # .deps/getloadavg.Po
291 # dummy
292
293 # .deps/getopt.Po
294 getopt.o: getopt.c config.h \
295
296 # .deps/getopt1.Po
297 getopt1.o: getopt1.c config.h getopt.h \
298
299 # .deps/guile.Po
300 guile.o: guile.c makeint.h config.h \
301  gnumake.h \
302  getopt.h \
303  gettext.h \
304  debug.h filedef.h hash.h \
305  dep.h variable.h \
306  gmk-default.h
307
308 # .deps/hash.Po
309 hash.o: hash.c makeint.h config.h \
310  gnumake.h \
311  getopt.h \
312  gettext.h \
313  hash.h
314
315 # .deps/implicit.Po
316 implicit.o: implicit.c makeint.h config.h \
317  gnumake.h \
318  getopt.h \
319  gettext.h \
320  filedef.h hash.h rule.h \
321  dep.h debug.h variable.h job.h output.h \
322  commands.h
323
324 # .deps/job.Po
325 job.o: job.c makeint.h config.h \
326  gnumake.h \
327  getopt.h \
328  gettext.h \
329  job.h output.h \
330  debug.h filedef.h hash.h \
331  commands.h variable.h
332
333 # .deps/load.Po
334 load.o: load.c makeint.h config.h \
335  gnumake.h \
336  getopt.h \
337  gettext.h \
338  debug.h filedef.h hash.h \
339  variable.h
340
341 # .deps/loadapi.Po
342 loadapi.o: loadapi.c makeint.h config.h \
343  gnumake.h \
344  getopt.h \
345  gettext.h \
346  filedef.h hash.h \
347  variable.h dep.h
348
349 # .deps/loadavg-getloadavg.Po
350 # dummy
351
352 # .deps/main.Po
353 main.o: main.c makeint.h config.h \
354  gnumake.h \
355  getopt.h \
356  gettext.h \
357  filedef.h hash.h dep.h \
358  variable.h job.h output.h \
359  commands.h rule.h debug.h \
360  getopt.h
361
362 # .deps/misc.Po
363 misc.o: misc.c makeint.h config.h \
364  gnumake.h \
365  getopt.h \
366  gettext.h \
367  filedef.h hash.h dep.h \
368  debug.h \
369
370 # .deps/output.Po
371 output.o: output.c makeint.h config.h \
372  gnumake.h \
373  getopt.h \
374  gettext.h \
375  job.h output.h \
376
377 # .deps/read.Po
378 read.o: read.c makeint.h config.h \
379  gnumake.h \
380  getopt.h \
381  gettext.h \
382  filedef.h hash.h dep.h job.h output.h \
383  commands.h variable.h rule.h \
384  debug.h
385
386 # .deps/remake.Po
387 remake.o: remake.c makeint.h config.h \
388  gnumake.h \
389  getopt.h \
390  gettext.h \
391  filedef.h hash.h job.h \
392  output.h \
393  commands.h dep.h variable.h \
394  debug.h
395
396 # .deps/remote-cstms.Po
397 # dummy
398
399 # .deps/remote-stub.Po
400 remote-stub.o: remote-stub.c makeint.h config.h \
401  gnumake.h \
402  getopt.h \
403  gettext.h \
404  filedef.h hash.h job.h \
405  output.h \
406  commands.h
407
408 # .deps/rule.Po
409 rule.o: rule.c makeint.h config.h \
410  gnumake.h \
411  getopt.h \
412  gettext.h \
413  filedef.h hash.h dep.h job.h output.h \
414  commands.h variable.h rule.h
415
416 # .deps/signame.Po
417 signame.o: signame.c makeint.h config.h \
418  gnumake.h \
419  getopt.h \
420  gettext.h \
421
422 # .deps/strcache.Po
423 strcache.o: strcache.c makeint.h config.h \
424  gnumake.h \
425  getopt.h \
426  gettext.h \
427  hash.h
428
429 # .deps/variable.Po
430 variable.o: variable.c makeint.h config.h \
431  gnumake.h \
432  getopt.h \
433  gettext.h \
434  filedef.h hash.h dep.h job.h output.h \
435  commands.h variable.h rule.h
436
437 # .deps/version.Po
438 version.o: version.c config.h
439
440 # .deps/vmsjobs.Po
441 # dummy
442
443 # .deps/vpath.Po
444 vpath.o: vpath.c makeint.h config.h \
445  gnumake.h \
446  getopt.h \
447  gettext.h \
448  filedef.h hash.h \
449  variable.h