build: Add WORLD_LDVER (similar to WORLD_CCVER)
[dragonfly.git] / Makefile.inc1
CommitLineData
984263bc
MD
1#
2# $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $
cecff5c1
MD
3#
4# Build-time options are documented in make.conf(5).
984263bc
MD
5#
6# The intended user-driven targets are:
1397f94a 7#
984263bc 8# buildworld - rebuild *everything*, including glue to help do upgrades
1397f94a
MD
9# quickworld - skip the glue and do a depend+build on the meat
10# realquickworld - skip the glue and depend stages and just build the meat
11# crossworld - only build the glue (particularly the cross-build environment)
984263bc 12# installworld- install everything built by "buildworld"
984263bc
MD
13# most - build user commands, no libraries or include files
14# installmost - install user commands, no libraries or include files
15#
16# Standard targets (not defined here) are documented in the makefiles in
17# /usr/share/mk. These include:
18# obj depend all install clean cleandepend cleanobj
19
20# Put initial settings here.
21SUBDIR=
22
23# We must do share/info early so that installation of info `dir'
24# entries works correctly. Do it first since it is less likely to
25# grow dependencies on include and lib than vice versa.
26.if exists(${.CURDIR}/share/info)
27SUBDIR+= share/info
28.endif
29
30# We must do include and lib early so that the perl *.ph generation
31# works correctly as it uses the header files installed by this.
32.if exists(${.CURDIR}/include)
33SUBDIR+= include
34.endif
35.if exists(${.CURDIR}/lib)
36SUBDIR+= lib
37.endif
17d0fefe
MD
38# This exists simply to ensure that the obj dir hierarchy is
39# intact for nrelease, allowing the nrelease Makefile's to
40# reference ${.OBJDIR}.
41#
42.if exists(${.CURDIR}/nrelease)
43SUBDIR+= nrelease
44.endif
984263bc
MD
45
46.if exists(${.CURDIR}/bin)
47SUBDIR+= bin
48.endif
cecff5c1 49.if exists(${.CURDIR}/games) && !defined(NO_GAMES)
984263bc
MD
50SUBDIR+= games
51.endif
52.if exists(${.CURDIR}/gnu)
53SUBDIR+= gnu
54.endif
984263bc
MD
55.if exists(${.CURDIR}/libexec)
56SUBDIR+= libexec
57.endif
58.if exists(${.CURDIR}/sbin)
59SUBDIR+= sbin
60.endif
cecff5c1 61.if exists(${.CURDIR}/secure) && !defined(NO_CRYPT)
984263bc
MD
62SUBDIR+= secure
63.endif
cecff5c1 64.if exists(${.CURDIR}/share) && !defined(NO_SHARE)
984263bc
MD
65SUBDIR+= share
66.endif
67.if exists(${.CURDIR}/sys)
68SUBDIR+= sys
69.endif
70.if exists(${.CURDIR}/usr.bin)
71SUBDIR+= usr.bin
72.endif
73.if exists(${.CURDIR}/usr.sbin)
74SUBDIR+= usr.sbin
75.endif
76
984263bc
MD
77.if exists(${.CURDIR}/etc)
78SUBDIR+= etc
79.endif
80
81# These are last, since it is nice to at least get the base system
82# rebuilt before you do them.
83.if defined(LOCAL_DIRS)
84.for _DIR in ${LOCAL_DIRS}
85.if exists(${.CURDIR}/${_DIR}) & exists(${.CURDIR}/${_DIR}/Makefile)
86SUBDIR+= ${_DIR}
87.endif
88.endfor
89.endif
90
91.if defined(SUBDIR_OVERRIDE)
92SUBDIR= ${SUBDIR_OVERRIDE}
93.endif
94
95.if defined(NOCLEANDIR)
96CLEANDIR= clean cleandepend
97.else
98CLEANDIR= cleandir
99.endif
100
9974d917
SS
101.if defined(NO_CLEAN)
102NOCLEAN= # defined
103.endif
d0a8f509 104
1397f94a
MD
105# Object directory base in primary make. Note that when we rerun make
106# from inside this file we change MAKEOBJDIRPREFIX to the appropriate
107# subdirectory because the rest of the build system needs it that way.
108# The original object directory base is saved in OBJTREE.
109#
984263bc 110MAKEOBJDIRPREFIX?= /usr/obj
1397f94a
MD
111OBJTREE?= ${MAKEOBJDIRPREFIX}
112
113# Used for stage installs and pathing
114#
115DESTDIRBASE?= ${OBJTREE}${.CURDIR}
116
c89fd520
SS
117# Remove DESTDIR from MAKEFLAGS. It is present in the environment
118# anyhow, and we need to be able to override it for stage installs
119.MAKEFLAGS:= ${.MAKEFLAGS:NDESTDIR=*}
120
0756733f
JM
121# This section sets the tools used to build the world/kernel
122WORLD_CCVER?= gcc44
123WORLD_LDVER?= ld.bfd
e685772e 124WORLD_BINUTILSVER?= binutils222
ded5c503 125
b2b3ffcd
SS
126# temporary until everybody has converted to x86_64
127.if ${MACHINE_ARCH} == "amd64"
128MACHINE_ARCH= x86_64
129.makeenv MACHINE_ARCH
130.endif
131
984263bc
MD
132TARGET_ARCH?= ${MACHINE_ARCH}
133.if ${TARGET_ARCH} == ${MACHINE_ARCH}
134TARGET?= ${MACHINE}
135.else
136TARGET?= ${TARGET_ARCH}
137.endif
138.if make(buildworld)
139BUILD_ARCH!= sysctl -n hw.machine_arch
b2b3ffcd
SS
140
141# temporary until everybody has converted to x86_64
142.if ${BUILD_ARCH} == "amd64"
143BUILD_ARCH= x86_64
144.endif
145
984263bc
MD
146.if ${MACHINE_ARCH} != ${BUILD_ARCH}
147.error To cross-build, set TARGET_ARCH.
148.endif
149.endif
1397f94a 150
0955fd91
MD
151# Backwards compatibility with older make's or older sys.mk's. make
152# is expected to define MACHINE_PLATFORM.
153#
154.if !defined(MACHINE_PLATFORM)
155MACHINE_PLATFORM= pc32
156.endif
4d005c1d
SS
157
158# XXX this is ugly and we need to come up with a nicer solution
159.if !defined(TARGET_PLATFORM)
160.if ${TARGET_ARCH} == "i386"
161TARGET_PLATFORM= pc32
b2b3ffcd 162.elif ${TARGET_ARCH} == "x86_64"
4d005c1d
SS
163TARGET_PLATFORM= pc64
164.else
165.error Unknown target architecture.
166.endif
167.endif
0955fd91 168
5f87b7d3
SZ
169THREAD_LIB?= thread_xu
170.if ${THREAD_LIB} == "c_r"
171.if defined(NO_LIBC_R)
172.error libc_r is chosen as the default thread library, but NO_LIBC_R is defined
173.endif
174.endif
175
1397f94a
MD
176# BTOOLS (Natively built) All non-cross-development tools that the
177# main build needs. This includes things like 'mkdir' and 'rm'.
178# We will not use the native system's exec path once we start
179# on WORLD. (bootstrap-tools and build-tools or BTOOLS)
180#
181# CTOOLS (Natively built) Cross development tools which are specific
182# to the target architecture.
183#
184# WORLD (Cross built) Our ultimate buildworld, using only BTOOLS and
185# CTOOLS.
186#
0955fd91
MD
187# MACHINE_PLATFORM Platform Architecture we are building on
188# MACHINE Machine Architecture (usually the same as MACHINE_ARCH)
e2ea6619
MD
189# MACHINE_ARCH Cpu Architecture we are building on
190#
0955fd91
MD
191# TARGET_PLATFORM Platform Architecture we are building for
192# TARGET Machine Architecture we are building for
e2ea6619 193# TARGET_ARCH Cpu Architecture we are building for
1397f94a
MD
194#
195BTOOLSDEST= ${DESTDIRBASE}/btools_${MACHINE_ARCH}
196CTOOLSDEST= ${DESTDIRBASE}/ctools_${MACHINE_ARCH}_${TARGET_ARCH}
197WORLDDEST= ${DESTDIRBASE}/world_${TARGET_ARCH}
198
79aa78bc
MD
199# The bootstrap-tools path is used by the bootstrap-tools, build-tools, and
200# cross-tools stages to augment the existing command path to access newer
201# versions of certain utilities such as 'patch' that the cross-tools stage
202# might expect.
203#
204BTOOLSPATH= ${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games
205
1397f94a
MD
206# The strict temporary command path contains all binaries required
207# by the buildworld system after the cross-tools stage.
208#
21e43067 209STRICTTMPPATH= ${CTOOLSDEST}/usr/sbin:${CTOOLSDEST}/usr/bin:${CTOOLSDEST}/bin:${CTOOLSDEST}/usr/games:${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games:/usr/pkg/bin
984263bc
MD
210
211TMPDIR?= /tmp
212TMPPID!= echo $$$$
984263bc
MD
213
214#
215# Building a world goes through the following stages
216#
217# 1. bootstrap-tool stage [BMAKE]
218# This stage is responsible for creating programs that
219# are needed for backward compatibility reasons. They
220# are not built as cross-tools.
221# 2. build-tool stage [TMAKE]
222# This stage is responsible for creating the object
223# tree and building any tools that are needed during
224# the build process.
225# 3. cross-tool stage [XMAKE]
226# This stage is responsible for creating any tools that
227# are needed for cross-builds. A cross-compiler is one
228# of them.
229# 4. world stage [WMAKE]
230# This stage actually builds the world.
231# 5. install stage (optional) [IMAKE]
232# This stage installs a previously built world.
233#
234
984263bc 235# bootstrap-tool stage
1397f94a
MD
236#
237BMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \
238 OBJTREE=${OBJTREE} \
44831353 239 DESTDIR=${BTOOLSDEST} \
79aa78bc 240 PATH=${BTOOLSPATH}:${PATH} \
984263bc 241 INSTALL="sh ${.CURDIR}/tools/install.sh"
1397f94a 242
984263bc 243BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \
e486d225
SS
244 -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \
245 -DNO_WERROR -DNO_NLS
984263bc
MD
246
247# build-tool stage
1397f94a
MD
248#
249TMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \
250 OBJTREE=${OBJTREE} \
984263bc 251 DESTDIR= \
79aa78bc 252 PATH=${BTOOLSPATH}:${PATH} \
984263bc 253 INSTALL="sh ${.CURDIR}/tools/install.sh"
1397f94a
MD
254
255TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \
e486d225 256 -DNO_FORTRAN -DNOSHARED
984263bc
MD
257
258# cross-tool stage
1397f94a
MD
259#
260# note: TOOLS_PREFIX points to the obj root holding the cross
44831353
MD
261# compiler binaries, while USRDATA_PREFIX points to the obj root
262# holding the target environment (and also determines where cross-built
263# libraries, crt*.o, and include files are installed).
1397f94a
MD
264#
265XMAKEENV= MAKEOBJDIRPREFIX=${CTOOLSDEST} \
266 OBJTREE=${OBJTREE} \
267 DESTDIR=${CTOOLSDEST} \
268 INSTALL="sh ${.CURDIR}/tools/install.sh" \
269 TOOLS_PREFIX=${CTOOLSDEST} \
79aa78bc
MD
270 USRDATA_PREFIX=${WORLDDEST} \
271 PATH=${BTOOLSPATH}:${PATH}
1397f94a 272
44831353 273XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB \
e486d225 274 -DBOOTSTRAPPING -DNOSHARED
1397f94a
MD
275
276# world stage, note the strict path and note that TOOLS_PREFIX is left
277# unset and USRDATA_PREFIX (which defaults to TOOLS_PREFIX) is set to empty,
278# which is primarily for the compiler so it targets / (e.g. /usr/<blah>)
279# for both binary and library paths, even though it is being compiled to
280# WORLDDEST. None of the programs in the world stage are ever actually
281# executed during the buildworld/installworld.
282#
283CROSSENV= MAKEOBJDIRPREFIX=${WORLDDEST} \
284 OBJTREE=${OBJTREE} \
285 MACHINE_ARCH=${TARGET_ARCH} \
286 MACHINE=${TARGET} \
0955fd91 287 MACHINE_PLATFORM=${TARGET_PLATFORM} \
ded5c503 288 OBJFORMAT_PATH=${CTOOLSDEST} \
ce6fa878 289 HOST_CCVER=${HOST_CCVER} \
123dec51 290 CCVER=${WORLD_CCVER} \
0756733f 291 LDVER=${WORLD_LDVER} \
123dec51 292 BINUTILSVER=${WORLD_BINUTILSVER}
984263bc 293
984263bc 294WMAKEENV= ${CROSSENV} \
1397f94a 295 DESTDIR=${WORLDDEST} \
984263bc 296 INSTALL="sh ${.CURDIR}/tools/install.sh" \
1397f94a
MD
297 PATH=${STRICTTMPPATH}
298
984263bc
MD
299WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1
300
301# install stage
b07b69cc 302#
984263bc 303IMAKEENV= ${CROSSENV} \
1397f94a 304 PATH=${STRICTTMPPATH}
984263bc
MD
305IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
306
307# kernel stage
b07b69cc
MD
308#
309KMAKEENV= ${WMAKEENV}
984263bc 310
984263bc
MD
311# buildworld
312#
313# Attempt to rebuild the entire system, with reasonable chance of
314# success, regardless of how old your existing system is.
315#
2cde9453
SS
316_worldtmp: _cleantmp _mtreetmp
317.ORDER: _cleantmp _mtreetmp
318
319_cleantmp:
984263bc
MD
320 @echo
321 @echo "--------------------------------------------------------------"
322 @echo ">>> Rebuilding the temporary build tree"
323 @echo "--------------------------------------------------------------"
324.if !defined(NOCLEAN)
1397f94a 325 rm -rf ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST}
984263bc
MD
326.else
327 # XXX - These two can depend on any header file.
328 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
329 rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
330.endif
2cde9453
SS
331
332_mtreetmp:
1397f94a
MD
333 mkdir -p ${DESTDIRBASE} ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST}
334.for _dir in ${WORLDDEST} ${BTOOLSDEST} ${CTOOLSDEST}
335 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
336 -p ${_dir}/ > /dev/null
337 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
338 -p ${_dir}/usr > /dev/null
984263bc 339.endfor
1397f94a
MD
340 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
341 -p ${WORLDDEST}/usr/include > /dev/null
062db326 342 ${LN} -sf ${.CURDIR}/sys ${WORLDDEST}
1397f94a 343
984263bc
MD
344_bootstrap-tools:
345 @echo
346 @echo "--------------------------------------------------------------"
347 @echo ">>> stage 1: bootstrap tools"
348 @echo "--------------------------------------------------------------"
349 cd ${.CURDIR}; ${BMAKE} bootstrap-tools
350_cleanobj:
984263bc
MD
351 @echo
352 @echo "--------------------------------------------------------------"
1397f94a 353 @echo ">>> stage 2a: cleaning up the object tree"
984263bc
MD
354 @echo "--------------------------------------------------------------"
355 cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
984263bc
MD
356_obj:
357 @echo
358 @echo "--------------------------------------------------------------"
1397f94a 359 @echo ">>> stage 2b: rebuilding the object tree"
984263bc
MD
360 @echo "--------------------------------------------------------------"
361 cd ${.CURDIR}; ${WMAKE} par-obj
362_build-tools:
363 @echo
364 @echo "--------------------------------------------------------------"
1397f94a 365 @echo ">>> stage 2c: build tools"
984263bc
MD
366 @echo "--------------------------------------------------------------"
367 cd ${.CURDIR}; ${TMAKE} build-tools
368_cross-tools:
369 @echo
370 @echo "--------------------------------------------------------------"
371 @echo ">>> stage 3: cross tools"
372 @echo "--------------------------------------------------------------"
373 cd ${.CURDIR}; ${XMAKE} cross-tools
374_includes:
375 @echo
376 @echo "--------------------------------------------------------------"
1397f94a 377 @echo ">>> stage 4a: populating ${WORLDDEST}/usr/include"
984263bc
MD
378 @echo "--------------------------------------------------------------"
379 cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
380_libraries:
381 @echo
382 @echo "--------------------------------------------------------------"
1397f94a 383 @echo ">>> stage 4b: building libraries"
984263bc
MD
384 @echo "--------------------------------------------------------------"
385 cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries
386_depend:
387 @echo
388 @echo "--------------------------------------------------------------"
1397f94a 389 @echo ">>> stage 4c: make dependencies"
984263bc
MD
390 @echo "--------------------------------------------------------------"
391 cd ${.CURDIR}; ${WMAKE} par-depend
392everything:
393 @echo
394 @echo "--------------------------------------------------------------"
1397f94a 395 @echo ">>> stage 4d: building everything.."
984263bc
MD
396 @echo "--------------------------------------------------------------"
397 cd ${.CURDIR}; ${WMAKE} all
398
1397f94a
MD
399# note: buildworld no longer depends on _cleanobj because we rm -rf the
400# entire object tree and built the bootstrap tools in a different location.
401#
402# buildworld - build everything from scratch
403# quickworld - skip the bootstrap, build, and cross-build steps
404# realquickworld - skip the bootstrap, build, crossbuild, and depend step.
405#
406# note: we include _obj in realquickworld to prevent accidental creation
407# of files in /usr/src.
984263bc 408
c08b39fe 409WMAKE_TGTS=
984263bc
MD
410.if !defined(SUBDIR_OVERRIDE)
411WMAKE_TGTS+= _worldtmp _bootstrap-tools
412.endif
1397f94a 413WMAKE_TGTS+= _obj _build-tools
984263bc
MD
414.if !defined(SUBDIR_OVERRIDE)
415WMAKE_TGTS+= _cross-tools
416.endif
417WMAKE_TGTS+= _includes _libraries _depend everything
418
419buildworld: ${WMAKE_TGTS}
1397f94a 420
2cde9453 421quickworld: _mtreetmp _obj _includes _libraries _depend everything
1397f94a 422
2cde9453 423realquickworld: _mtreetmp _obj _includes _libraries everything
1397f94a
MD
424
425crossworld: _worldtmp _bootstrap-tools _obj _build-tools _cross-tools
426
984263bc 427.ORDER: ${WMAKE_TGTS}
9ce30817 428.ORDER: _obj _includes
2cde9453 429.ORDER: _mtreetmp _obj
984263bc
MD
430
431#
432# installcheck
433#
c08b39fe 434# Checks to be sure system is ready for installworld
984263bc
MD
435#
436installcheck:
437.if !defined(NO_SENDMAIL)
f35282e3
MD
438 @pw usershow smmsp || (echo "You may need to run 'make preupgrade' first"; exit 1)
439 @pw groupshow smmsp || (echo "You may need to run 'make preupgrade' first"; exit 1)
984263bc 440.endif
f35282e3 441 @pw usershow _pflogd || (echo "You may need to run 'make preupgrade' first"; exit 1)
f35282e3
MD
442 @pw groupshow authpf || (echo "You may need to run 'make preupgrade' first"; exit 1)
443 @pw groupshow _pflogd || (echo "You may need to run 'make preupgrade' first"; exit 1)
9b815a46 444.if !defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/"
f7ed9937 445 @case `uname -r` in 1.2*|1.3-*|1.3.*|1.4.*|1.5.0-*|1.5.1-*|1.5.2-*|1.5.3-*) echo "You must upgrade your kernel to at least 1.5.4 and reboot before you can safely installworld, due to libc/system call ABI changes" ; exit 1;; esac
9b815a46 446.endif
984263bc
MD
447#
448# installworld
449#
450# Installs everything compiled by a 'buildworld'.
451#
5cccfb7b 452installworld: installcheck
984263bc 453 cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
ec6483ce 454 ${INSTALL} -o root -g wheel -m 644 ${.CURDIR}/Makefile_upgrade.inc ${DESTDIR}/etc/upgrade/
984263bc
MD
455
456#
457# reinstall
458#
459# If you have a build server, you can NFS mount the source and obj directories
460# and do a 'make reinstall' on the *client* to install new binaries from the
461# most recent server build.
462#
463reinstall:
464 @echo "--------------------------------------------------------------"
465 @echo ">>> Making hierarchy"
466 @echo "--------------------------------------------------------------"
467 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy
468 @echo
469 @echo "--------------------------------------------------------------"
470 @echo ">>> Installing everything.."
471 @echo "--------------------------------------------------------------"
472 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
984263bc 473
984263bc 474#
fc7aca3e 475# buildkernel, nativekernel, quickkernel, and installkernel
984263bc
MD
476#
477# Which kernels to build and/or install is specified by setting
478# KERNCONF. If not defined a GENERIC kernel is built/installed.
479# Only the existing (depending TARGET) config files are used
480# for building kernels and only the first of these is designated
481# as the one being installed.
482#
c2c83759
MD
483# You can specify INSTALLSTRIPPED=1 if you wish the installed
484# kernel and modules to be stripped of its debug info (required
485# symbols are left intact). You can specify INSTALLSTRIPPEDMODULES
486# if you only want to strip the modules of their debug info. These
487# only apply if you have DEBUG=-g in your kernel config or make line.
488#
984263bc
MD
489# Note that we have to use TARGET instead of TARGET_ARCH when
490# we're in kernel-land. Since only TARGET_ARCH is (expected) to
491# be set to cross-build, we have to make sure TARGET is set
492# properly.
493
494.if !defined(KERNCONF) && defined(KERNEL)
495KERNCONF= ${KERNEL}
496KERNWARN= yes
497.else
702a95cc
SS
498# XXX makeshift fix to build the right kernel for the (target) architecture
499# We should configure this in the platform files somehow
500.if ${TARGET_ARCH} == "i386"
984263bc 501KERNCONF?= GENERIC
702a95cc 502.else
b2b3ffcd 503KERNCONF?= X86_64_GENERIC
702a95cc 504.endif
984263bc
MD
505.endif
506INSTKERNNAME?= kernel
507
508KRNLSRCDIR= ${.CURDIR}/sys
4e54470f 509KRNLCONFDIR= ${KRNLSRCDIR}/config
984263bc
MD
510KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR}
511KERNCONFDIR?= ${KRNLCONFDIR}
512
513BUILDKERNELS=
514INSTALLKERNEL=
515.for _kernel in ${KERNCONF}
516.if exists(${KERNCONFDIR}/${_kernel})
517BUILDKERNELS+= ${_kernel}
518.if empty(INSTALLKERNEL)
519INSTALLKERNEL= ${_kernel}
520.endif
521.endif
522.endfor
523
9a359590
MD
524# kernel version numbers survive rm -rf
525#
526.for _kernel in ${BUILDKERNELS}
527.if exists(${KRNLOBJDIR}/${_kernel}/version)
528KERNEL_VERSION_${_kernel} != cat ${KRNLOBJDIR}/${_kernel}/version
529.endif
530.endfor
531
984263bc
MD
532#
533# buildkernel
534#
535# Builds all kernels defined by BUILDKERNELS.
536#
fc7aca3e 537bk_tools:
e05c8c84
MD
538 @if [ ! -f ${WORLDDEST}/.libraries_done ]; then \
539 echo "You must buildworld before buildkernel. If you wish"; \
540 echo "to build a kernel using native tools, config it manually"; \
541 echo "or use the nativekernel target if you are in a rush"; \
542 exit 1; \
c2c83759
MD
543 fi
544
545maybe_bk_tools:
546.for _kernel in ${BUILDKERNELS}
547 @if [ ! -f ${KRNLOBJDIR}/${_kernel}/.nativekernel_run ]; then \
548 if [ ! -f ${WORLDDEST}/.libraries_done ]; then \
549 echo "The kernel was build using buildworld tools which no" ; \
550 echo "longer appear to exist, quickkernel failed!" ; \
551 exit 1; \
552 fi; \
553 fi
554.endfor
e05c8c84 555
fc7aca3e 556bk_build_list:
984263bc
MD
557.if empty(BUILDKERNELS)
558 @echo ">>> ERROR: Missing kernel configuration file(s) (${KERNCONF})."
603cdb58 559 @echo ">>> Did you move your kernel configs from i386/conf to config/?"
984263bc
MD
560 @false
561.endif
fc7aca3e
MD
562
563bk_kernwarn:
984263bc
MD
564.if defined(KERNWARN)
565 @echo "--------------------------------------------------------------"
566 @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
567 @echo "--------------------------------------------------------------"
568 @sleep 3
569.endif
570 @echo
fc7aca3e
MD
571
572# The buildkernel target rebuilds the specified kernels from scratch
573# using the crossbuild tools generated by the last buildworld. It is
574# the safest (but also the most time consuming) way to build a new kernel.
575#
576buildkernel: bk_tools bk_build_list bk_kernwarn
984263bc
MD
577.for _kernel in ${BUILDKERNELS}
578 @echo "--------------------------------------------------------------"
579 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
580 @echo "--------------------------------------------------------------"
581 @echo "===> ${_kernel}"
fc7aca3e
MD
582.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN)
583 rm -rf ${KRNLOBJDIR}/${_kernel}
584.else
e05c8c84 585 @if [ -f ${KRNLOBJDIR}/${_kernel}/.nativekernel_run ]; then \
fc7aca3e 586 echo "YOU ARE REBUILDING WITH BUILDKERNEL, REMOVING OLD NATIVEKERNEL BUILD"; \
e05c8c84 587 rm -rf ${KRNLOBJDIR}/${_kernel}; fi
fc7aca3e 588.endif
984263bc
MD
589 mkdir -p ${KRNLOBJDIR}
590.if !defined(NO_KERNELCONFIG)
591 cd ${KRNLCONFDIR}; \
1397f94a 592 PATH=${STRICTTMPPATH} \
984263bc
MD
593 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
594 ${KERNCONFDIR}/${_kernel}
595.endif
9a359590
MD
596.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) && defined(KERNEL_VERSION_${_kernel})
597 echo ${KERNEL_VERSION_${_kernel}} > ${KRNLOBJDIR}/${_kernel}/version
598.endif
e05c8c84 599 touch ${KRNLOBJDIR}/${_kernel}/.buildkernel_run
984263bc
MD
600.if !defined(NO_KERNELDEPEND)
601 cd ${KRNLOBJDIR}/${_kernel}; \
602 ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend
603.endif
604 cd ${KRNLOBJDIR}/${_kernel}; \
605 ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all
606 @echo "--------------------------------------------------------------"
607 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
608 @echo "--------------------------------------------------------------"
609.endfor
610
fc7aca3e 611# The nativekernel target rebuilds the specified kernels from scratch
114580ac 612# using the system's standard compiler rather than using the crossbuild
fc7aca3e
MD
613# tools generated by the last buildworld. This is fairly safe if your
614# system is reasonable up-to-date.
e05c8c84 615#
fc7aca3e 616nativekernel: bk_build_list bk_kernwarn
e05c8c84
MD
617.for _kernel in ${BUILDKERNELS}
618 @echo "--------------------------------------------------------------"
619 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
620 @echo "--------------------------------------------------------------"
621 @echo "===> ${_kernel}"
fc7aca3e
MD
622.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN)
623 rm -rf ${KRNLOBJDIR}/${_kernel}
624.else
e05c8c84 625 @if [ -f ${KRNLOBJDIR}/${_kernel}/.buildkernel_run ]; then \
fc7aca3e 626 echo "YOU ARE REBUILDING WITH NATIVEKERNEL, REMOVING OLD BUILDKERNEL BUILD"; \
e05c8c84 627 rm -rf ${KRNLOBJDIR}/${_kernel}; fi
fc7aca3e 628.endif
e05c8c84
MD
629 mkdir -p ${KRNLOBJDIR}
630.if !defined(NO_KERNELCONFIG)
631 cd ${KRNLCONFDIR}; \
632 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
633 ${KERNCONFDIR}/${_kernel}
634.endif
9a359590
MD
635.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) && defined(KERNEL_VERSION_${_kernel})
636 echo ${KERNEL_VERSION_${_kernel}} > ${KRNLOBJDIR}/${_kernel}/version
637.endif
e05c8c84 638 touch ${KRNLOBJDIR}/${_kernel}/.nativekernel_run
e05c8c84
MD
639 cd ${KRNLOBJDIR}/${_kernel}; \
640 MAKESRCPATH=${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm \
641 ${MAKE} -DBOOTSTRAPPING -f ${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm/Makefile
642.if !defined(NO_KERNELDEPEND)
643 cd ${KRNLOBJDIR}/${_kernel}; \
644 ${MAKE} KERNEL=${INSTKERNNAME} depend
645.endif
646 cd ${KRNLOBJDIR}/${_kernel}; \
647 ${MAKE} KERNEL=${INSTKERNNAME} all
648 @echo "--------------------------------------------------------------"
649 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
650 @echo "--------------------------------------------------------------"
651.endfor
652
fc7aca3e
MD
653# The quickkernel target rebuilds the specified kernels as quickly
654# as possible. It will use the native tools or the buildworld cross tools
655# based on whether the kernel was originally generated via buildkernel or
656# nativekernel. Config is rerun but the object hierarchy is not rebuilt,
657# nor is the make depend step run.
984263bc 658#
c2c83759 659quickkernel: maybe_bk_tools bk_build_list bk_kernwarn
fc7aca3e
MD
660.for _kernel in ${BUILDKERNELS}
661 @echo "--------------------------------------------------------------"
662 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
663 @echo "--------------------------------------------------------------"
664 @echo "===> ${_kernel}"
665.if exists(${KRNLOBJDIR}/${_kernel}/.buildkernel_run)
666.if !defined(NO_KERNELCONFIG)
667 cd ${KRNLCONFDIR}; \
668 PATH=${STRICTTMPPATH} \
669 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
670 ${KERNCONFDIR}/${_kernel}
671.endif
672 cd ${KRNLOBJDIR}/${_kernel}; \
673 ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all
674.else
675.if !defined(NO_KERNELCONFIG)
676 cd ${KRNLCONFDIR}; \
677 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
678 ${KERNCONFDIR}/${_kernel}
679.endif
680 cd ${KRNLOBJDIR}/${_kernel}; \
681 ${MAKE} KERNEL=${INSTKERNNAME} all
682.endif
683 @echo "--------------------------------------------------------------"
684 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
685 @echo "--------------------------------------------------------------"
686.endfor
687
688
984263bc
MD
689# installkernel
690#
691# Install the kernel defined by INSTALLKERNEL
692#
693installkernel reinstallkernel:
982b0507
MD
694 @echo "--------------------------------------------------------------"
695 @echo ">>> Kernel install for ${INSTALLKERNEL} started on `LC_ALL=C date`"
696 @echo "--------------------------------------------------------------"
697.if exists(${KRNLOBJDIR}/${INSTALLKERNEL}/.buildkernel_run)
984263bc 698 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
982b0507 699 ${IMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//}
c2c83759
MD
700.else
701 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
702 ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//}
703.endif
984263bc
MD
704
705#
984263bc
MD
706# most
707#
708# Build most of the user binaries on the existing system libs and includes.
709#
710most:
711 @echo "--------------------------------------------------------------"
712 @echo ">>> Building programs only"
713 @echo "--------------------------------------------------------------"
714.for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin
715 cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ all
716.endfor
717
718#
719# installmost
720#
721# Install the binaries built by the 'most' target. This does not include
722# libraries or include files.
723#
724installmost:
725 @echo "--------------------------------------------------------------"
726 @echo ">>> Installing programs only"
727 @echo "--------------------------------------------------------------"
728.for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin
729 cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ install
730.endfor
731
732#
733# ------------------------------------------------------------------------
734#
735# From here onwards are utility targets used by the 'make world' and
736# related targets. If your 'world' breaks, you may like to try to fix
737# the problem and manually run the following targets to attempt to
738# complete the build. Beware, this is *not* guaranteed to work, you
739# need to have a pretty good grip on the current state of the system
740# to attempt to manually finish it. If in doubt, 'make world' again.
741#
742
79aa78bc
MD
743# bootstrap-tools: Build all tools required to build all tools. Note that
744# order is important in a number of cases and also note that the bootstrap
745# and build tools stages have access to earlier binaries they themselves
746# had generated.
984263bc 747#
79aa78bc
MD
748# patch: older patch's do not have -i. This program must be built
749# first so other bootstrap tools that need to apply patches
750# can use it.
17030342
MD
751# [x]install: dependancies on various new install features
752# rpcgen: old rpcgen used a hardwired cpp path, newer OBJFORMAT_PATH
753# envs are not compatible with older objformat binaries.
754#
cecff5c1 755.if exists(${.CURDIR}/games) && !defined(NO_GAMES)
984263bc
MD
756_strfile= games/fortune/strfile
757.endif
758
d2e9c9d8
MD
759BSTRAPDIRS= ${_strfile} \
760 usr.bin/patch \
761 bin/chmod bin/cp bin/cpdup bin/dd bin/mkdir bin/rm bin/echo \
762 bin/test bin/cat bin/ln bin/mv bin/csh bin/expr bin/sh \
763 bin/hostname bin/kill \
764 usr.bin/yacc usr.bin/colldef usr.bin/uudecode usr.bin/xinstall \
765 usr.bin/m4 usr.bin/rpcgen usr.bin/make usr.bin/awk usr.bin/stat \
766 usr.bin/find usr.bin/lex usr.bin/sed usr.bin/uname usr.bin/touch \
767 usr.bin/mkdep usr.bin/mktemp usr.bin/lorder usr.bin/file2c \
768 usr.bin/tsort usr.bin/tr usr.bin/join usr.bin/wc usr.bin/basename \
769 usr.bin/gencat usr.bin/chflags usr.bin/expand usr.bin/paste \
770 usr.bin/mklocale usr.bin/uuencode usr.bin/compile_et usr.bin/hexdump \
771 usr.bin/cap_mkdb usr.bin/true usr.bin/false \
772 usr.bin/cmp usr.bin/xargs usr.bin/id usr.bin/env usr.bin/dirname \
773 usr.bin/tail usr.bin/unifdef \
774 usr.sbin/chown usr.sbin/mtree usr.sbin/config \
775 usr.sbin/btxld usr.sbin/zic usr.sbin/makewhatis \
776 gnu/usr.bin/texinfo gnu/usr.bin/grep usr.bin/sort \
777 usr.bin/gzip usr.bin/bzip2 usr.bin/mkcsmapper usr.bin/mkesdb
778
779bootstrap-tools: bootstrap-tools-before bootstrap-tools-targets
780 touch ${BTOOLSDEST}/.bootstrap_done
781
782bootstrap-tools-before:
062db326 783 ${LN} -fs /bin/date ${BTOOLSDEST}/bin/date
d2e9c9d8
MD
784
785bootstrap-tools-targets: ${BSTRAPDIRS:S/^/bstrap-/}
786
787.ORDER: bootstrap-tools-before bootstrap-tools-targets
788
789.for _tool in ${BSTRAPDIRS}
790bstrap-${_tool}!
1397f94a 791 ${ECHODIR} "===> ${_tool} (bootstrap-tools)"; \
984263bc
MD
792 cd ${.CURDIR}/${_tool}; \
793 ${MAKE} DIRPRFX=${_tool}/ obj; \
794 ${MAKE} DIRPRFX=${_tool}/ depend; \
795 ${MAKE} DIRPRFX=${_tool}/ all; \
1397f94a 796 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install
984263bc
MD
797.endfor
798
bceb727e 799# build-tools: Build special purpose build tools.
984263bc 800#
1397f94a
MD
801# XXX we may be able to remove or consolidate this into bootstrap-tools
802# now that we have the native helper (.nx/.no) infrastructure.
803#
cecff5c1 804.if exists(${.CURDIR}/share) && !defined(NO_SHARE)
984263bc
MD
805_share= share/syscons/scrnmaps
806.endif
807
30c91f0c 808.if !defined(NO_GCC41)
ddf7cc86
SS
809_gcc41_cross= gnu/usr.bin/cc41
810_gcc41_tools= gnu/usr.bin/cc41/cc_prep gnu/usr.bin/cc41/cc_tools
30c91f0c 811.endif
4f5ea479
SS
812_gcc44_cross= gnu/usr.bin/cc44
813_gcc44_tools= gnu/usr.bin/cc44/cc_prep gnu/usr.bin/cc44/cc_tools
c97b9141 814_custom_cross= libexec/customcc
123dec51 815_binutils= gnu/usr.bin/${WORLD_BINUTILSVER}
17030342 816
2cb07ffb 817BTOOLSDIRS= ${_gcc41_tools} ${_gcc44_tools} ${_share}
d2e9c9d8
MD
818
819build-tools: build-tools-targets
820 touch ${BTOOLSDEST}/.build_done
821
822build-tools-targets: ${BTOOLSDIRS:S/^/btools-/}
823
9ba72882
MD
824.ORDER: ${_gcc41_tools:S/^/btools-/}
825.ORDER: ${_gcc44_tools:S/^/btools-/}
826
d2e9c9d8
MD
827.for _tool in ${BTOOLSDIRS}
828btools-${_tool}!
1397f94a 829 ${ECHODIR} "===> ${_tool} (build-tools)"; \
984263bc
MD
830 cd ${.CURDIR}/${_tool}; \
831 ${MAKE} DIRPRFX=${_tool}/ obj; \
1397f94a
MD
832 ${MAKE} DIRPRFX=${_tool}/ depend; \
833 ${MAKE} DIRPRFX=${_tool}/ all; \
834 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install
984263bc
MD
835.endfor
836
837#
838# cross-tools: Build cross-building tools
839#
984263bc
MD
840.if ${TARGET_ARCH} == "i386" && ${MACHINE_ARCH} != "i386"
841_btxld= usr.sbin/btxld
842.endif
843
d2e9c9d8
MD
844CTOOLSDIRS= ${_btxld} ${_binutils} usr.bin/objformat \
845 ${_gcc41_cross} ${_gcc44_cross} ${_custom_cross}
846
847cross-tools: cross-tools-targets
848 touch ${CTOOLSDEST}/.cross_done
849
850cross-tools-targets: ${CTOOLSDIRS:S/^/ctools-/}
851
852.for _tool in ${CTOOLSDIRS}
853ctools-${_tool}!
1397f94a 854 ${ECHODIR} "===> ${_tool} (cross-tools)"; \
984263bc
MD
855 cd ${.CURDIR}/${_tool}; \
856 ${MAKE} DIRPRFX=${_tool}/ obj; \
857 ${MAKE} DIRPRFX=${_tool}/ depend; \
858 ${MAKE} DIRPRFX=${_tool}/ all; \
1397f94a 859 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${CTOOLSDEST} install
984263bc
MD
860.endfor
861
862#
863# hierarchy - ensure that all the needed directories are present
864#
865hierarchy:
866 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
867
868#
869# libraries - build all libraries, and install them under ${DESTDIR}.
870#
871# The list of libraries with dependents (${_prebuild_libs}) and their
872# interdependencies (__L) are built automatically by the
873# ${.CURDIR}/tools/make_libdeps.sh script.
874#
5228fe46
MD
875# .makeenv does not work when bootstrapping from 4.x, so we must be sure
876# to specify the correct CCVER or 'cc' will not exec the correct compiler.
877#
984263bc 878libraries:
30c91f0c 879.if !defined(NO_GCC41)
ddf7cc86
SS
880 cd ${.CURDIR}; \
881 HOST_CCVER=${HOST_CCVER} CCVER=gcc41 \
882 ${MAKE} -f Makefile.inc1 _startup_libs41;
30c91f0c 883.endif
29d48e65 884 cd ${.CURDIR}; \
4f5ea479
SS
885 HOST_CCVER=${HOST_CCVER} CCVER=gcc44 \
886 ${MAKE} -f Makefile.inc1 _startup_libs44;
887 cd ${.CURDIR}; \
984263bc
MD
888 ${MAKE} -f Makefile.inc1 _startup_libs; \
889 ${MAKE} -f Makefile.inc1 _prebuild_libs; \
890 ${MAKE} -f Makefile.inc1 _generic_libs;
e05c8c84 891 touch ${WORLDDEST}/.libraries_done
984263bc
MD
892
893# These dependencies are not automatically generated:
894#
fd8b66cd 895# gnu/lib/${CCVER}/libgcc and gnu/lib/${CCVER}/csu must be built before all
4f5ea479
SS
896# shared libraries for ELF. The target for _startup_libsXX is
897# specifically built using gccXX.
984263bc 898#
fd8b66cd 899_startup_libs41= gnu/lib/gcc41/csu gnu/lib/gcc41/libgcc
4f5ea479 900_startup_libs44= gnu/lib/gcc44/csu gnu/lib/gcc44/libgcc
e1da6819 901_startup_libs= lib/csu lib/libc lib/libc_rtld
984263bc 902
59392a00 903_prebuild_libs= lib/libbz2 lib/liblzma lib/libz
0b153c05 904_prebuild_libs+= lib/libutil
984263bc
MD
905
906_generic_libs= gnu/lib
907
984263bc 908_prebuild_libs+= lib/libcom_err lib/libcrypt lib/libmd \
7d1ab061 909 lib/libncurses/libncurses lib/libopie lib/libradius \
48d67717 910 lib/libsbuf lib/libtacplus lib/libm \
9f95f3e0 911 lib/libpam lib/libypclnt lib/lib${THREAD_LIB} \
3d91d947 912 lib/libpthread lib/libprop lib/libdevattr
984263bc
MD
913
914lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L
984263bc
MD
915
916_generic_libs+= lib
917
cecff5c1 918.if !defined(NO_CRYPT)
984263bc
MD
919.if !defined(NO_OPENSSL)
920_prebuild_libs+= secure/lib/libcrypto secure/lib/libssl
921.if !defined(NO_OPENSSH)
922_prebuild_libs+= secure/lib/libssh
923secure/lib/libssh__L: secure/lib/libcrypto__L lib/libz__L
924.endif
925.endif
926_generic_libs+= secure/lib
927.endif
928
929_generic_libs+= usr.bin/lex/lib
930
96c51b62 931.for _lib in ${_startup_libs41} ${_startup_libs44} \
4db2a28c 932 ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
984263bc
MD
933${_lib}__L: .PHONY
934.if exists(${.CURDIR}/${_lib})
935 ${ECHODIR} "===> ${_lib}"; \
936 cd ${.CURDIR}/${_lib}; \
937 ${MAKE} DIRPRFX=${_lib}/ depend; \
938 ${MAKE} DIRPRFX=${_lib}/ all; \
939 ${MAKE} DIRPRFX=${_lib}/ install
940.endif
941.endfor
942
943_startup_libs: ${_startup_libs:S/$/__L/}
ddf7cc86 944_startup_libs41: ${_startup_libs41:S/$/__L/}
4f5ea479 945_startup_libs44: ${_startup_libs44:S/$/__L/}
984263bc
MD
946_prebuild_libs: ${_prebuild_libs:S/$/__L/}
947_generic_libs: ${_generic_libs:S/$/__L/}
948
1397f94a
MD
949# library targets must be ordered because there are inter-library
950# races (e.g. generation of tconfig.h)
951#
ddf7cc86 952.ORDER: ${_startup_libs41:S/$/__L/}
4f5ea479 953.ORDER: ${_startup_libs44:S/$/__L/}
1397f94a
MD
954.ORDER: ${_startup_libs:S/$/__L/}
955.ORDER: ${_prebuild_libs:S/$/__L/}
956.ORDER: ${_generic_libs:S/$/__L/}
957
958.for __target in clean cleandepend cleandir obj depend includes
984263bc
MD
959.for entry in ${SUBDIR}
960${entry}.${__target}__D: .PHONY
961 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
962 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \
963 edir=${entry}.${MACHINE_ARCH}; \
964 cd ${.CURDIR}/$${edir}; \
965 else \
966 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \
967 edir=${entry}; \
968 cd ${.CURDIR}/$${edir}; \
969 fi; \
970 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
971.endfor
972par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
1397f94a 973.ORDER: ${SUBDIR:S/$/.${__target}__D/}
984263bc 974.endfor
1397f94a 975.ORDER: par-clean par-cleandepend par-cleandir par-obj par-depend par-includes
984263bc 976
cb0f1574
MD
977# The wmake target is used by /usr/bin/wmake to run make in a
978# world build environment.
979#
980wmake:
1397f94a 981 @echo '${WMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${WMAKE_ARGS}'
cb0f1574 982
5c7da0d7
MD
983wmakeenv:
984 @echo '${WMAKEENV} /bin/sh'
985
1397f94a
MD
986bmake:
987 @echo '${BMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${BMAKE_ARGS}'
988
17030342
MD
989bmakeenv:
990 @echo '${BMAKEENV} /bin/sh'
991
1397f94a
MD
992tmake:
993 @echo '${TMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${TMAKE_ARGS}'
994
17030342
MD
995tmakeenv:
996 @echo '${TMAKEENV} /bin/sh'
997
66834c05
SS
998xmake:
999 @echo '${XMAKEENV} ${MAKE} -m ${.CURDIR}/share/mk ${XMAKE_ARGS}'
1000
1001xmakeenv:
1002 @echo '${XMAKEENV} /bin/sh'
1003
984263bc 1004.include <bsd.subdir.mk>
cb0f1574 1005