Guile portability
[make.git] / SMakefile.template
blobcf4fa44dadbf5baf182cf53b6e06859e379a95cc
1 # -*-Makefile-*- for building GNU make with smake
3 # NOTE: If you have no 'make' program at all to process this makefile,
4 # run 'build.sh' instead.
6 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7 # 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
8 # This file is part of GNU Make.
10 # GNU Make is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 3 of the License, or (at your option) any later
13 # version.
15 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18 # details.
20 # You should have received a copy of the GNU General Public License along with
21 # this program.  If not, see <http://www.gnu.org/licenses/>.
24 #       Makefile for GNU Make
27 # Ultrix 2.2 make doesn't expand the value of VPATH.
28 VPATH = /make-%VERSION%/
29 # This must repeat the value, because configure will remove `VPATH = .'.
30 srcdir = /make-%VERSION%/
32 CC = sc
33 RM = delete
34 MAKE = smake
36 CFLAGS =
37 CPPFLAGS =
38 LDFLAGS =
40 # Define these for your system as follows:
41 #       -DNO_ARCHIVES           To disable `ar' archive support.
42 #       -DNO_FLOAT              To avoid using floating-point numbers.
43 #       -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
44 #                               Some compilers apparently accept this
45 #                               without complaint but produce losing code,
46 #                               so beware.
47 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
48 # See also `config.h'.
49 defines =
51 # Which flavor of remote job execution support to use.
52 # The code is found in `remote-$(REMOTE).c'.
53 REMOTE = stub
55 # If you are using the GNU C library, or have the GNU getopt functions in
56 # your C library, you can comment these out.
57 GETOPT = getopt.o getopt1.o
58 GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
60 # If you are using the GNU C library, or have the GNU glob functions in
61 # your C library, you can comment this out.  GNU make uses special hooks
62 # into the glob functions to be more efficient (by using make's directory
63 # cache for globbing), so you must use the GNU functions even if your
64 # system's C library has the 1003.2 glob functions already.  Also, the glob
65 # functions in the AIX and HPUX C libraries are said to be buggy.
66 GLOB = Lib glob/glob.lib
68 # If your system doesn't have alloca, or the one provided is bad, define this.
69 ALLOCA = alloca.o
70 ALLOCA_SRC = $(srcdir)alloca.c
72 # If your system needs extra libraries loaded in, define them here.
73 # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
74 # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
75 # alloca.c instead on those machines.
76 LOADLIBES =
78 # Any extra object files your system needs.
79 extras = amiga.o
81 # Common prefix for machine-independent installed files.
82 prefix =
83 # Common prefix for machine-dependent installed files.
84 exec_prefix =
86 # Directory to install `make' in.
87 bindir = sc:c
88 # Directory to find libraries in for `-lXXX'.
89 libdir = lib:
90 # Directory to search by default for included makefiles.
91 includedir = include:
92 # Directory to install the Info files in.
93 infodir = doc:
94 # Directory to install the man page in.
95 mandir = t:
96 # Number to put on the man page filename.
97 manext = 1
98 # Prefix to put on installed `make' binary file name.
99 binprefix =
100 # Prefix to put on installed `make' man page file name.
101 manprefix = $(binprefix)
103 # Whether or not make needs to be installed setgid.
104 # The value should be either `true' or `false'.
105 # On many systems, the getloadavg function (used to implement the `-l'
106 # switch) will not work unless make is installed setgid kmem.
107 install_setgid = false
108 # Install make setgid to this group so it can read /dev/kmem.
109 group = sys
111 # Program to install `make'.
112 INSTALL_PROGRAM = copy
113 # Program to install the man page.
114 INSTALL_DATA = copy
115 # Generic install program.
116 INSTALL = copy
118 # Program to format Texinfo source into Info files.
119 MAKEINFO = makeinfo
120 # Program to format Texinfo source into DVI files.
121 TEXI2DVI = texi2dvi
123 # Programs to make tags files.
124 ETAGS = etags -w
125 CTAGS = ctags -w
127 #guile = guile.o
129 objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o   \
130        rule.o implicit.o default.o variable.o expand.o function.o    \
131        vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o   \
132        remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) $(extras) $(guile)
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)make.h $(srcdir)rule.h                \
145        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
148 .SUFFIXES:
149 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
151 all: make
152 info: make.info
153 dvi: make.dvi
154 # Some makes apparently use .PHONY as the default goal if it is before `all'.
155 .PHONY: all check info dvi
157 make.info: make.texinfo
158         $(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
160 make.dvi: make.texinfo
161         $(TEXI2DVI) $(srcdir)make.texinfo
163 make.ps: make.dvi
164         dvi2ps make.dvi > make.ps
166 make: $(objs) glob/glob.lib
167         $(CC) Link $(LDFLAGS) $(objs) $(LOADLIBES) To make.new
168         -delete quiet make
169         rename make.new make
171 # -I. is needed to find config.h in the build directory.
172 .c.o:
173         $(CC) $(defines) IDir "" IDir $(srcdir)glob \
174               $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
176 glob/glob.lib:
177         execute <<
178             cd glob
179             smake
182 tagsrcs = $(srcs) $(srcdir)remote-*.c
183 TAGS: $(tagsrcs)
184         $(ETAGS) $(tagsrcs)
185 tags: $(tagsrcs)
186         $(CTAGS) $(tagsrcs)
188 .PHONY: install installdirs
189 install:
190         copy make sc:c
192 loadavg: loadavg.c config.h
193         $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
194               loadavg.c $(LOADLIBES) -o $@
196 clean: glob-clean
197         -$(RM) -f make loadavg *.o core make.dvi
199 distclean: clean glob-realclean
200         -$(RM) -f Makefile config.h config.status build.sh
201         -$(RM) -f config.log config.cache
202         -$(RM) -f TAGS tags
203         -$(RM) -f make.?? make.??s make.log make.toc make.*aux
204         -$(RM) -f loadavg.c
206 realclean: distclean
207         -$(RM) -f make.info*
209 mostlyclean: clean
211 .PHONY: glob-clean glob-realclean
213 glob-clean glob-realclean:
214         execute <<
215         cd glob
216         smake $@