Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 414 lines (362 sloc) 12.42 kB
fd7849c Add an iso_image target (iso-image as a target name doesn't play well…
bouyer authored
1 # $NetBSD: Makefile,v 1.247 2007/03/06 21:56:47 bouyer Exp $
4693743 Improve documentation.
cjs authored
2
69d1160 * Add two new (experimental) targets:
lukem authored
3 #
4693743 Improve documentation.
cjs authored
4 # This is the top-level makefile for building NetBSD. For an outline of
5 # how to build a snapshot or release, as well as other release engineering
4152b20 netbsd.org->NetBSD.org
salo authored
6 # information, see http://www.NetBSD.org/developers/releng/index.html
4693743 Improve documentation.
cjs authored
7 #
8 # Not everything you can set or do is documented in this makefile. In
9 # particular, you should review the files in /usr/share/mk (especially
10 # bsd.README) for general information on building programs and writing
11 # Makefiles within this structure, and see the comments in src/etc/Makefile
12 # for further information on installation and release set options.
13 #
14 # Variables listed below can be set on the make command line (highest
15 # priority), in /etc/mk.conf (middle priority), or in the environment
16 # (lowest priority).
17 #
18 # Variables:
f7a8ac6 Document MKOBJDIRS here, and sort the variable list in the comments
sommerfeld authored
19 # DESTDIR is the target directory for installation of the compiled
20 # software. It defaults to /. Note that programs are built against
21 # libraries installed in DESTDIR.
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
22 # MKMAN, if `no', will prevent building of manual pages.
23 # MKOBJDIRS, if not `no', will build object directories at
f7a8ac6 Document MKOBJDIRS here, and sort the variable list in the comments
sommerfeld authored
24 # an appropriate point in a build.
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
25 # MKSHARE, if `no', will prevent building and installing
4693743 Improve documentation.
cjs authored
26 # anything in /usr/share.
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
27 # MKUPDATE, if not `no', will avoid a `make cleandir' at the start of
6485a5c Fix whitespace usage in comment.
enami authored
28 # `make build', as well as having the effects listed in
29 # /usr/share/mk/bsd.README.
f40352f clarify some variable documentation; from cagney
mrg authored
30 # NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
6485a5c Fix whitespace usage in comment.
enami authored
31 # of the `make build'.
f979063 Document the cool NOCLEANDIR/NOINCLUDES options that somebody added.
toddpw authored
32 # NOINCLUDES will avoid the `make includes' usually done by `make build'.
4693743 Improve documentation.
cjs authored
33 #
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
34 # See mk.conf(5) for more details.
35 #
36 #
4693743 Improve documentation.
cjs authored
37 # Targets:
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
38 # build:
4626503 Install release files under "${RELEASEDIR}/${MACHINE}/..." instead of
lukem authored
39 # Builds a full release of NetBSD in DESTDIR, except for the
40 # /etc configuration files.
41 # If BUILD_DONE is set, this is an empty target.
42 # distribution:
43 # Builds a full release of NetBSD in DESTDIR, including the /etc
44 # configuration files.
45 # buildworld:
46 # As per `make distribution', except that it ensures that DESTDIR
47 # is not the root directory.
48 # installworld:
49 # Install the distribution from DESTDIR to INSTALLWORLDDIR (which
50 # defaults to the root directory). Ensures that INSTALLWORLDDIR
51 # is the not root directory if cross compiling.
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
52 # release:
4903b14 Modify "release" to invoke "make distribution" instead of "make build",
lukem authored
53 # Does a `make distribution', and then tars up the DESTDIR files
4626503 Install release files under "${RELEASEDIR}/${MACHINE}/..." instead of
lukem authored
54 # into RELEASEDIR/${MACHINE}, in release(7) format.
55 # (See etc/Makefile for more information on this.)
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
56 # regression-tests:
57 # Runs the regression tests in "regress" on this host.
b31e270 Add "sourcesets" argument/target, which builds source sets into
lukem authored
58 # sets:
59 # Populate ${RELEASEDIR}/${MACHINE}/binary/sets from ${DESTDIR}
60 # sourcesets:
61 # Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR}
0934a2e Add a new "syspkgs" target, which simply chains to the "syspkgs" target
apb authored
62 # syspkgs:
63 # Populate ${RELEASEDIR}/${MACHINE}/binary/syspkgs from ${DESTDIR}
468bd5d * Add an "iso-image" target in the top level Makefile,
apb authored
64 # iso-image:
65 # Create CD-ROM image in RELEASEDIR/MACHINE/installation.
66 # RELEASEDIR must already have been populated by `make release'
67 # or equivalent.
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
68 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
69 # Targets invoked by `make build,' in order:
70 # cleandir: cleans the tree.
c2c3d6f Reverse the order of "make cleandir" and "make obj" back to the way they
tv authored
71 # obj: creates object directories.
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
72 # do-tools: builds host toolchain.
a7041f0 Put do-make-tools before creating distrib-dirs (as binstall has to be
tv authored
73 # do-distrib-dirs: creates the distribution directories.
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
74 # includes: installs include files.
be4d05d update "targets invoked by make build" to match reality ...
lukem authored
75 # do-tools-compat: builds the "libnbcompat" library; needed for some
76 # random host tool programs in the source tree.
5b1b90c correct the comment describing the build order
lukem authored
77 # do-lib-csu: builds and installs prerequisites from lib/csu.
1b82a5b Switch to using GCC's supplied crtbegin / crtend files.
thorpej authored
78 # do-gnu-lib-crtstuff3: builds and installs prerequisites from
79 # gnu/lib/crtstuff3
ed6f193 fix some comments
lukem authored
80 # do-gnu-lib-libgcc3: builds and installs prerequisites from gnu/lib/libgcc3
7c3b4fc Add a do-lib-libc target which is processed after do-lib-csu. This
thorpej authored
81 # do-lib-libc: builds and installs prerequisites from lib/libc.
b9e597f Re-add intermediate dependall/install targets (do-lib-csu, do-lib,
tv authored
82 # do-lib: builds and installs prerequisites from lib.
83 # do-gnu-lib: builds and installs prerequisites from gnu/lib.
770f682 MKDYNAMICROOT for a.out
itohy authored
84 # do-ld.so: builds and installs prerequisites from libexec/ld.*_so.
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
85 # do-build: builds and installs the entire system.
19423fd Implement do-x11, to run "make build" in ./x11/
lukem authored
86 # do-x11: builds and installs X11R6 from src/x11 if ${MKX11} != "no"
ed6f193 fix some comments
lukem authored
87 # do-obsolete: installs the obsolete sets (for the postinstall-* targets).
69d1160 * Add two new (experimental) targets:
lukem authored
88 #
448982f pull in bsd.own.mk earlier, to get configuration variables.
cgd authored
89
79154dd * Always descend into "tools" regardless of USETOOLS setting. Instead,
tv authored
90 .if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == ""
91 .MAKEFLAGS: -m ${.CURDIR}/share/mk
92 .endif
93
69d1160 * Add two new (experimental) targets:
lukem authored
94 #
9d29a4f If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
tv authored
95 # If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
96 # not be the top level objdir, because "make obj" can happen in the *middle*
97 # of "make build" (long after <bsd.own.mk> is calculated it). So, pre-set
98 # _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}.
69d1160 * Add two new (experimental) targets:
lukem authored
99 #
9d29a4f If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
tv authored
100 _SRC_TOP_OBJ_=
101
79154dd * Always descend into "tools" regardless of USETOOLS setting. Instead,
tv authored
102 .include <bsd.own.mk>
a445358 change "Id" to "Header" in rcsid, and noted why etc was not in subdirs
cgd authored
103
69d1160 * Add two new (experimental) targets:
lukem authored
104 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
105 # Sanity check: make sure that "make build" is not invoked simultaneously
106 # with a standard recursive target.
69d1160 * Add two new (experimental) targets:
lukem authored
107 #
c2e4e20 Fix the rebuild of libgcc:
tv authored
108
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
109 .if make(build) || make(release) || make(snapshot)
110 .for targ in ${TARGETS:Nobj:Ncleandir}
111 .if make(${targ}) && !target(.BEGIN)
112 .BEGIN:
113 @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.'
114 @false
115 .endif
116 .endfor
046845e Add a 'NBUILDJOBS' variable which control the number of jobs started in
bouyer authored
117 .endif
118
20c3514 Split the _SUBDIR assignment into two assignments so you can do things
simonb authored
119 _SUBDIR= tools lib include gnu bin games libexec sbin usr.bin
2a2e817 .WAIT before distrib, since distrib may need things built earlier
thorpej authored
120 _SUBDIR+= usr.sbin share rescue sys etc .WAIT distrib regress
634e8c1 allow builds to work if directory games is missing. Closes pr misc/19…
explorer authored
121
69d1160 * Add two new (experimental) targets:
lukem authored
122 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
123 # Weed out directories that don't exist.
69d1160 * Add two new (experimental) targets:
lukem authored
124 #
e2c2314 make sure include and include/sys are populated before starting to
assar authored
125
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
126 .for dir in ${_SUBDIR}
a166943 don't filter out .WAIT when converting from _SUBDIR to SUBDIR
dbj authored
127 .if ("${dir}" == ".WAIT") || exists(${dir}/Makefile) && (${BUILD_${dir}:Uyes} != "no")
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
128 SUBDIR+= ${dir}
634e8c1 allow builds to work if directory games is missing. Closes pr misc/19…
explorer authored
129 .endif
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
130 .endfor
c330d79 allow toplevel makefile to descend into sys
cgd authored
131
72a7b88 Make regress only if directory exists. It can be optional.
brezak authored
132 .if exists(regress)
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
133 regression-tests: .PHONY .MAKE
7e08344 oops, clean that up a bit
cgd authored
134 @echo Running regression tests...
8993a70 Convert lines of the form
lukem authored
135 ${MAKEDIRTARGET} regress regress
bc33876 if not installing man pages, don't remake whatis db
cgd authored
136 .endif
7413e10 add some new targets to DTRT when installing/building
cgd authored
137
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
138 .if ${MKUNPRIVED} != "no"
62b3892 Fix what rev. 1.176 broke, in particular, doing a priv'd build into
thorpej authored
139 NOPOSTINSTALL= # defined
140 .endif
141
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
142 afterinstall: .PHONY .MAKE
a0e7536 Add a new target (infodir-meta:) that synthesizes the share/info/dir
perry authored
143 .if ${MKMAN} != "no"
8993a70 Convert lines of the form
lukem authored
144 ${MAKEDIRTARGET} share/man makedb
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
145 .endif
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
146 .if (${MKUNPRIVED} != "no" && ${MKINFO} != "no")
8993a70 Convert lines of the form
lukem authored
147 ${MAKEDIRTARGET} gnu/usr.bin/texinfo/install-info infodir-meta
a0e7536 Add a new target (infodir-meta:) that synthesizes the share/info/dir
perry authored
148 .endif
62b3892 Fix what rev. 1.176 broke, in particular, doing a priv'd build into
thorpej authored
149 .if !defined(NOPOSTINSTALL)
8993a70 Convert lines of the form
lukem authored
150 ${MAKEDIRTARGET} . postinstall-check
52b0450 In afterinstall, only run postinstall check if DESTDIR == / (or equiv…
lukem authored
151 .endif
6c495ae move postinstall from afterinstall to separate "postinstall-check" ta…
lukem authored
152
c39ab16 use usr.sbin/postinstall/postinstall instead of etc/postinstall
lukem authored
153 _POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall
154
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
155 postinstall-check: .PHONY
ff9a5ba run "./etc/postinstall check" in afterinstall:
lukem authored
156 @echo " === Post installation checks ==="
c39ab16 use usr.sbin/postinstall/postinstall instead of etc/postinstall
lukem authored
157 ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check
ff9a5ba run "./etc/postinstall check" in afterinstall:
lukem authored
158 @echo " ================================"
159
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
160 postinstall-fix: .NOTMAIN .PHONY
84bb4a2 we might as well provide a handy "postinstall-fix" target whilst here
lukem authored
161 @echo " === Post installation fixes ==="
c39ab16 use usr.sbin/postinstall/postinstall instead of etc/postinstall
lukem authored
162 ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix
6784880 Add postinstall-fix-obsolete (to invoke "postinstall fix obsolete" -
lukem authored
163 @echo " ==============================="
164
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
165 postinstall-fix-obsolete: .NOTMAIN .PHONY
6784880 Add postinstall-fix-obsolete (to invoke "postinstall fix obsolete" -
lukem authored
166 @echo " === Removing obsolete files ==="
c39ab16 use usr.sbin/postinstall/postinstall instead of etc/postinstall
lukem authored
167 ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete
6784880 Add postinstall-fix-obsolete (to invoke "postinstall fix obsolete" -
lukem authored
168 @echo " ==============================="
84bb4a2 we might as well provide a handy "postinstall-fix" target whilst here
lukem authored
169
a0e7536 Add a new target (infodir-meta:) that synthesizes the share/info/dir
perry authored
170
69d1160 * Add two new (experimental) targets:
lukem authored
171 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
172 # Targets (in order!) called by "make build".
69d1160 * Add two new (experimental) targets:
lukem authored
173 #
5b803cb remove support for building (with) GCC 2.95. also:
mrg authored
174 .if ${HAVE_GCC} == "3"
f99f07d maybe build gnu/lib/libgcc3 instead of libgcc[2]
mrg authored
175 LIBGCC_EXT=3
176 .else
5b803cb remove support for building (with) GCC 2.95. also:
mrg authored
177 LIBGCC_EXT=4
f99f07d maybe build gnu/lib/libgcc3 instead of libgcc[2]
mrg authored
178 .endif
a3028a2 If updating from a system which has a /usr/pkg/info/dir, move that to
tv authored
179
ca06aeb Warn when "make build" is started with USE_NEW_TOOLCHAIN on a platfor…
tv authored
180 BUILDTARGETS+= check-tools
0f2c0be Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was d…
lukem authored
181 .if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
182 BUILDTARGETS+= cleandir
a7041f0 Put do-make-tools before creating distrib-dirs (as binstall has to be
tv authored
183 .endif
c2c3d6f Reverse the order of "make cleandir" and "make obj" back to the way they
tv authored
184 .if ${MKOBJDIRS} != "no"
185 BUILDTARGETS+= obj
186 .endif
f76409a Change
tv authored
187 .if ${USETOOLS} == "yes"
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
188 BUILDTARGETS+= do-tools
2caf839 UPDATING (1.38) says:
mason authored
189 .endif
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
190 .if !defined(NODISTRIBDIRS)
191 BUILDTARGETS+= do-distrib-dirs
a7041f0 Put do-make-tools before creating distrib-dirs (as binstall has to be
tv authored
192 .endif
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
193 .if !defined(NOINCLUDES)
194 BUILDTARGETS+= includes
a7041f0 Put do-make-tools before creating distrib-dirs (as binstall has to be
tv authored
195 .endif
b042d91 Always build tools/compat, so that random host helper programs
thorpej authored
196 BUILDTARGETS+= do-tools-compat
8988beb Be more gcc like in the way we deal with libgcc so that sh3/hppa mill…
skrll authored
197 BUILDTARGETS+= do-lib-csu
f0e2d90 build libgcc early, if at all
drochner authored
198 .if ${MKGCC} != "no"
cca2483 retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3…
mrg authored
199 .if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4")
1b82a5b Switch to using GCC's supplied crtbegin / crtend files.
thorpej authored
200 BUILDTARGETS+= do-gnu-lib-crtstuff${LIBGCC_EXT}
86b7275 DO do-gnu-lib-crtstuff${LIBGCC_EXT} only when ${HAVE_GCC3} != "no",
tacha authored
201 .endif
f99f07d maybe build gnu/lib/libgcc3 instead of libgcc[2]
mrg authored
202 BUILDTARGETS+= do-gnu-lib-libgcc${LIBGCC_EXT}
f0e2d90 build libgcc early, if at all
drochner authored
203 .endif
8988beb Be more gcc like in the way we deal with libgcc so that sh3/hppa mill…
skrll authored
204 BUILDTARGETS+= do-lib-libc
5767649 only build do-lib-libdes if ${MKCRYPTO}!=no
lukem authored
205 BUILDTARGETS+= do-lib do-gnu-lib
206 BUILDTARGETS+= do-ld.so
207 BUILDTARGETS+= do-build
19423fd Implement do-x11, to run "make build" in ./x11/
lukem authored
208 .if ${MKX11} != "no"
209 BUILDTARGETS+= do-x11
210 .endif
431157a all:
lukem authored
211 BUILDTARGETS+= do-obsolete
a7041f0 Put do-make-tools before creating distrib-dirs (as binstall has to be
tv authored
212
69d1160 * Add two new (experimental) targets:
lukem authored
213 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
214 # Enforce proper ordering of some rules.
69d1160 * Add two new (experimental) targets:
lukem authored
215 #
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
216
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
217 .ORDER: ${BUILDTARGETS}
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
218 includes-lib: .PHONY includes-include includes-sys
219 includes-gnu: .PHONY includes-lib
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
220
69d1160 * Add two new (experimental) targets:
lukem authored
221 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
222 # Build the system and install into DESTDIR.
69d1160 * Add two new (experimental) targets:
lukem authored
223 #
ae121f5 The final step -- hook src/tools into the main build. If USE_NEW_TOO…
tv authored
224
a9a889a show the start time at the end of the build as well.
lukem authored
225 START_TIME!= date
226
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
227 build: .PHONY .MAKE
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
228 .if defined(BUILD_DONE)
229 @echo "Build already installed into ${DESTDIR}"
230 .else
a9a889a show the start time at the end of the build as well.
lukem authored
231 @echo "Build started at: ${START_TIME}"
5d1bfa2 Work around parallelism lossage, because .ORDER doesn't work yet
tv authored
232 .for tgt in ${BUILDTARGETS}
8993a70 Convert lines of the form
lukem authored
233 ${MAKEDIRTARGET} . ${tgt}
5d1bfa2 Work around parallelism lossage, because .ORDER doesn't work yet
tv authored
234 .endfor
8993a70 Convert lines of the form
lukem authored
235 ${MAKEDIRTARGET} etc install-etc-release
a9a889a show the start time at the end of the build as well.
lukem authored
236 @echo "Build started at: ${START_TIME}"
63eda99 Use printf rather than echo -n, since the former works on all POSIX s…
bjh21 authored
237 @printf "Build finished at: " && date
3acd090 Do not build libgcc 3 times.
mycroft authored
238 .endif
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
239
69d1160 * Add two new (experimental) targets:
lukem authored
240 #
fa27277 Add a wrapper for the "distribution" target, similar to the wrapper
thorpej authored
241 # Build a full distribution, but not a release (i.e. no sets into
69d1160 * Add two new (experimental) targets:
lukem authored
242 # ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != /
243 #
fa27277 Add a wrapper for the "distribution" target, similar to the wrapper
thorpej authored
244
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
245 distribution buildworld: .PHONY .MAKE
364a133 fix DESTDIR checks if !defined(DESTDIR)
lukem authored
246 .if make(buildworld) && \
247 (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
69d1160 * Add two new (experimental) targets:
lukem authored
248 @echo "Won't make ${.TARGET} with DESTDIR=/"
249 @false
250 .endif
8993a70 Convert lines of the form
lukem authored
251 ${MAKEDIRTARGET} . build NOPOSTINSTALL=1
252 ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
12ac6dc After running the body of the "distribution" target, do a "checkflist…
thorpej authored
253 .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
8993a70 Convert lines of the form
lukem authored
254 ${MAKEDIRTARGET} . postinstall-fix-obsolete
255 ${MAKEDIRTARGET} distrib/sets checkflist
12ac6dc After running the body of the "distribution" target, do a "checkflist…
thorpej authored
256 .endif
092e768 improve previous; show times at end of distribution/release/snapshot …
lukem authored
257 @echo "make ${.TARGET} started at: ${START_TIME}"
cf09c55 print date when make {distribution,release,snapshot} finished
lukem authored
258 @printf "make ${.TARGET} finished at: " && date
fa27277 Add a wrapper for the "distribution" target, similar to the wrapper
thorpej authored
259
69d1160 * Add two new (experimental) targets:
lukem authored
260 #
261 # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
262 # If installing to /, ensures that the host's operating system is NetBSD and
263 # the host's `uname -m` == ${MACHINE}.
264 #
265
266 HOST_UNAME_S!= uname -s
267 HOST_UNAME_M!= uname -m
268
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
269 installworld: .PHONY .MAKE
364a133 fix DESTDIR checks if !defined(DESTDIR)
lukem authored
270 .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
69d1160 * Add two new (experimental) targets:
lukem authored
271 @echo "Can't make ${.TARGET} to DESTDIR=/"
272 @false
273 .endif
274 .if !defined(INSTALLWORLDDIR) || \
275 ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
276 .if (${HOST_UNAME_S} != "NetBSD")
277 @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
278 @false
279 .endif
280 .if (${HOST_UNAME_M} != ${MACHINE})
281 @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
282 @false
283 .endif
284 .endif
8993a70 Convert lines of the form
lukem authored
285 ${MAKEDIRTARGET} distrib/sets installsets \
286 INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=
287 ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
69d1160 * Add two new (experimental) targets:
lukem authored
288 @echo "make ${.TARGET} started at: ${START_TIME}"
289 @printf "make ${.TARGET} finished at: " && date
290
291 #
b31e270 Add "sourcesets" argument/target, which builds source sets into
lukem authored
292 # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
ece364c - Add "sets" top-level Makefile target and build.sh operation.
lukem authored
293 #
294
0934a2e Add a new "syspkgs" target, which simply chains to the "syspkgs" target
apb authored
295 .for tgt in sets sourcesets syspkgs
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
296 ${tgt}: .PHONY .MAKE
8993a70 Convert lines of the form
lukem authored
297 ${MAKEDIRTARGET} distrib/sets ${tgt}
b31e270 Add "sourcesets" argument/target, which builds source sets into
lukem authored
298 .endfor
ece364c - Add "sets" top-level Makefile target and build.sh operation.
lukem authored
299
300 #
4903b14 Modify "release" to invoke "make distribution" instead of "make build",
lukem authored
301 # Build a release or snapshot (implies "make distribution"). Note that
12ac6dc After running the body of the "distribution" target, do a "checkflist…
thorpej authored
302 # in this case, the set lists will be checked before the tar files
303 # are made.
69d1160 * Add two new (experimental) targets:
lukem authored
304 #
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
305
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
306 release snapshot: .PHONY .MAKE
4903b14 Modify "release" to invoke "make distribution" instead of "make build",
lukem authored
307 ${MAKEDIRTARGET} . distribution
308 ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
092e768 improve previous; show times at end of distribution/release/snapshot …
lukem authored
309 @echo "make ${.TARGET} started at: ${START_TIME}"
cf09c55 print date when make {distribution,release,snapshot} finished
lukem authored
310 @printf "make ${.TARGET} finished at: " && date
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
311
69d1160 * Add two new (experimental) targets:
lukem authored
312 #
468bd5d * Add an "iso-image" target in the top level Makefile,
apb authored
313 # Create a CD-ROM image.
314 #
315
316 iso-image: .PHONY
fd7849c Add an iso_image target (iso-image as a target name doesn't play well…
bouyer authored
317 ${MAKEDIRTARGET} distrib iso_image
468bd5d * Add an "iso-image" target in the top level Makefile,
apb authored
318 ${MAKEDIRTARGET} etc iso-image
319 @echo "make ${.TARGET} started at: ${START_TIME}"
320 @printf "make ${.TARGET} finished at: " && date
321
322 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
323 # Special components of the "make build" process.
69d1160 * Add two new (experimental) targets:
lukem authored
324 #
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
325
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
326 check-tools: .PHONY
b97d965 Consistently check ${TOOLCHAIN_MISSING} against "no".
lukem authored
327 .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
b645c30 * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
thorpej authored
328 @echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.'
329 @echo '*** May result in a failed build or corrupt binaries!'
330 .elif defined(EXTERNAL_TOOLCHAIN)
331 @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
ca06aeb Warn when "make build" is started with USE_NEW_TOOLCHAIN on a platfor…
tv authored
332 .endif
c74b501 Correct BUGS in BUILDING.mdoc now that most ports are USE_NEW_TOOLCHAIN
sommerfeld authored
333 .if defined(NBUILDJOBS)
334 @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
335 .endif
ca06aeb Warn when "make build" is started with USE_NEW_TOOLCHAIN on a platfor…
tv authored
336
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
337 do-distrib-dirs: .PHONY .MAKE
bb154af Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it…
jmc authored
338 .if !defined(DESTDIR) || ${DESTDIR} == ""
8993a70 Convert lines of the form
lukem authored
339 ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
bb154af Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it…
jmc authored
340 .else
8993a70 Convert lines of the form
lukem authored
341 ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
bb154af Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it…
jmc authored
342 .endif
c76af6d fix PR#12832: split `make build' up into these steps (from new the
mrg authored
343
2205992 Add do-{target} aliases for: cleandir obj includes
lukem authored
344 .for targ in cleandir obj includes
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
345 do-${targ}: .PHONY ${targ}
2205992 Add do-{target} aliases for: cleandir obj includes
lukem authored
346 @true
347 .endfor
348
1b82a5b Switch to using GCC's supplied crtbegin / crtend files.
thorpej authored
349 .for dir in tools tools/compat lib/csu gnu/lib/crtstuff${LIBGCC_EXT} gnu/lib/libgcc${LIBGCC_EXT} lib/libc lib/libdes lib gnu/lib
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
350 do-${dir:S/\//-/g}: .PHONY .MAKE
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
351 .for targ in dependall install
8993a70 Convert lines of the form
lukem authored
352 ${MAKEDIRTARGET} ${dir} ${targ}
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
353 .endfor
354 .endfor
b9e597f Re-add intermediate dependall/install targets (do-lib-csu, do-lib,
tv authored
355
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
356 do-ld.so: .PHONY .MAKE
1d3f1b5 add "do-ld.elf_so" target, which builds & installs libexec/ld.elf_so.
lukem authored
357 .for targ in dependall install
770f682 MKDYNAMICROOT for a.out
itohy authored
358 .if (${OBJECT_FMT} == "a.out")
8993a70 Convert lines of the form
lukem authored
359 ${MAKEDIRTARGET} libexec/ld.aout_so ${targ}
770f682 MKDYNAMICROOT for a.out
itohy authored
360 .endif
361 .if (${OBJECT_FMT} == "ELF")
8993a70 Convert lines of the form
lukem authored
362 ${MAKEDIRTARGET} libexec/ld.elf_so ${targ}
770f682 MKDYNAMICROOT for a.out
itohy authored
363 .endif
1d3f1b5 add "do-ld.elf_so" target, which builds & installs libexec/ld.elf_so.
lukem authored
364 .endfor
365
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
366 do-build: .PHONY .MAKE
c46e0aa Rather than build in `tools' and `lib' twice, build `tools' and `lib'
tv authored
367 .for targ in dependall install
8993a70 Convert lines of the form
lukem authored
368 ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
c46e0aa Rather than build in `tools' and `lib' twice, build `tools' and `lib'
tv authored
369 .endfor
7413e10 add some new targets to DTRT when installing/building
cgd authored
370
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
371 do-x11: .PHONY .MAKE
8993a70 Convert lines of the form
lukem authored
372 ${MAKEDIRTARGET} x11 build
19423fd Implement do-x11, to run "make build" in ./x11/
lukem authored
373
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
374 do-obsolete: .PHONY .MAKE
8993a70 Convert lines of the form
lukem authored
375 ${MAKEDIRTARGET} etc install-obsolete-lists
431157a all:
lukem authored
376
69d1160 * Add two new (experimental) targets:
lukem authored
377 #
c210e5b Overhaul and simplify the top level Makefile, and add some sanity che…
tv authored
378 # Speedup stubs for some subtrees that don't need to run these rules.
379 # (Tells <bsd.subdir.mk> not to recurse for them.)
69d1160 * Add two new (experimental) targets:
lukem authored
380 #
f03f6b1 Add release and snapshot targets. (They do the same thing.)
cjs authored
381
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
382 .for dir in bin etc distrib games libexec regress sbin usr.sbin tools
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
383 includes-${dir}: .PHONY
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
384 @true
385 .endfor
386 .for dir in etc distrib regress
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
387 install-${dir}: .PHONY
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
388 @true
389 .endfor
390
69d1160 * Add two new (experimental) targets:
lukem authored
391 #
85a68ff Major overhaul of src/tools and host toolchain. Summary of changes:
tv authored
392 # XXX this needs to change when distrib Makefiles are recursion compliant
69d1160 * Add two new (experimental) targets:
lukem authored
393 # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
394 #
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
395 dependall-distrib depend-distrib all-distrib: .PHONY
6f15fa2 Use @true instead of @${TRUE} in includes-foo targets, since there is no
nathanw authored
396 @true
8626600 - Remove the include of Makefile.tools; this will be done elsewhere.
tv authored
397
919514d Rename a large chunk of the make(1) variables which refer to a
lukem authored
398 .include <bsd.sys.mk>
4fc1f4e Create an objdir here for storage of timestamps, build-wide data, and so
tv authored
399 .include <bsd.obj.mk>
e496a61 Add "params" target, to display the value of various variables.
lukem authored
400 .include <bsd.kernobj.mk>
79154dd * Always descend into "tools" regardless of USETOOLS setting. Instead,
tv authored
401 .include <bsd.subdir.mk>
45e2272 Add rules for generating plaintext and HTML versions of the "BUILDING"
tv authored
402
f1173c1 Apply the .PHONY attribute where appropriate.
lukem authored
403 build-docs: .PHONY ${.CURDIR}/BUILDING
60f23ab move BUILDING.mdoc -> doc/BUILDING.mdoc
lukem authored
404 ${.CURDIR}/BUILDING: doc/BUILDING.mdoc
17f2dd7 MAKEVERBOSE support for build-docs
lukem authored
405 ${_MKMSG_CREATE} ${.TARGET}
7645298 redo previous (functionality rollback of 1.213) to retain the style o…
lukem authored
406 ${TOOL_GROFF} -mdoc -Tascii -P-bou $> >$@
e496a61 Add "params" target, to display the value of various variables.
lukem authored
407
408
409 #
410 # Display current make(1) parameters
411 #
e636f08 Add .MAKE to all targets that use ${MAKEDIRTARGET} otherwise make closes
dsl authored
412 params: .PHONY .MAKE
8993a70 Convert lines of the form
lukem authored
413 ${MAKEDIRTARGET} etc params
Something went wrong with that request. Please try again.