Skip to content

HTTPS clone URL

Subversion checkout URL

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