| @@ -1,552 +1,552 @@ | | | @@ -1,552 +1,552 @@ |
1 | # $NetBSD: Makefile,v 1.332 2020/05/15 16:34:44 christos Exp $ | | 1 | # $NetBSD: Makefile,v 1.333 2020/10/29 20:26:24 uwe Exp $ |
2 | | | 2 | |
3 | # | | 3 | # |
4 | # This is the top-level makefile for building NetBSD. For an outline of | | 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 | | 5 | # how to build a snapshot or release, as well as other release engineering |
6 | # information, see http://www.NetBSD.org/developers/releng/index.html | | 6 | # information, see http://www.NetBSD.org/developers/releng/index.html |
7 | # | | 7 | # |
8 | # Not everything you can set or do is documented in this makefile. In | | 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 | | 9 | # particular, you should review the files in /usr/share/mk (especially |
10 | # bsd.README) for general information on building programs and writing | | 10 | # bsd.README) for general information on building programs and writing |
11 | # Makefiles within this structure, and see the comments in src/etc/Makefile | | 11 | # Makefiles within this structure, and see the comments in src/etc/Makefile |
12 | # for further information on installation and release set options. | | 12 | # for further information on installation and release set options. |
13 | # | | 13 | # |
14 | # Variables listed below can be set on the make command line (highest | | 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 | | 15 | # priority), in /etc/mk.conf (middle priority), or in the environment |
16 | # (lowest priority). | | 16 | # (lowest priority). |
17 | # | | 17 | # |
18 | # Variables: | | 18 | # Variables: |
19 | # DESTDIR is the target directory for installation of the compiled | | 19 | # DESTDIR is the target directory for installation of the compiled |
20 | # software. It defaults to /. Note that programs are built against | | 20 | # software. It defaults to /. Note that programs are built against |
21 | # libraries installed in DESTDIR. | | 21 | # libraries installed in DESTDIR. |
22 | # MKMAN, if `no', will prevent building of manual pages. | | 22 | # MKMAN, if `no', will prevent building of manual pages. |
23 | # MKOBJDIRS, if not `no', will build object directories at | | 23 | # MKOBJDIRS, if not `no', will build object directories at |
24 | # an appropriate point in a build. | | 24 | # an appropriate point in a build. |
25 | # MKSHARE, if `no', will prevent building and installing | | 25 | # MKSHARE, if `no', will prevent building and installing |
26 | # anything in /usr/share. | | 26 | # anything in /usr/share. |
27 | # MKUPDATE, if not `no', will avoid a `make cleandir' at the start of | | 27 | # MKUPDATE, if not `no', will avoid a `make cleandir' at the start of |
28 | # `make build', as well as having the effects listed in | | 28 | # `make build', as well as having the effects listed in |
29 | # /usr/share/mk/bsd.README. | | 29 | # /usr/share/mk/bsd.README. |
30 | # NOCLEANDIR, if defined, will avoid a `make cleandir' at the start | | 30 | # NOCLEANDIR, if defined, will avoid a `make cleandir' at the start |
31 | # of the `make build'. | | 31 | # of the `make build'. |
32 | # NOINCLUDES will avoid the `make includes' usually done by `make build'. | | 32 | # NOINCLUDES will avoid the `make includes' usually done by `make build'. |
33 | # NOBINARIES will not build binaries, only includes and libraries | | 33 | # NOBINARIES will not build binaries, only includes and libraries |
34 | # | | 34 | # |
35 | # See mk.conf(5) for more details. | | 35 | # See mk.conf(5) for more details. |
36 | # | | 36 | # |
37 | # | | 37 | # |
38 | # Targets: | | 38 | # Targets: |
39 | # build: | | 39 | # build: |
40 | # Builds a full release of NetBSD in DESTDIR, except for the | | 40 | # Builds a full release of NetBSD in DESTDIR, except for the |
41 | # /etc configuration files. | | 41 | # /etc configuration files. |
42 | # If BUILD_DONE is set, this is an empty target. | | 42 | # If BUILD_DONE is set, this is an empty target. |
43 | # distribution: | | 43 | # distribution: |
44 | # Builds a full release of NetBSD in DESTDIR, including the /etc | | 44 | # Builds a full release of NetBSD in DESTDIR, including the /etc |
45 | # configuration files. | | 45 | # configuration files. |
46 | # buildworld: | | 46 | # buildworld: |
47 | # As per `make distribution', except that it ensures that DESTDIR | | 47 | # As per `make distribution', except that it ensures that DESTDIR |
48 | # is not the root directory. | | 48 | # is not the root directory. |
49 | # installworld: | | 49 | # installworld: |
50 | # Install the distribution from DESTDIR to INSTALLWORLDDIR (which | | 50 | # Install the distribution from DESTDIR to INSTALLWORLDDIR (which |
51 | # defaults to the root directory). Ensures that INSTALLWORLDDIR | | 51 | # defaults to the root directory). Ensures that INSTALLWORLDDIR |
52 | # is not the root directory if cross compiling. | | 52 | # is not the root directory if cross compiling. |
53 | # release: | | 53 | # release: |
54 | # Does a `make distribution', and then tars up the DESTDIR files | | 54 | # Does a `make distribution', and then tars up the DESTDIR files |
55 | # into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format. | | 55 | # into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format. |
56 | # (See etc/Makefile for more information on this.) | | 56 | # (See etc/Makefile for more information on this.) |
57 | # regression-tests: | | 57 | # regression-tests: |
58 | # Runs the regression tests in "regress" on this host. | | 58 | # Runs the regression tests in "regress" on this host. |
59 | # sets: | | 59 | # sets: |
60 | # Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets | | 60 | # Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets |
61 | # from ${DESTDIR} | | 61 | # from ${DESTDIR} |
62 | # sourcesets: | | 62 | # sourcesets: |
63 | # Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} | | 63 | # Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} |
64 | # syspkgs: | | 64 | # syspkgs: |
65 | # Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs | | 65 | # Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs |
66 | # from ${DESTDIR} | | 66 | # from ${DESTDIR} |
67 | # iso-image: | | 67 | # iso-image: |
68 | # Create CD-ROM image in RELEASEDIR/images. | | 68 | # Create CD-ROM image in RELEASEDIR/images. |
69 | # RELEASEDIR must already have been populated by `make release' | | 69 | # RELEASEDIR must already have been populated by `make release' |
70 | # or equivalent. | | 70 | # or equivalent. |
71 | # iso-image-source: | | 71 | # iso-image-source: |
72 | # Create CD-ROM image with source in RELEASEDIR/images. | | 72 | # Create CD-ROM image with source in RELEASEDIR/images. |
73 | # RELEASEDIR must already have been populated by | | 73 | # RELEASEDIR must already have been populated by |
74 | # `make release sourcesets' or equivalent. | | 74 | # `make release sourcesets' or equivalent. |
75 | # live-image: | | 75 | # live-image: |
76 | # Create bootable live image for emulators or USB stick etc. | | 76 | # Create bootable live image for emulators or USB stick etc. |
77 | # in RELEASEDIR/liveimage. | | 77 | # in RELEASEDIR/liveimage. |
78 | # RELEASEDIR must already have been populated by `make release' | | 78 | # RELEASEDIR must already have been populated by `make release' |
79 | # or equivalent. | | 79 | # or equivalent. |
80 | # install-image: | | 80 | # install-image: |
81 | # Create bootable installation image for USB stick etc. | | 81 | # Create bootable installation image for USB stick etc. |
82 | # in RELEASEDIR/installimage. | | 82 | # in RELEASEDIR/installimage. |
83 | # RELEASEDIR must already have been populated by `make release' | | 83 | # RELEASEDIR must already have been populated by `make release' |
84 | # or equivalent. | | 84 | # or equivalent. |
85 | # | | 85 | # |
86 | # Targets invoked by `make build,' in order: | | 86 | # Targets invoked by `make build,' in order: |
87 | # cleandir: cleans the tree. | | 87 | # cleandir: cleans the tree. |
88 | # do-top-obj: creates the top level object directory. | | 88 | # do-top-obj: creates the top level object directory. |
89 | # do-tools-obj: creates object directories for the host toolchain. | | 89 | # do-tools-obj: creates object directories for the host toolchain. |
90 | # do-tools: builds host toolchain. | | 90 | # do-tools: builds host toolchain. |
91 | # params: record the values of variables that might affect the | | 91 | # params: record the values of variables that might affect the |
92 | # build. | | 92 | # build. |
93 | # obj: creates object directories. | | 93 | # obj: creates object directories. |
94 | # do-distrib-dirs: creates the distribution directories. | | 94 | # do-distrib-dirs: creates the distribution directories. |
95 | # includes: installs include files. | | 95 | # includes: installs include files. |
96 | # do-lib: builds and installs prerequisites from lib. | | 96 | # do-lib: builds and installs prerequisites from lib. |
97 | # do-compat-lib: builds and installs prerequisites from compat/lib | | 97 | # do-compat-lib: builds and installs prerequisites from compat/lib |
98 | # if ${MKCOMPAT} != "no". | | 98 | # if ${MKCOMPAT} != "no". |
99 | # do-x11: builds and installs X11 tools and libraries | | 99 | # do-x11: builds and installs X11 tools and libraries |
100 | # from src/external/mit/xorg if ${MKX11} != "no". | | 100 | # from src/external/mit/xorg if ${MKX11} != "no". |
101 | # do-build: builds and installs the entire system. | | 101 | # do-build: builds and installs the entire system. |
102 | # do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no". | | 102 | # do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no". |
103 | # do-obsolete: installs the obsolete sets (for the postinstall-* targets). | | 103 | # do-obsolete: installs the obsolete sets (for the postinstall-* targets). |
104 | # | | 104 | # |
105 | | | 105 | |
106 | .if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == "" | | 106 | .if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == "" |
107 | .MAKEFLAGS: -m ${.CURDIR}/share/mk | | 107 | .MAKEFLAGS: -m ${.CURDIR}/share/mk |
108 | .endif | | 108 | .endif |
109 | | | 109 | |
110 | # | | 110 | # |
111 | # If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may | | 111 | # If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may |
112 | # not be the top level objdir, because "make obj" can happen in the *middle* | | 112 | # not be the top level objdir, because "make obj" can happen in the *middle* |
113 | # of "make build" (long after <bsd.own.mk> is calculated it). So, pre-set | | 113 | # of "make build" (long after <bsd.own.mk> is calculated it). So, pre-set |
114 | # _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}. | | 114 | # _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}. |
115 | # | | 115 | # |
116 | _SRC_TOP_OBJ_= | | 116 | _SRC_TOP_OBJ_= |
117 | | | 117 | |
118 | .include <bsd.own.mk> | | 118 | .include <bsd.own.mk> |
119 | | | 119 | |
120 | # | | 120 | # |
121 | # Sanity check: make sure that "make build" is not invoked simultaneously | | 121 | # Sanity check: make sure that "make build" is not invoked simultaneously |
122 | # with a standard recursive target. | | 122 | # with a standard recursive target. |
123 | # | | 123 | # |
124 | | | 124 | |
125 | .if make(build) || make(release) || make(snapshot) | | 125 | .if make(build) || make(release) || make(snapshot) |
126 | .for targ in ${TARGETS:Nobj:Ncleandir} | | 126 | .for targ in ${TARGETS:Nobj:Ncleandir} |
127 | .if make(${targ}) && !target(.BEGIN) | | 127 | .if make(${targ}) && !target(.BEGIN) |
128 | .BEGIN: | | 128 | .BEGIN: |
129 | @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.' | | 129 | @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.' |
130 | @false | | 130 | @false |
131 | .endif | | 131 | .endif |
132 | .endfor | | 132 | .endfor |
133 | .endif | | 133 | .endif |
134 | | | 134 | |
135 | # | | 135 | # |
136 | # _SUBDIR is used to set SUBDIR, after removing directories that have | | 136 | # _SUBDIR is used to set SUBDIR, after removing directories that have |
137 | # BUILD_${dir}=no, or that have no ${dir}/Makefile. | | 137 | # BUILD_${dir}=no, or that have no ${dir}/Makefile. |
138 | # | | 138 | # |
139 | _SUBDIR= tools .WAIT lib | | 139 | _SUBDIR= tools .WAIT lib |
140 | .if ${MKLLVM} != "no" | | 140 | .if ${MKLLVM} != "no" |
141 | _SUBDIR+= external/bsd/compiler_rt | | 141 | _SUBDIR+= external/bsd/compiler_rt |
142 | .endif | | 142 | .endif |
143 | _SUBDIR+= include external crypto/external bin | | 143 | _SUBDIR+= include external crypto/external bin |
144 | _SUBDIR+= games libexec sbin usr.bin | | 144 | _SUBDIR+= games libexec sbin usr.bin |
145 | _SUBDIR+= usr.sbin share sys etc tests compat | | 145 | _SUBDIR+= usr.sbin share sys etc tests compat |
146 | _SUBDIR+= .WAIT rescue .WAIT distrib regress | | 146 | _SUBDIR+= .WAIT rescue .WAIT distrib regress |
147 | | | 147 | |
148 | .for dir in ${_SUBDIR} | | 148 | .for dir in ${_SUBDIR} |
149 | .if "${dir}" == ".WAIT" \ | | 149 | .if "${dir}" == ".WAIT" \ |
150 | || (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile)) | | 150 | || (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile)) |
151 | SUBDIR+= ${dir} | | 151 | SUBDIR+= ${dir} |
152 | .endif | | 152 | .endif |
153 | .endfor | | 153 | .endfor |
154 | | | 154 | |
155 | .if exists(regress) | | 155 | .if exists(regress) |
156 | regression-tests: .PHONY .MAKE | | 156 | regression-tests: .PHONY .MAKE |
157 | @echo Running regression tests... | | 157 | @echo Running regression tests... |
158 | ${MAKEDIRTARGET} regress regress | | 158 | ${MAKEDIRTARGET} regress regress |
159 | .endif | | 159 | .endif |
160 | | | 160 | |
161 | .if ${MKUNPRIVED} != "no" | | 161 | .if ${MKUNPRIVED} != "no" |
162 | NOPOSTINSTALL= # defined | | 162 | NOPOSTINSTALL= # defined |
163 | .endif | | 163 | .endif |
164 | | | 164 | |
165 | afterinstall: .PHONY .MAKE | | 165 | afterinstall: .PHONY .MAKE |
166 | .if ${MKMAN} != "no" | | 166 | .if ${MKMAN} != "no" |
167 | ${MAKEDIRTARGET} share/man makedb | | 167 | ${MAKEDIRTARGET} share/man makedb |
168 | .endif | | 168 | .endif |
169 | .if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") | | 169 | .if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") |
170 | ${MAKEDIRTARGET} external/gpl2/texinfo/bin/install-info infodir-meta | | 170 | ${MAKEDIRTARGET} external/gpl2/texinfo/bin/install-info infodir-meta |
171 | .endif | | 171 | .endif |
172 | .if !defined(NOPOSTINSTALL) | | 172 | .if !defined(NOPOSTINSTALL) |
173 | ${MAKEDIRTARGET} . postinstall-check | | 173 | ${MAKEDIRTARGET} . postinstall-check |
174 | .endif | | 174 | .endif |
175 | | | 175 | |
176 | _POSTINSTALL= ${:!cd ${.CURDIR}/usr.sbin/postinstall && \ | | 176 | _POSTINSTALL= ${:!cd ${.CURDIR}/usr.sbin/postinstall && \ |
177 | ${MAKE} print-objdir!}/postinstall \ | | 177 | ${MAKE} print-objdir!}/postinstall \ |
178 | -m ${MACHINE} -a ${MACHINE_ARCH} | | 178 | -m ${MACHINE} -a ${MACHINE_ARCH} |
179 | _POSTINSTALL_ENV= \ | | 179 | _POSTINSTALL_ENV= \ |
180 | AWK=${TOOL_AWK:Q} \ | | 180 | AWK=${TOOL_AWK:Q} \ |
181 | DB=${TOOL_DB:Q} \ | | 181 | DB=${TOOL_DB:Q} \ |
182 | HOST_SH=${HOST_SH:Q} \ | | 182 | HOST_SH=${HOST_SH:Q} \ |
183 | MAKE=${MAKE:Q} \ | | 183 | MAKE=${MAKE:Q} \ |
184 | PWD_MKDB=${TOOL_PWD_MKDB:Q} \ | | 184 | PWD_MKDB=${TOOL_PWD_MKDB:Q} \ |
185 | SED=${TOOL_SED:Q} \ | | 185 | SED=${TOOL_SED:Q} \ |
186 | STAT=${TOOL_STAT:Q} | | 186 | STAT=${TOOL_STAT:Q} |
187 | | | 187 | |
188 | .if ${MKX11} != "no" | | 188 | .if ${MKX11} != "no" |
189 | _POSTINSTALL_X11=-x ${X11SRCDIR:Q} | | 189 | _POSTINSTALL_X11=-x ${X11SRCDIR:Q} |
190 | .endif | | 190 | .endif |
191 | | | 191 | |
192 | postinstall-check: .PHONY | | 192 | postinstall-check: .PHONY |
193 | @echo " === Post installation checks ===" | | 193 | @echo " === Post installation checks ===" |
194 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi | | 194 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi |
195 | @echo " ================================" | | 195 | @echo " ================================" |
196 | | | 196 | |
197 | postinstall-fix: .NOTMAIN .PHONY | | 197 | postinstall-fix: .NOTMAIN .PHONY |
198 | @echo " === Post installation fixes ===" | | 198 | @echo " === Post installation fixes ===" |
199 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix | | 199 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix |
200 | @echo " ===============================" | | 200 | @echo " ===============================" |
201 | | | 201 | |
202 | postinstall-fix-obsolete: .NOTMAIN .PHONY | | 202 | postinstall-fix-obsolete: .NOTMAIN .PHONY |
203 | @echo " === Removing obsolete files ===" | | 203 | @echo " === Removing obsolete files ===" |
204 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete | | 204 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete |
205 | @echo " ===============================" | | 205 | @echo " ===============================" |
206 | | | 206 | |
207 | postinstall-fix-obsolete_stand: .NOTMAIN .PHONY | | 207 | postinstall-fix-obsolete_stand: .NOTMAIN .PHONY |
208 | @echo " === Removing obsolete files ===" | | 208 | @echo " === Removing obsolete files ===" |
209 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand | | 209 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand |
210 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand_debug | | 210 | ${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand_debug |
211 | @echo " ===============================" | | 211 | @echo " ===============================" |
212 | | | 212 | |
213 | | | 213 | |
214 | # | | 214 | # |
215 | # Targets (in order!) called by "make build". | | 215 | # Targets (in order!) called by "make build". |
216 | # | | 216 | # |
217 | BUILDTARGETS+= check-tools | | 217 | BUILDTARGETS+= check-tools |
218 | .if ${MKUPDATE} == "no" && !defined(NOCLEANDIR) | | 218 | .if ${MKUPDATE} == "no" && !defined(NOCLEANDIR) |
219 | BUILDTARGETS+= cleandir | | 219 | BUILDTARGETS+= cleandir |
220 | .endif | | 220 | .endif |
221 | .if ${MKOBJDIRS} != "no" | | 221 | .if ${MKOBJDIRS} != "no" |
222 | BUILDTARGETS+= do-top-obj | | 222 | BUILDTARGETS+= do-top-obj |
223 | .endif | | 223 | .endif |
224 | .if ${USETOOLS} == "yes" # { | | 224 | .if ${USETOOLS} == "yes" # { |
225 | .if ${MKOBJDIRS} != "no" | | 225 | .if ${MKOBJDIRS} != "no" |
226 | BUILDTARGETS+= do-tools-obj | | 226 | BUILDTARGETS+= do-tools-obj |
227 | .endif | | 227 | .endif |
228 | BUILDTARGETS+= do-tools | | 228 | BUILDTARGETS+= do-tools |
229 | .endif # USETOOLS # } | | 229 | .endif # USETOOLS # } |
230 | BUILDTARGETS+= params | | 230 | BUILDTARGETS+= params |
231 | .if ${MKOBJDIRS} != "no" | | 231 | .if ${MKOBJDIRS} != "no" |
232 | BUILDTARGETS+= obj | | 232 | BUILDTARGETS+= obj |
233 | .endif | | 233 | .endif |
234 | BUILDTARGETS+= clean_METALOG | | 234 | BUILDTARGETS+= clean_METALOG |
235 | .if !defined(NODISTRIBDIRS) | | 235 | .if !defined(NODISTRIBDIRS) |
236 | BUILDTARGETS+= do-distrib-dirs | | 236 | BUILDTARGETS+= do-distrib-dirs |
237 | .endif | | 237 | .endif |
238 | .if !defined(NOINCLUDES) | | 238 | .if !defined(NOINCLUDES) |
239 | BUILDTARGETS+= includes | | 239 | BUILDTARGETS+= includes |
240 | .endif | | 240 | .endif |
241 | BUILDTARGETS+= do-lib | | 241 | BUILDTARGETS+= do-lib |
242 | BUILDTARGETS+= do-compat-lib | | 242 | BUILDTARGETS+= do-compat-lib |
243 | .if ${MKLLVM} != "no" | | 243 | .if ${MKLLVM} != "no" |
244 | BUILDTARGETS+= do-sanitizer | | 244 | BUILDTARGETS+= do-sanitizer |
245 | .if ${MKSANITIZER:Uno} == "yes" | | 245 | .if ${MKSANITIZER:Uno} == "yes" |
246 | BUILDTARGETS+= do-sanitizer-tools | | 246 | BUILDTARGETS+= do-sanitizer-tools |
247 | .endif | | 247 | .endif |
248 | .endif | | 248 | .endif |
249 | .if ${MKX11} != "no" | | 249 | .if ${MKX11} != "no" |
250 | BUILDTARGETS+= do-x11 | | 250 | BUILDTARGETS+= do-x11 |
251 | .endif | | 251 | .endif |
252 | .if !defined(NOBINARIES) | | 252 | .if !defined(NOBINARIES) |
253 | BUILDTARGETS+= do-build | | 253 | BUILDTARGETS+= do-build |
254 | .if ${MKEXTSRC} != "no" | | 254 | .if ${MKEXTSRC} != "no" |
255 | BUILDTARGETS+= do-extsrc | | 255 | BUILDTARGETS+= do-extsrc |
256 | .endif | | 256 | .endif |
257 | BUILDTARGETS+= do-obsolete | | 257 | BUILDTARGETS+= do-obsolete |
258 | .endif | | 258 | .endif |
259 | | | 259 | |
260 | # | | 260 | # |
261 | # Enforce proper ordering of some rules. | | 261 | # Enforce proper ordering of some rules. |
262 | # | | 262 | # |
263 | | | 263 | |
264 | .ORDER: ${BUILDTARGETS} | | 264 | .ORDER: ${BUILDTARGETS} |
265 | includes-lib: .PHONY includes-include includes-sys | | 265 | includes-lib: .PHONY includes-include includes-sys |
266 | | | 266 | |
267 | # | | 267 | # |
268 | # Record the values of variables that might affect the build. | | 268 | # Record the values of variables that might affect the build. |
269 | # If no values have changed, avoid updating the timestamp | | 269 | # If no values have changed, avoid updating the timestamp |
270 | # of the params file. | | 270 | # of the params file. |
271 | # | | 271 | # |
272 | # This is referenced by _NETBSD_VERSION_DEPENDS in <bsd.own.mk>. | | 272 | # This is referenced by _NETBSD_VERSION_DEPENDS in <bsd.own.mk>. |
273 | # | | 273 | # |
274 | .include "${NETBSDSRCDIR}/etc/Makefile.params" | | 274 | .include "${NETBSDSRCDIR}/etc/Makefile.params" |
275 | CLEANDIRFILES+= params | | 275 | CLEANDIRFILES+= params |
276 | params: .EXEC | | 276 | params: .EXEC |
277 | ${_MKMSG_CREATE} params | | 277 | ${_MKMSG_CREATE} params |
278 | @${PRINT_PARAMS} >${.TARGET}.new | | 278 | @${PRINT_PARAMS} >${.TARGET}.new |
279 | @if cmp -s ${.TARGET}.new ${.TARGET} > /dev/null 2>&1; then \ | | 279 | @if cmp -s ${.TARGET}.new ${.TARGET} > /dev/null 2>&1; then \ |
280 | : "params is unchanged" ; \ | | 280 | : "params is unchanged" ; \ |
281 | rm ${.TARGET}.new ; \ | | 281 | rm ${.TARGET}.new ; \ |
282 | else \ | | 282 | else \ |
283 | : "params has changed or is new" ; \ | | 283 | : "params has changed or is new" ; \ |
284 | mv ${.TARGET}.new ${.TARGET} ; \ | | 284 | mv ${.TARGET}.new ${.TARGET} ; \ |
285 | fi | | 285 | fi |
286 | | | 286 | |
287 | # | | 287 | # |
288 | # Display current make(1) parameters | | 288 | # Display current make(1) parameters |
289 | # | | 289 | # |
290 | show-params: .PHONY .MAKE | | 290 | show-params: .PHONY .MAKE |
291 | @${PRINT_PARAMS} | | 291 | @${PRINT_PARAMS} |
292 | | | 292 | |
293 | # | | 293 | # |
294 | # Build the system and install into DESTDIR. | | 294 | # Build the system and install into DESTDIR. |
295 | # | | 295 | # |
296 | | | 296 | |
297 | START_TIME!= date | | 297 | START_TIME!= date |
298 | | | 298 | |
299 | build: .PHONY .MAKE | | 299 | build: .PHONY .MAKE |
300 | .if defined(BUILD_DONE) | | 300 | .if defined(BUILD_DONE) |
301 | @echo "Build already installed into ${DESTDIR}" | | 301 | @echo "Build already installed into ${DESTDIR}" |
302 | .else | | 302 | .else |
303 | @echo "Build started at: ${START_TIME}" | | 303 | @echo "Build started at: ${START_TIME}" |
304 | .for tgt in ${BUILDTARGETS} | | 304 | .for tgt in ${BUILDTARGETS} |
305 | ${MAKEDIRTARGET} . ${tgt} | | 305 | ${MAKEDIRTARGET} . ${tgt} |
306 | .endfor | | 306 | .endfor |
307 | ${MAKEDIRTARGET} etc install-etc-release | | 307 | ${MAKEDIRTARGET} etc install-etc-release |
308 | @echo "Build started at: ${START_TIME}" | | 308 | @echo "Build started at: ${START_TIME}" |
309 | @printf "Build finished at: " && date | | 309 | @printf "Build finished at: " && date |
310 | .endif | | 310 | .endif |
311 | | | 311 | |
312 | # | | 312 | # |
313 | # Build a full distribution, but not a release (i.e. no sets into | | 313 | # Build a full distribution, but not a release (i.e. no sets into |
314 | # ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != / | | 314 | # ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != / |
315 | # | | 315 | # |
316 | | | 316 | |
317 | distribution buildworld: .PHONY .MAKE | | 317 | distribution buildworld: .PHONY .MAKE |
318 | .if make(buildworld) && \ | | 318 | .if make(buildworld) && \ |
319 | (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") | | 319 | (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") |
320 | @echo "Won't make ${.TARGET} with DESTDIR=/" | | 320 | @echo "Won't make ${.TARGET} with DESTDIR=/" |
321 | @false | | 321 | @false |
322 | .endif | | 322 | .endif |
323 | ${MAKEDIRTARGET} . build NOPOSTINSTALL=1 | | 323 | ${MAKEDIRTARGET} . build NOPOSTINSTALL=1 |
324 | ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1 | | 324 | ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1 |
325 | .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/" | | 325 | .if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/" |
326 | ${MAKEDIRTARGET} . postinstall-fix-obsolete | | 326 | ${MAKEDIRTARGET} . postinstall-fix-obsolete |
327 | ${MAKEDIRTARGET} . postinstall-fix-obsolete_stand | | 327 | ${MAKEDIRTARGET} . postinstall-fix-obsolete_stand |
328 | ${MAKEDIRTARGET} distrib/sets checkflist | | 328 | ${MAKEDIRTARGET} distrib/sets checkflist |
329 | .endif | | 329 | .endif |
330 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 330 | @echo "make ${.TARGET} started at: ${START_TIME}" |
331 | @printf "make ${.TARGET} finished at: " && date | | 331 | @printf "make ${.TARGET} finished at: " && date |
332 | | | 332 | |
333 | # | | 333 | # |
334 | # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/') | | 334 | # Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/') |
335 | # If installing to /, ensures that the host's operating system is NetBSD and | | 335 | # If installing to /, ensures that the host's operating system is NetBSD and |
336 | # the host's `uname -m` == ${MACHINE}. | | 336 | # the host's `uname -m` == ${MACHINE}. |
337 | # | | 337 | # |
338 | | | 338 | |
339 | HOST_UNAME_S!= uname -s | | 339 | HOST_UNAME_S!= uname -s |
340 | HOST_UNAME_M!= uname -m | | 340 | HOST_UNAME_M!= uname -m |
341 | | | 341 | |
342 | installworld: .PHONY .MAKE | | 342 | installworld: .PHONY .MAKE |
343 | .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") | | 343 | .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") |
344 | @echo "Can't make ${.TARGET} to DESTDIR=/" | | 344 | @echo "Can't make ${.TARGET} to DESTDIR=/" |
345 | @false | | 345 | @false |
346 | .endif | | 346 | .endif |
347 | .if !defined(INSTALLWORLDDIR) || \ | | 347 | .if !defined(INSTALLWORLDDIR) || \ |
348 | ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/" | | 348 | ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/" |
349 | .if (${HOST_UNAME_S} != "NetBSD") | | 349 | .if (${HOST_UNAME_S} != "NetBSD") |
350 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/" | | 350 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/" |
351 | @false | | 351 | @false |
352 | .endif | | 352 | .endif |
353 | .if (${HOST_UNAME_M} != ${MACHINE}) | | 353 | .if (${HOST_UNAME_M} != ${MACHINE}) |
354 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/" | | 354 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/" |
355 | @false | | 355 | @false |
356 | .endif | | 356 | .endif |
357 | .endif | | 357 | .endif |
358 | ${MAKEDIRTARGET} distrib/sets installsets \ | | 358 | ${MAKEDIRTARGET} distrib/sets installsets \ |
359 | INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q} | | 359 | INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q} |
360 | ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR} | | 360 | ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR} |
361 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 361 | @echo "make ${.TARGET} started at: ${START_TIME}" |
362 | @printf "make ${.TARGET} finished at: " && date | | 362 | @printf "make ${.TARGET} finished at: " && date |
363 | | | 363 | |
364 | # | | 364 | # |
365 | # Install modules from $DESTDIR to $INSTALLMODULESDIR | | 365 | # Install modules from $DESTDIR to $INSTALLMODULESDIR |
366 | # | | 366 | # |
367 | installmodules: .PHONY .MAKE | | 367 | installmodules: .PHONY .MAKE |
368 | .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") | | 368 | .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") |
369 | @echo "Can't make ${.TARGET} to DESTDIR=/" | | 369 | @echo "Can't make ${.TARGET} to DESTDIR=/" |
370 | @false | | 370 | @false |
371 | .endif | | 371 | .endif |
372 | .if !defined(INSTALLMODULESDIR) || \ | | 372 | .if !defined(INSTALLMODULESDIR) || \ |
373 | ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/" | | 373 | ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/" |
374 | .if (${HOST_UNAME_S} != "NetBSD") | | 374 | .if (${HOST_UNAME_S} != "NetBSD") |
375 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/" | | 375 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/" |
376 | @false | | 376 | @false |
377 | .endif | | 377 | .endif |
378 | .if (${HOST_UNAME_M} != ${MACHINE}) | | 378 | .if (${HOST_UNAME_M} != ${MACHINE}) |
379 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/" | | 379 | @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/" |
380 | @false | | 380 | @false |
381 | .endif | | 381 | .endif |
382 | .endif | | 382 | .endif |
383 | ${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/} | | 383 | ${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/} |
384 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 384 | @echo "make ${.TARGET} started at: ${START_TIME}" |
385 | @printf "make ${.TARGET} finished at: " && date | | 385 | @printf "make ${.TARGET} finished at: " && date |
386 | | | 386 | |
387 | # | | 387 | # |
388 | # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR | | 388 | # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR |
389 | # | | 389 | # |
390 | | | 390 | |
391 | .for tgt in sets sourcesets syspkgs | | 391 | .for tgt in sets sourcesets syspkgs |
392 | ${tgt}: .PHONY .MAKE | | 392 | ${tgt}: .PHONY .MAKE |
393 | ${MAKEDIRTARGET} distrib/sets ${tgt} | | 393 | ${MAKEDIRTARGET} distrib/sets ${tgt} |
394 | .endfor | | 394 | .endfor |
395 | | | 395 | |
396 | # | | 396 | # |
397 | # Build a release or snapshot (implies "make distribution"). Note that | | 397 | # Build a release or snapshot (implies "make distribution"). Note that |
398 | # in this case, the set lists will be checked before the tar files | | 398 | # in this case, the set lists will be checked before the tar files |
399 | # are made. | | 399 | # are made. |
400 | # | | 400 | # |
401 | | | 401 | |
402 | release snapshot: .PHONY .MAKE | | 402 | release snapshot: .PHONY .MAKE |
403 | ${MAKEDIRTARGET} . distribution | | 403 | ${MAKEDIRTARGET} . distribution |
404 | ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1 | | 404 | ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1 |
405 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 405 | @echo "make ${.TARGET} started at: ${START_TIME}" |
406 | @printf "make ${.TARGET} finished at: " && date | | 406 | @printf "make ${.TARGET} finished at: " && date |
407 | | | 407 | |
408 | # | | 408 | # |
409 | # Create a CD-ROM image. | | 409 | # Create a CD-ROM image. |
410 | # | | 410 | # |
411 | | | 411 | |
412 | iso-image: .PHONY | | 412 | iso-image: .PHONY |
413 | ${MAKEDIRTARGET} distrib iso_image | | 413 | ${MAKEDIRTARGET} distrib iso_image |
414 | ${MAKEDIRTARGET} etc iso-image | | 414 | ${MAKEDIRTARGET} etc iso-image |
415 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 415 | @echo "make ${.TARGET} started at: ${START_TIME}" |
416 | @printf "make ${.TARGET} finished at: " && date | | 416 | @printf "make ${.TARGET} finished at: " && date |
417 | | | 417 | |
418 | iso-image-source: .PHONY | | 418 | iso-image-source: .PHONY |
419 | ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true | | 419 | ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true |
420 | ${MAKEDIRTARGET} etc iso-image | | 420 | ${MAKEDIRTARGET} etc iso-image |
421 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 421 | @echo "make ${.TARGET} started at: ${START_TIME}" |
422 | @printf "make ${.TARGET} finished at: " && date | | 422 | @printf "make ${.TARGET} finished at: " && date |
423 | | | 423 | |
424 | # | | 424 | # |
425 | # Create bootable live images. | | 425 | # Create bootable live images. |
426 | # | | 426 | # |
427 | | | 427 | |
428 | live-image: .PHONY | | 428 | live-image: .PHONY |
429 | ${MAKEDIRTARGET} etc live-image | | 429 | ${MAKEDIRTARGET} etc live-image |
430 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 430 | @echo "make ${.TARGET} started at: ${START_TIME}" |
431 | @printf "make ${.TARGET} finished at: " && date | | 431 | @printf "make ${.TARGET} finished at: " && date |
432 | | | 432 | |
433 | # | | 433 | # |
434 | # Create bootable installation images. | | 434 | # Create bootable installation images. |
435 | # | | 435 | # |
436 | | | 436 | |
437 | install-image: .PHONY | | 437 | install-image: .PHONY |
438 | ${MAKEDIRTARGET} etc install-image | | 438 | ${MAKEDIRTARGET} etc install-image |
439 | @echo "make ${.TARGET} started at: ${START_TIME}" | | 439 | @echo "make ${.TARGET} started at: ${START_TIME}" |
440 | @printf "make ${.TARGET} finished at: " && date | | 440 | @printf "make ${.TARGET} finished at: " && date |
441 | | | 441 | |
442 | # | | 442 | # |
443 | # Special components of the "make build" process. | | 443 | # Special components of the "make build" process. |
444 | # | | 444 | # |
445 | | | 445 | |
446 | check-tools: .PHONY | | 446 | check-tools: .PHONY |
447 | .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN) | | 447 | .if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN) |
448 | @echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.' | | 448 | @echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.' |
449 | @echo '*** May result in a failed build or corrupt binaries!' | | 449 | @echo '*** May result in a failed build or corrupt binaries!' |
450 | .elif defined(EXTERNAL_TOOLCHAIN) | | 450 | .elif defined(EXTERNAL_TOOLCHAIN) |
451 | @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.' | | 451 | @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.' |
452 | .endif | | 452 | .endif |
453 | .if defined(NBUILDJOBS) | | 453 | .if defined(NBUILDJOBS) |
454 | @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!' | | 454 | @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!' |
455 | .endif | | 455 | .endif |
456 | | | 456 | |
457 | # Delete or sanitise a leftover METALOG from a previous build. | | 457 | # Delete or sanitise a leftover METALOG from a previous build. |
458 | clean_METALOG: .PHONY .MAKE | | 458 | clean_METALOG: .PHONY .MAKE |
459 | .if ${MKUPDATE} != "no" | | 459 | .if ${MKUPDATE} != "no" |
460 | ${MAKEDIRTARGET} distrib/sets clean_METALOG | | 460 | ${MAKEDIRTARGET} distrib/sets clean_METALOG |
461 | .endif | | 461 | .endif |
462 | | | 462 | |
463 | do-distrib-dirs: .PHONY .MAKE | | 463 | do-distrib-dirs: .PHONY .MAKE |
464 | .if !defined(DESTDIR) || ${DESTDIR} == "" | | 464 | .if !defined(DESTDIR) || ${DESTDIR} == "" |
465 | ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/ | | 465 | ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/ |
466 | .else | | 466 | .else |
467 | ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR} | | 467 | ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR} |
468 | .endif | | 468 | .endif |
469 | | | 469 | |
470 | .for targ in cleandir obj includes | | 470 | .for targ in cleandir obj includes |
471 | do-${targ}: .PHONY ${targ} | | 471 | do-${targ}: .PHONY ${targ} |
472 | @true | | 472 | @true |
473 | .endfor | | 473 | .endfor |
474 | | | 474 | |
475 | do-tools: .PHONY .MAKE | | 475 | do-tools: .PHONY .MAKE |
476 | ${MAKEDIRTARGET} tools build_install | | 476 | ${MAKEDIRTARGET} tools build_install |
477 | | | 477 | |
478 | do-lib: .PHONY .MAKE | | 478 | do-lib: .PHONY .MAKE |
479 | ${MAKEDIRTARGET} lib build_install | | 479 | ${MAKEDIRTARGET} lib build_install |
480 | | | 480 | |
481 | do-compat-lib: .PHONY .MAKE | | 481 | do-compat-lib: .PHONY .MAKE |
482 | ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib" | | 482 | ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib" |
483 | | | 483 | |
484 | do-sanitizer: .PHONY .MAKE | | 484 | do-sanitizer: .PHONY .MAKE |
485 | ${MAKEDIRTARGET} external/bsd/compiler_rt build_install | | 485 | ${MAKEDIRTARGET} external/bsd/compiler_rt build_install |
486 | | | 486 | |
487 | do-sanitizer-tools: .PHONY .MAKE | | 487 | do-sanitizer-tools: .PHONY .MAKE |
488 | .if !exists(${TOOLDIR}/lib/clang) && ${HAVE_LLVM:Uno} == "yes" | | 488 | .if !exists(${TOOLDIR}/lib/clang) && ${HAVE_LLVM:Uno} == "yes" |
489 | mkdir -p ${TOOLDIR}/lib/clang | | 489 | mkdir -p ${TOOLDIR}/lib/clang |
490 | cd ${DESTDIR}/usr/lib/clang && \ | | 490 | cd ${DESTDIR}/usr/lib/clang && \ |
491 | ${TOOL_PAX} -rw . ${TOOLDIR}/lib/clang | | 491 | ${TOOL_PAX} -rw . ${TOOLDIR}/lib/clang |
492 | .endif | | 492 | .endif |
493 | | | 493 | |
494 | do-top-obj: .PHONY .MAKE | | 494 | do-top-obj: .PHONY .MAKE |
495 | ${MAKEDIRTARGET} . obj NOSUBDIR= | | 495 | ${MAKEDIRTARGET} . obj NOSUBDIR= |
496 | | | 496 | |
497 | do-tools-obj: .PHONY .MAKE | | 497 | do-tools-obj: .PHONY .MAKE |
498 | ${MAKEDIRTARGET} tools obj | | 498 | ${MAKEDIRTARGET} tools obj |
499 | | | 499 | |
500 | do-build: .PHONY .MAKE | | 500 | do-build: .PHONY .MAKE |
501 | .for targ in dependall install | | 501 | .for targ in dependall install |
502 | ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no | | 502 | ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no |
503 | .endfor | | 503 | .endfor |
504 | | | 504 | |
505 | do-x11: .PHONY .MAKE | | 505 | do-x11: .PHONY .MAKE |
506 | .if ${MKX11} != "no" | | 506 | .if ${MKX11} != "no" |
507 | ${MAKEDIRTARGET} external/mit/xorg/tools all | | 507 | ${MAKEDIRTARGET} external/mit/xorg/tools all |
508 | ${MAKEDIRTARGET} external/mit/xorg/lib build_install | | 508 | ${MAKEDIRTARGET} external/mit/xorg/lib build_install |
509 | .if ${MKCOMPATX11} != "no" | | 509 | .if ${MKCOMPATX11} != "no" |
510 | ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../external/mit/xorg/lib" | | 510 | ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../external/mit/xorg/lib" |
511 | .endif | | 511 | .endif |
512 | .else | | 512 | .else |
513 | @echo "MKX11 is not enabled" | | 513 | @echo "MKX11 is not enabled" |
514 | @false | | 514 | @false |
515 | .endif | | 515 | .endif |
516 | | | 516 | |
517 | do-extsrc: .PHONY .MAKE | | 517 | do-extsrc: .PHONY .MAKE |
518 | .if ${MKEXTSRC} != "no" | | 518 | .if ${MKEXTSRC} != "no" |
519 | ${MAKEDIRTARGET} extsrc build | | 519 | ${MAKEDIRTARGET} extsrc build |
520 | .else | | 520 | .else |
521 | @echo "MKEXTSRC is not enabled" | | 521 | @echo "MKEXTSRC is not enabled" |
522 | @false | | 522 | @false |
523 | .endif | | 523 | .endif |
524 | | | 524 | |
525 | do-obsolete: .PHONY .MAKE | | 525 | do-obsolete: .PHONY .MAKE |
526 | ${MAKEDIRTARGET} etc install-obsolete-lists | | 526 | ${MAKEDIRTARGET} etc install-obsolete-lists |
527 | | | 527 | |
528 | # | | 528 | # |
529 | # Speedup stubs for some subtrees that don't need to run these rules. | | 529 | # Speedup stubs for some subtrees that don't need to run these rules. |
530 | # (Tells <bsd.subdir.mk> not to recurse for them.) | | 530 | # (Tells <bsd.subdir.mk> not to recurse for them.) |
531 | # | | 531 | # |
532 | | | 532 | |
533 | .for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools | | 533 | .for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools |
534 | includes-${dir}: .PHONY | | 534 | includes-${dir}: .PHONY |
535 | @true | | 535 | @true |
536 | .endfor | | 536 | .endfor |
537 | .for dir in etc distrib regress | | 537 | .for dir in etc distrib regress |
538 | install-${dir}: .PHONY | | 538 | install-${dir}: .PHONY |
539 | @true | | 539 | @true |
540 | .endfor | | 540 | .endfor |
541 | | | 541 | |
542 | # | | 542 | # |
543 | # XXX this needs to change when distrib Makefiles are recursion compliant | | 543 | # XXX this needs to change when distrib Makefiles are recursion compliant |
544 | # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first... | | 544 | # XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first... |
545 | # | | 545 | # |
546 | dependall-distrib depend-distrib all-distrib: .PHONY | | 546 | dependall-distrib depend-distrib all-distrib: .PHONY |
547 | @true | | 547 | @true |
548 | | | 548 | |
549 | .include <bsd.obj.mk> | | 549 | .include <bsd.obj.mk> |
550 | .include <bsd.kernobj.mk> | | 550 | .include <bsd.kernobj.mk> |
551 | .include <bsd.subdir.mk> | | 551 | .include <bsd.subdir.mk> |
552 | .include <bsd.clean.mk> | | 552 | .include <bsd.clean.mk> |