2 # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $
4 # Build-time options are documented in make.conf(5).
6 # The intended user-driven targets are:
8 # buildworld - rebuild *everything*, including glue to help do upgrades
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)
12 # installworld- install everything built by "buildworld"
13 # backupworld - copies /bin /sbin /usr/bin /usr/sbin /usr/lib /usr/libexec
14 # to manual backup dir
15 # rescue - create rescue image
16 # restoreworld- installs binaries from manual backup dir to world
17 # restoreworld-auto - installs binaries from auto-backup dir to world
18 # most - build user commands, no libraries or include files
19 # installmost - install user commands, no libraries or include files
20 # backup-clean - delete backup from manual backup dir
21 # backup-auto-clean - delete backup from auto-backup dir
23 # Standard targets (not defined here) are documented in the makefiles in
24 # /usr/share/mk. These include:
25 # obj depend all install clean cleandepend cleanobj
27 # Put initial settings here.
30 # /libexec/ld-elf.so.2 needs to be installed first
31 # Otherwise, install(1) beeing a dynamically linked binary will fail
32 # during the first upgrade from a static to a dynamic world
33 .if exists(${.CURDIR}/libexec)
37 # We must do include and lib early so that the perl *.ph generation
38 # works correctly as it uses the header files installed by this.
39 .if exists(${.CURDIR}/include)
42 .if exists(${.CURDIR}/lib)
45 # This exists simply to ensure that the obj dir hierarchy is
46 # intact for nrelease, allowing the nrelease Makefile's to
47 # reference ${.OBJDIR}.
49 .if exists(${.CURDIR}/nrelease)
53 .if exists(${.CURDIR}/bin)
56 .if exists(${.CURDIR}/games) && !defined(NO_GAMES)
59 .if exists(${.CURDIR}/gnu)
62 .if exists(${.CURDIR}/sbin)
65 .if exists(${.CURDIR}/secure) && !defined(NO_CRYPT)
68 .if exists(${.CURDIR}/share) && !defined(NO_SHARE)
71 .if exists(${.CURDIR}/sys)
74 .if exists(${.CURDIR}/usr.bin)
77 .if exists(${.CURDIR}/usr.sbin)
81 .if exists(${.CURDIR}/etc)
85 # These are last, since it is nice to at least get the base system
86 # rebuilt before you do them.
87 .if defined(LOCAL_DIRS)
88 .for _DIR in ${LOCAL_DIRS}
89 .if exists(${.CURDIR}/${_DIR}) & exists(${.CURDIR}/${_DIR}/Makefile)
95 .if defined(SUBDIR_OVERRIDE)
96 SUBDIR= ${SUBDIR_OVERRIDE}
99 .if defined(NOCLEANDIR)
100 CLEANDIR= clean cleandepend
105 .if defined(NO_CLEAN)
109 # Object directory base in primary make. Note that when we rerun make
110 # from inside this file we change MAKEOBJDIRPREFIX to the appropriate
111 # subdirectory because the rest of the build system needs it that way.
112 # The original object directory base is saved in OBJTREE.
114 MAKEOBJDIRPREFIX?= /usr/obj
115 OBJTREE?= ${MAKEOBJDIRPREFIX}
117 # Used for stage installs and pathing
119 DESTDIRBASE:= ${OBJTREE}${.CURDIR}
121 # Remove DESTDIR from MAKEFLAGS. It is present in the environment
122 # anyhow, and we need to be able to override it for stage installs
123 .MAKEFLAGS:= ${.MAKEFLAGS:NDESTDIR=*}
125 # This section sets the tools used to build the world/kernel
128 WORLD_BINUTILSVER?= binutils225
130 # Set the backup parameters if they are not already defined
132 WORLD_BACKUP?= /var/backups/world_backup
133 AUTO_BACKUP?= ${OBJTREE}/world_backup/${DESTDIR}
135 TARGET_ARCH?= ${MACHINE_ARCH}
136 .if ${TARGET_ARCH} == ${MACHINE_ARCH}
139 TARGET?= ${TARGET_ARCH}
142 BUILD_ARCH!= sysctl -n hw.machine_arch
144 # temporary until everybody has converted to x86_64
145 .if ${BUILD_ARCH} == "amd64"
149 .if ${MACHINE_ARCH} != ${BUILD_ARCH}
150 .error To cross-build, set TARGET_ARCH.
154 # Backwards compatibility with older make's or older sys.mk's. make
155 # is expected to define MACHINE_PLATFORM.
157 .if !defined(MACHINE_PLATFORM)
158 MACHINE_PLATFORM= pc32
161 # XXX this is ugly and we need to come up with a nicer solution
162 .if !defined(TARGET_PLATFORM)
163 .if ${TARGET_ARCH} == "i386"
164 TARGET_PLATFORM= pc32
165 .elif ${TARGET_ARCH} == "x86_64"
166 TARGET_PLATFORM= pc64
168 .error Unknown target architecture.
172 THREAD_LIB?= thread_xu
173 .if ${THREAD_LIB} == "c_r"
174 .if defined(NO_LIBC_R)
175 .error libc_r is chosen as the default thread library, but NO_LIBC_R is defined
179 # BTOOLS (Natively built) All non-cross-development tools that the
180 # main build needs. This includes things like 'mkdir' and 'rm'.
181 # We will not use the native system's exec path once we start
182 # on WORLD. (bootstrap-tools and build-tools or BTOOLS)
184 # CTOOLS (Natively built) Cross development tools which are specific
185 # to the target architecture.
187 # WORLD (Cross built) Our ultimate buildworld, using only BTOOLS and
190 # MACHINE_PLATFORM Platform Architecture we are building on
191 # MACHINE Machine Architecture (usually the same as MACHINE_ARCH)
192 # MACHINE_ARCH Cpu Architecture we are building on
194 # TARGET_PLATFORM Platform Architecture we are building for
195 # TARGET Machine Architecture we are building for
196 # TARGET_ARCH Cpu Architecture we are building for
198 BTOOLSDEST= ${DESTDIRBASE}/btools_${MACHINE_ARCH}
199 CTOOLSDEST= ${DESTDIRBASE}/ctools_${MACHINE_ARCH}_${TARGET_ARCH}
200 WORLDDEST= ${DESTDIRBASE}/world_${TARGET_ARCH}
202 # The bootstrap-tools path is used by the bootstrap-tools, build-tools, and
203 # cross-tools stages to augment the existing command path to access newer
204 # versions of certain utilities such as 'patch' that the cross-tools stage
207 BTOOLSPATH= ${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games
209 # The strict temporary command path contains all binaries required
210 # by the buildworld system after the cross-tools stage.
212 STRICTTMPPATH= ${CTOOLSDEST}/usr/sbin:${CTOOLSDEST}/usr/bin:${CTOOLSDEST}/bin:${CTOOLSDEST}/usr/games:${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games:/usr/local/bin:/usr/pkg/bin
218 # Building a world goes through the following stages
220 # 1. bootstrap-tool stage [BMAKE]
221 # This stage is responsible for creating programs that
222 # are needed for backward compatibility reasons. They
223 # are not built as cross-tools.
224 # 2. build-tool stage [TMAKE]
225 # This stage is responsible for creating the object
226 # tree and building any tools that are needed during
228 # 3. cross-tool stage [XMAKE]
229 # This stage is responsible for creating any tools that
230 # are needed for cross-builds. A cross-compiler is one
232 # 4. world stage [WMAKE]
233 # This stage actually builds the world.
234 # 5. install stage (optional) [IMAKE]
235 # This stage installs a previously built world.
237 # In all cases we must carefully adjust the environment so the proper
238 # tools and header files are used.
240 # NOTE: The M4 environment variable is used by the [f]lex binary to
241 # override the location of the 'm4' binary. The override is
242 # needed for certain buildworld version transitions, specifically
243 # past a certain point in 3.3 because the older /usr/bin/m4 will
244 # generate output that will blow up the newer [f]lex/yacc/bison
248 # bootstrap-tool stage
250 BMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \
252 DESTDIR=${BTOOLSDEST} \
253 PATH=${BTOOLSPATH}:${PATH} \
254 M4=${BTOOLSDEST}/usr/bin/m4 \
255 INSTALL="sh ${.CURDIR}/tools/install.sh"
257 BMAKE= ${BMAKEENV} make -f Makefile.inc1 -DBOOTSTRAPPING \
258 -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \
259 -DNO_WERROR -DNO_NLS -DSYSBUILD
263 TMAKEENV= MAKEOBJDIRPREFIX=${BTOOLSDEST} \
266 PATH=${BTOOLSPATH}:${PATH} \
267 M4=${BTOOLSDEST}/usr/bin/m4 \
268 INSTALL="sh ${.CURDIR}/tools/install.sh"
270 TMAKE= ${TMAKEENV} make -f Makefile.inc1 -DBOOTSTRAPPING \
271 -DNOSHARED -DSYSBUILD
275 # note: TOOLS_PREFIX points to the obj root holding the cross
276 # compiler binaries, while USRDATA_PREFIX points to the obj root
277 # holding the target environment (and also determines where cross-built
278 # libraries, crt*.o, and include files are installed).
280 XMAKEENV= MAKEOBJDIRPREFIX=${CTOOLSDEST} \
282 DESTDIR=${CTOOLSDEST} \
283 _SHLIBDIRPREFIX=${CTOOLSDEST} \
284 INSTALL="sh ${.CURDIR}/tools/install.sh" \
285 TOOLS_PREFIX=${CTOOLSDEST} \
286 USRDATA_PREFIX=${WORLDDEST} \
287 SELECT_LINKER=${WORLD_LDVER} \
288 M4=${BTOOLSDEST}/usr/bin/m4 \
289 PATH=${BTOOLSPATH}:${PATH}
291 XMAKE= ${XMAKEENV} make -f Makefile.inc1 -DNO_GDB \
292 -DBOOTSTRAPPING -DNOSHARED -DSYSBUILD
294 # world stage, note the strict path and note that TOOLS_PREFIX is left
295 # unset and USRDATA_PREFIX (which defaults to TOOLS_PREFIX) is set to empty,
296 # which is primarily for the compiler so it targets / (e.g. /usr/<blah>)
297 # for both binary and library paths, even though it is being compiled to
298 # WORLDDEST. None of the programs in the world stage are ever actually
299 # executed during the buildworld/installworld.
301 CROSSENV= MAKEOBJDIRPREFIX=${WORLDDEST} \
303 MACHINE_ARCH=${TARGET_ARCH} \
305 MACHINE_PLATFORM=${TARGET_PLATFORM} \
306 OBJFORMAT_PATH=${CTOOLSDEST} \
307 HOST_CCVER=${HOST_CCVER} \
308 CCVER=${WORLD_CCVER} \
309 LDVER=${WORLD_LDVER} \
310 BINUTILSVER=${WORLD_BINUTILSVER}
312 WMAKEENV= ${CROSSENV} \
313 DESTDIR=${WORLDDEST} \
314 _SHLIBDIRPREFIX=${WORLDDEST} \
315 INSTALL="sh ${.CURDIR}/tools/install.sh" \
316 M4=${BTOOLSDEST}/usr/bin/m4 \
317 PATH=${STRICTTMPPATH}
319 WMAKE= ${WMAKEENV} make -f Makefile.inc1 -DSYSBUILD
323 IMAKEENV= ${CROSSENV} \
324 PATH=${STRICTTMPPATH}
325 IMAKE= ${IMAKEENV} make -f Makefile.inc1 -DSYSBUILD
329 KMAKEENV= ${WMAKEENV}
333 # Attempt to rebuild the entire system, with reasonable chance of
334 # success, regardless of how old your existing system is.
336 _worldtmp: _cleantmp _mtreetmp
337 .ORDER: _cleantmp _mtreetmp
341 @echo "--------------------------------------------------------------"
342 @echo ">>> Rebuilding the temporary build tree"
343 @echo "--------------------------------------------------------------"
344 .if !defined(NOCLEAN)
345 rm -rf ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST}
347 # XXX - These two can depend on any header file.
348 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
349 rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
353 mkdir -p ${DESTDIRBASE} ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST}
354 .for _dir in ${WORLDDEST} ${BTOOLSDEST} ${CTOOLSDEST}
355 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
356 -p ${_dir}/ > /dev/null
357 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
358 -p ${_dir}/usr > /dev/null
360 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
361 -p ${WORLDDEST}/usr/include > /dev/null
362 ${LN} -sf ${.CURDIR}/sys ${WORLDDEST}
366 @echo "--------------------------------------------------------------"
367 @echo ">>> stage 1: bootstrap tools"
368 @echo "--------------------------------------------------------------"
369 cd ${.CURDIR}; ${BMAKE} bootstrap-tools
372 @echo "--------------------------------------------------------------"
373 @echo ">>> stage 2a: cleaning up the object tree"
374 @echo "--------------------------------------------------------------"
375 cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
378 @echo "--------------------------------------------------------------"
379 @echo ">>> stage 2b: rebuilding the object tree"
380 @echo "--------------------------------------------------------------"
381 cd ${.CURDIR}; ${WMAKE} par-obj
384 @echo "--------------------------------------------------------------"
385 @echo ">>> stage 2c: build tools"
386 @echo "--------------------------------------------------------------"
387 cd ${.CURDIR}; ${TMAKE} build-tools
390 @echo "--------------------------------------------------------------"
391 @echo ">>> stage 3: cross tools"
392 @echo "--------------------------------------------------------------"
393 cd ${.CURDIR}; ${XMAKE} cross-tools
396 @echo "--------------------------------------------------------------"
397 @echo ">>> stage 4a: populating ${WORLDDEST}/usr/include"
398 @echo "--------------------------------------------------------------"
399 cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
402 @echo "--------------------------------------------------------------"
403 @echo ">>> stage 4b: building libraries"
404 @echo "--------------------------------------------------------------"
405 cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOMAN -DNOFSCHG libraries
408 @echo "--------------------------------------------------------------"
409 @echo ">>> stage 4c: make dependencies"
410 @echo "--------------------------------------------------------------"
411 cd ${.CURDIR}; ${WMAKE} par-depend
414 @echo "--------------------------------------------------------------"
415 @echo ">>> stage 4d: building everything.."
416 @echo "--------------------------------------------------------------"
417 cd ${.CURDIR}; ${WMAKE} all
419 @echo "--------------------------------------------------------------"
420 @echo ">>> starting buildworld target"
421 @echo "--------------------------------------------------------------"
423 @echo "--------------------------------------------------------------"
424 @echo ">>> buildworld target complete"
425 @echo "--------------------------------------------------------------"
427 @echo "--------------------------------------------------------------"
428 @echo ">>> starting quickworld target"
429 @echo "--------------------------------------------------------------"
431 @echo "--------------------------------------------------------------"
432 @echo ">>> quickworld target complete"
433 @echo "--------------------------------------------------------------"
435 @echo "--------------------------------------------------------------"
436 @echo ">>> starting installworld target"
437 @echo "--------------------------------------------------------------"
439 # note: buildworld no longer depends on _cleanobj because we rm -rf the
440 # entire object tree and built the bootstrap tools in a different location.
442 # buildworld - build everything from scratch
443 # quickworld - skip the bootstrap, build, and cross-build steps
444 # realquickworld - skip the bootstrap, build, crossbuild, and depend step.
446 # note: we include _obj in realquickworld to prevent accidental creation
447 # of files in /usr/src.
450 .if !defined(SUBDIR_OVERRIDE)
451 WMAKE_TGTS+= _worldtmp _bootstrap-tools
453 WMAKE_TGTS+= _obj _build-tools
454 .if !defined(SUBDIR_OVERRIDE)
455 WMAKE_TGTS+= _cross-tools
457 WMAKE_TGTS+= _includes _libraries _depend everything
459 buildworld: _bwinit ${WMAKE_TGTS} _bwdone
461 quickworld: _qwinit _mtreetmp _obj _includes _libraries _depend everything _qwdone
463 realquickworld: _qwinit _mtreetmp _obj _includes _libraries everything _qwdone
465 crossworld: _worldtmp _bootstrap-tools _obj _build-tools _cross-tools
467 .ORDER: _bwinit ${WMAKE_TGTS} _bwdone
468 .ORDER: _obj _includes
469 .ORDER: _qwinit _mtreetmp _obj
470 .ORDER: installcheck backupworld-auto
471 .ORDER: everything _qwdone
476 # Checks to be sure system is ready for installworld
478 installcheck: _iwinit
479 @pw usershow _pflogd || (echo "You may need to run 'make preupgrade' first"; /usr/bin/false)
480 @pw groupshow authpf || (echo "You may need to run 'make preupgrade' first"; /usr/bin/false)
481 @pw groupshow _pflogd || (echo "You may need to run 'make preupgrade' first"; /usr/bin/false)
482 .if !defined(OVERRIDE_CHECKS)
483 .if !defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/"
484 @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" ; /usr/bin/false ; esac
485 @case `uname -r` in 1.*|2.*|3.0*|3.1*|3.2*|3.3*|3.4*|3.5*|3.6*) echo "Base is too old for a normal installworld, you need to use installworld-force" ; /usr/bin/false ; esac
492 # Backs up the current world if ${AUTO_BACKUP} is writable.
493 # Installs everything compiled by a 'buildworld'.
495 # Includes sleep/sync safety before running mkinitrd.
497 installworld: installcheck
498 -@mkdir -p ${AUTO_BACKUP} > /dev/null 2>&1
500 (touch ${AUTO_BACKUP}/.updating > /dev/null 2>&1 && \
501 ${IMAKE} backupworld-auto) || \
502 echo "Cannot write to ${AUTO_BACKUP} - world not backed up"
504 cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
505 ${INSTALL} -o root -g wheel -m 644 ${.CURDIR}/Makefile_upgrade.inc ${DESTDIR}/etc/upgrade/
507 @echo "--------------------------------------------------------------"
508 @echo ">>> installworld target complete"
509 @echo "--------------------------------------------------------------"
510 @echo "If things work as expected after a full reboot, consider updating the rescue"
511 @echo "image with 'make rescue'. Do not do it until after rebooting."
514 @echo "Doing a forced installworld. This will install to a temporary directory,"
515 @echo "then copy the main binaries and libraries with a static cpdup to ${DESTDIR}/"
516 @echo "and finally willl issue a normal installworld. Starting in 5 seconds.".
519 rm -rf /usr/obj/temp > /dev/null 2>& 1 || chflags -R noschg /usr/obj/temp
521 mkdir -p /usr/obj/temp/cpdup/bin
522 (cd ${.CURDIR}/bin/cpdup; make clean; make obj; make clean; make CFLAGS=-static all install DESTDIR=/usr/obj/temp/cpdup NOMAN=TRUE)
523 @echo "XXXXXXXXX Installing to temporary XXXXXXXXX"
525 (cd ${.CURDIR}; ${MAKE} installworld DESTDIR=/usr/obj/temp > /dev/null 2>&1)
526 @echo "XXXXXXXXX Blasting binaries and libraries XXXXXXXXX"
528 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/bin /bin
529 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/sbin /sbin
530 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/lib /lib
531 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/usr/bin /usr/bin
532 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/usr/sbin /usr/sbin
533 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/usr/lib /usr/lib
534 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/libexec /libexec
535 /usr/obj/temp/cpdup/bin/cpdup -i0 /usr/obj/temp/usr/libexec /usr/libexec
536 @echo "XXXXXXXXX Doing final installworld XXXXXXXX"
538 (cd ${.CURDIR}; ${MAKE} installworld OVERRIDE_CHECKS=TRUE)
539 (cd ${.CURDIR}; ${MAKE} upgrade OVERRIDE_CHECKS=TRUE)
541 # Create a rescue image. We no longer do this automatically for several
542 # reasons, primarily that users have had serious issue with mismatched 'vn'
543 # vs the kldload image that can crash the system. But also, the rescue image
544 # is intended to be a rescue image, it is a bad idea to update it at the
545 # same time the world is installed.
548 mkinitrd -b ${DESTDIR}/boot
553 # If you have a build server, you can NFS mount the source and obj directories
554 # and do a 'make reinstall' on the *client* to install new binaries from the
555 # most recent server build.
558 @echo "--------------------------------------------------------------"
559 @echo ">>> Making hierarchy"
560 @echo "--------------------------------------------------------------"
561 cd ${.CURDIR}; make -f Makefile.inc1 hierarchy
563 @echo "--------------------------------------------------------------"
564 @echo ">>> Installing everything.."
565 @echo "--------------------------------------------------------------"
566 cd ${.CURDIR}; make -f Makefile.inc1 install
569 # buildkernel, nativekernel, quickkernel, and installkernel
571 # Which kernels to build and/or install is specified by setting
572 # KERNCONF. If not defined a GENERIC kernel is built/installed.
573 # Only the existing (depending TARGET) config files are used
574 # for building kernels and only the first of these is designated
575 # as the one being installed.
577 # You can specify INSTALLSTRIPPED=1 if you wish the installed
578 # kernel and modules to be stripped of its debug info (required
579 # symbols are left intact). You can specify INSTALLSTRIPPEDMODULES
580 # if you only want to strip the modules of their debug info. These
581 # only apply if you have DEBUG=-g in your kernel config or make line.
583 # Note that we have to use TARGET instead of TARGET_ARCH when
584 # we're in kernel-land. Since only TARGET_ARCH is (expected) to
585 # be set to cross-build, we have to make sure TARGET is set
588 .if !defined(KERNCONF) && defined(KERNEL)
592 # XXX makeshift fix to build the right kernel for the (target) architecture
593 # We should configure this in the platform files somehow
594 .if ${TARGET_ARCH} == "i386"
597 KERNCONF?= X86_64_GENERIC
600 INSTKERNNAME?= kernel
602 KRNLSRCDIR= ${.CURDIR}/sys
603 KRNLCONFDIR= ${KRNLSRCDIR}/config
604 KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR}
605 KERNCONFDIR?= ${KRNLCONFDIR}
609 .for _kernel in ${KERNCONF}
610 .if exists(${KERNCONFDIR}/${_kernel})
611 BUILDKERNELS+= ${_kernel}
612 .if empty(INSTALLKERNEL)
613 INSTALLKERNEL= ${_kernel}
618 # kernel version numbers survive rm -rf
620 .for _kernel in ${BUILDKERNELS}
621 .if exists(${KRNLOBJDIR}/${_kernel}/version)
622 KERNEL_VERSION_${_kernel} != cat ${KRNLOBJDIR}/${_kernel}/version
629 # Builds all kernels defined by BUILDKERNELS.
632 @if [ ! -f ${WORLDDEST}/.libraries_done ]; then \
633 echo "You must buildworld before buildkernel. If you wish"; \
634 echo "to build a kernel using native tools, config it manually"; \
635 echo "or use the nativekernel target if you are in a rush"; \
640 .for _kernel in ${BUILDKERNELS}
641 @if [ ! -f ${KRNLOBJDIR}/${_kernel}/.nativekernel_run ]; then \
642 if [ ! -f ${WORLDDEST}/.libraries_done ]; then \
643 echo "The kernel was build using buildworld tools which no" ; \
644 echo "longer appear to exist, quickkernel failed!" ; \
651 .if empty(BUILDKERNELS)
652 @echo ">>> ERROR: Missing kernel configuration file(s) (${KERNCONF})."
653 @echo ">>> Did you move your kernel configs from i386/conf to config/?"
658 .if defined(KERNWARN)
659 @echo "--------------------------------------------------------------"
660 @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
661 @echo "--------------------------------------------------------------"
666 # The buildkernel target rebuilds the specified kernels from scratch
667 # using the crossbuild tools generated by the last buildworld. It is
668 # the safest (but also the most time consuming) way to build a new kernel.
670 buildkernel: bk_tools bk_build_list bk_kernwarn
671 .for _kernel in ${BUILDKERNELS}
672 @echo "--------------------------------------------------------------"
673 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
674 @echo "--------------------------------------------------------------"
675 @echo "===> ${_kernel}"
676 .if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN)
677 rm -rf ${KRNLOBJDIR}/${_kernel}
679 @if [ -f ${KRNLOBJDIR}/${_kernel}/.nativekernel_run ]; then \
680 echo "YOU ARE REBUILDING WITH BUILDKERNEL, REMOVING OLD NATIVEKERNEL BUILD"; \
681 rm -rf ${KRNLOBJDIR}/${_kernel}; fi
683 mkdir -p ${KRNLOBJDIR}
684 .if !defined(NO_KERNELCONFIG)
686 PATH=${STRICTTMPPATH} \
687 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
688 ${KERNCONFDIR}/${_kernel}
690 .if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) && defined(KERNEL_VERSION_${_kernel})
691 echo ${KERNEL_VERSION_${_kernel}} > ${KRNLOBJDIR}/${_kernel}/version
693 touch ${KRNLOBJDIR}/${_kernel}/.buildkernel_run
694 .if !defined(NO_KERNELDEPEND)
695 cd ${KRNLOBJDIR}/${_kernel}; \
696 ${KMAKEENV} make KERNEL=${INSTKERNNAME} depend
698 cd ${KRNLOBJDIR}/${_kernel}; \
699 ${KMAKEENV} make KERNEL=${INSTKERNNAME} all
700 @echo "--------------------------------------------------------------"
701 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
702 @echo "--------------------------------------------------------------"
705 # The nativekernel target rebuilds the specified kernels from scratch
706 # using the system's standard compiler rather than using the crossbuild
707 # tools generated by the last buildworld. This is fairly safe if your
708 # system is reasonable up-to-date.
710 nativekernel: bk_build_list bk_kernwarn
711 .for _kernel in ${BUILDKERNELS}
712 @echo "--------------------------------------------------------------"
713 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
714 @echo "--------------------------------------------------------------"
715 @echo "===> ${_kernel}"
716 .if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN)
717 rm -rf ${KRNLOBJDIR}/${_kernel}
719 @if [ -f ${KRNLOBJDIR}/${_kernel}/.buildkernel_run ]; then \
720 echo "YOU ARE REBUILDING WITH NATIVEKERNEL, REMOVING OLD BUILDKERNEL BUILD"; \
721 rm -rf ${KRNLOBJDIR}/${_kernel}; fi
723 mkdir -p ${KRNLOBJDIR}
724 .if !defined(NO_KERNELCONFIG)
726 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
727 ${KERNCONFDIR}/${_kernel}
729 .if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) && defined(KERNEL_VERSION_${_kernel})
730 echo ${KERNEL_VERSION_${_kernel}} > ${KRNLOBJDIR}/${_kernel}/version
732 touch ${KRNLOBJDIR}/${_kernel}/.nativekernel_run
733 cd ${KRNLOBJDIR}/${_kernel}; \
734 MAKESRCPATH=${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm \
735 make -DBOOTSTRAPPING -f ${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm/Makefile
736 .if !defined(NO_KERNELDEPEND)
737 cd ${KRNLOBJDIR}/${_kernel}; \
738 make KERNEL=${INSTKERNNAME} depend
740 cd ${KRNLOBJDIR}/${_kernel}; \
741 make KERNEL=${INSTKERNNAME} all
742 @echo "--------------------------------------------------------------"
743 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
744 @echo "--------------------------------------------------------------"
747 # The quickkernel target rebuilds the specified kernels as quickly
748 # as possible. It will use the native tools or the buildworld cross tools
749 # based on whether the kernel was originally generated via buildkernel or
750 # nativekernel. Config is rerun but the object hierarchy is not rebuilt,
751 # nor is the make depend step run.
753 quickkernel: maybe_bk_tools bk_build_list bk_kernwarn
754 .for _kernel in ${BUILDKERNELS}
755 @echo "--------------------------------------------------------------"
756 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
757 @echo "--------------------------------------------------------------"
758 @echo "===> ${_kernel}"
759 .if exists(${KRNLOBJDIR}/${_kernel}/.buildkernel_run)
760 .if !defined(NO_KERNELCONFIG)
762 PATH=${STRICTTMPPATH} \
763 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
764 ${KERNCONFDIR}/${_kernel}
766 cd ${KRNLOBJDIR}/${_kernel}; \
767 ${KMAKEENV} make KERNEL=${INSTKERNNAME} all
769 .if !defined(NO_KERNELCONFIG)
771 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
772 ${KERNCONFDIR}/${_kernel}
774 cd ${KRNLOBJDIR}/${_kernel}; \
775 make KERNEL=${INSTKERNNAME} all
777 @echo "--------------------------------------------------------------"
778 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
779 @echo "--------------------------------------------------------------"
785 # Install the kernel defined by INSTALLKERNEL
787 installkernel reinstallkernel:
788 @echo "--------------------------------------------------------------"
789 @echo ">>> Kernel install for ${INSTALLKERNEL} started on `LC_ALL=C date`"
790 @echo "--------------------------------------------------------------"
791 .if exists(${KRNLOBJDIR}/${INSTALLKERNEL}/.buildkernel_run)
792 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
793 ${IMAKEENV} make KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//}
795 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
796 make KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//}
802 # Build most of the user binaries on the existing system libs and includes.
805 @echo "--------------------------------------------------------------"
806 @echo ">>> Building programs only"
807 @echo "--------------------------------------------------------------"
808 .for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin
809 cd ${.CURDIR}/${_dir}; make DIRPRFX=${_dir}/ all
815 # Install the binaries built by the 'most' target. This does not include
816 # libraries or include files.
819 @echo "--------------------------------------------------------------"
820 @echo ">>> Installing programs only"
821 @echo "--------------------------------------------------------------"
822 .for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin
823 cd ${.CURDIR}/${_dir}; make DIRPRFX=${_dir}/ install
827 # ------------------------------------------------------------------------
829 # From here onwards are utility targets used by the 'make world' and
830 # related targets. If your 'world' breaks, you may like to try to fix
831 # the problem and manually run the following targets to attempt to
832 # complete the build. Beware, this is *not* guaranteed to work, you
833 # need to have a pretty good grip on the current state of the system
834 # to attempt to manually finish it. If in doubt, 'make world' again.
837 # bootstrap-tools: Build all tools required to build all tools. Note that
838 # order is important in a number of cases and also note that the bootstrap
839 # and build tools stages have access to earlier binaries they themselves
842 # patch: older patch's do not have -i. This program must be built
843 # first so other bootstrap tools that need to apply patches
845 # [x]install: dependancies on various new install features
846 # rpcgen: old rpcgen used a hardwired cpp path, newer OBJFORMAT_PATH
847 # envs are not compatible with older objformat binaries.
849 .if exists(${.CURDIR}/games) && !defined(NO_GAMES)
850 _strfile= games/fortune/strfile
853 # BSTRAPDIRS1 - must be built in strict order, no parallelism
855 # order is very important. yacc before m4 before flex. flex exec's m4,
856 # m4's parser file needs the latest byacc (insanity!).
858 BSTRAPDIRS1= ${_strfile} \
860 bin/chmod bin/cp bin/cpdup bin/dd bin/mkdir bin/rm bin/echo \
861 bin/test bin/cat bin/ln bin/mv bin/csh bin/expr bin/sh \
862 bin/hostname bin/kill \
863 usr.bin/yacc usr.bin/m4 usr.bin/colldef \
864 usr.bin/uudecode usr.bin/xinstall \
865 usr.bin/rpcgen usr.bin/bmake usr.bin/awk usr.bin/stat \
866 usr.bin/find usr.bin/flex
868 # BSTRAPDIRS2 - may built in parallel
871 usr.bin/sed usr.bin/uname usr.bin/touch \
872 usr.bin/mkdep usr.bin/mktemp usr.bin/lorder usr.bin/file2c \
873 usr.bin/tsort usr.bin/tr usr.bin/join usr.bin/wc usr.bin/basename \
874 usr.bin/gencat usr.bin/chflags usr.bin/expand usr.bin/paste \
875 usr.bin/mklocale usr.bin/uuencode usr.bin/compile_et usr.bin/hexdump \
876 usr.bin/cap_mkdb usr.bin/true usr.bin/false \
877 usr.bin/cmp usr.bin/xargs usr.bin/id usr.bin/env usr.bin/dirname \
878 usr.bin/tail usr.bin/unifdef usr.bin/tic \
879 usr.sbin/chown usr.sbin/mtree usr.sbin/config \
880 usr.sbin/btxld usr.sbin/zic usr.sbin/makewhatis \
881 gnu/usr.bin/grep usr.bin/sort usr.bin/gzip usr.bin/bzip2 \
882 usr.bin/mkcsmapper usr.bin/mkesdb usr.bin/crunch
884 bootstrap-tools: bootstrap-tools-before bootstrap-tools-targets1 bootstrap-tools-targets2
885 touch ${BTOOLSDEST}/.bootstrap_done
887 bootstrap-tools-before:
888 ${LN} -fs /bin/date ${BTOOLSDEST}/bin/date
890 bootstrap-tools-targets1: ${BSTRAPDIRS1:S/^/bstrap-/}
892 bootstrap-tools-targets2: ${BSTRAPDIRS2:S/^/bstrap-/}
894 .ORDER: bootstrap-tools-before bootstrap-tools-targets1 bootstrap-tools-targets2
896 .ORDER: ${BSTRAPDIRS1:S/^/bstrap-/}
898 .for _tool in ${BSTRAPDIRS1} ${BSTRAPDIRS2}
900 ${ECHODIR} "===> ${_tool} (bootstrap-tools)"; \
901 cd ${.CURDIR}/${_tool}; \
902 make DIRPRFX=${_tool}/ obj; \
903 make DIRPRFX=${_tool}/ depend; \
904 make DIRPRFX=${_tool}/ all; \
905 make DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install
908 # build-tools: Build special purpose build tools.
910 # XXX we may be able to remove or consolidate this into bootstrap-tools
911 # now that we have the native helper (.nx/.no) infrastructure.
913 .if exists(${.CURDIR}/share) && !defined(NO_SHARE)
914 _share= share/syscons/scrnmaps
917 _gcc_common_cross= lib/libz gnu/usr.bin/gmp gnu/usr.bin/mpfr gnu/usr.bin/mpc
918 _gcc50_cross= gnu/usr.bin/cc50
919 _gcc50_tools= gnu/usr.bin/cc50/cc_prep gnu/usr.bin/cc50/cc_tools
920 .if !defined(NO_ALTCOMPILER)
921 _gcc47_cross= gnu/usr.bin/cc47
922 _gcc47_tools= gnu/usr.bin/cc47/cc_prep gnu/usr.bin/cc47/cc_tools
924 _custom_cross= libexec/customcc
925 _binutils= gnu/usr.bin/${WORLD_BINUTILSVER}
927 BTOOLSDIRS= ${_gcc47_tools} ${_gcc50_tools} ${_share}
929 build-tools: build-tools-targets
930 touch ${BTOOLSDEST}/.build_done
932 build-tools-targets: ${BTOOLSDIRS:S/^/btools-/}
934 .ORDER: ${_gcc47_tools:S/^/btools-/}
935 .ORDER: ${_gcc50_tools:S/^/btools-/}
937 .for _tool in ${BTOOLSDIRS}
939 ${ECHODIR} "===> ${_tool} (build-tools)"; \
940 cd ${.CURDIR}/${_tool}; \
941 make DIRPRFX=${_tool}/ obj; \
942 make DIRPRFX=${_tool}/ depend; \
943 make DIRPRFX=${_tool}/ all; \
944 make DIRPRFX=${_tool}/ DESTDIR=${BTOOLSDEST} install
948 # cross-tools: Build cross-building tools
950 .if ${TARGET_ARCH} == "i386" && ${MACHINE_ARCH} != "i386"
951 _btxld= usr.sbin/btxld
954 CTOOLSDIRS= ${_btxld} ${_binutils} \
955 usr.bin/objformat usr.bin/crunch/crunchide \
956 ${_gcc_common_cross} \
957 ${_gcc47_cross} ${_gcc50_cross} ${_custom_cross}
959 cross-tools: cross-tools-targets
960 touch ${CTOOLSDEST}/.cross_done
962 cross-tools-targets: ${CTOOLSDIRS:S/^/ctools-/}
964 .for _tool in ${CTOOLSDIRS}
966 ${ECHODIR} "===> ${_tool} (cross-tools)"; \
967 cd ${.CURDIR}/${_tool}; \
968 make DIRPRFX=${_tool}/ obj; \
969 make DIRPRFX=${_tool}/ depend; \
970 make DIRPRFX=${_tool}/ all; \
971 make DIRPRFX=${_tool}/ DESTDIR=${CTOOLSDEST} install
975 # hierarchy - ensure that all the needed directories are present
978 cd ${.CURDIR}/etc; make distrib-dirs
981 # libraries - build all libraries, and install them under ${DESTDIR}.
983 # The list of libraries with dependents (${_prebuild_libs}) and their
984 # interdependencies (__L) are built automatically by the
985 # ${.CURDIR}/tools/make_libdeps.sh script.
987 # .makeenv does not work when bootstrapping from 4.x, so we must be sure
988 # to specify the correct CCVER or 'cc' will not exec the correct compiler.
992 HOST_CCVER=${HOST_CCVER} CCVER=gcc50 \
993 make -f Makefile.inc1 _startup_libs50 -DSYSBUILD;
994 .if !defined(NO_ALTCOMPILER)
996 HOST_CCVER=${HOST_CCVER} CCVER=gcc47 \
997 make -f Makefile.inc1 _startup_libs47 -DSYSBUILD;
1000 make -f Makefile.inc1 _startup_libs -DSYSBUILD; \
1001 make -f Makefile.inc1 _prebuild_libs -DSYSBUILD; \
1002 make -f Makefile.inc1 _generic_libs -DSYSBUILD;
1003 touch ${WORLDDEST}/.libraries_done
1005 # These dependencies are not automatically generated:
1007 # gnu/lib/${CCVER}/libgcc and gnu/lib/${CCVER}/csu must be built before all
1008 # shared libraries for ELF. The target for _startup_libsXX is
1009 # specifically built using gccXX.
1011 _startup_libs47= gnu/usr.bin/cc47/cc_prep \
1012 gnu/usr.bin/cc47/cc_tools \
1014 gnu/lib/gcc47/libgcc \
1015 gnu/lib/gcc47/libgcc_eh \
1016 gnu/lib/gcc47/libgcc_pic
1017 _startup_libs50= gnu/usr.bin/cc50/cc_prep \
1018 gnu/usr.bin/cc50/cc_tools \
1020 gnu/lib/gcc50/libgcc \
1021 gnu/lib/gcc50/libgcc_eh \
1022 gnu/lib/gcc50/libgcc_pic
1023 _startup_libs= lib/csu lib/libc lib/libc_rtld
1025 _prebuild_libs= lib/libbz2 lib/liblzma lib/libz
1026 _prebuild_libs+= lib/libutil
1028 _generic_libs= gnu/lib
1030 _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libmd \
1031 lib/libncurses/libncurses lib/libopie
1033 lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L
1037 .if !defined(NO_CRYPT)
1038 .if !defined(NO_OPENSSL)
1039 _prebuild_libs+= secure/lib/libcrypto secure/lib/libssl
1040 .if !defined(NO_OPENSSH)
1041 _prebuild_libs+= secure/lib/libssh
1042 secure/lib/libssh__L: secure/lib/libcrypto__L lib/libz__L
1045 _generic_libs+= secure/lib
1048 _prebuild_libs+= lib/libradius lib/libsbuf lib/libtacplus lib/libm \
1049 lib/libpam lib/libypclnt lib/lib${THREAD_LIB} \
1050 lib/libpthread lib/libprop lib/libdevattr
1052 _generic_libs+= usr.bin/flex/lib
1054 .for _lib in ${_startup_libs47} ${_startup_libs50} \
1055 ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
1057 .if exists(${.CURDIR}/${_lib})
1058 ${ECHODIR} "===> ${_lib}"; \
1059 cd ${.CURDIR}/${_lib}; \
1060 make DIRPRFX=${_lib}/ depend; \
1061 make DIRPRFX=${_lib}/ all; \
1062 make DIRPRFX=${_lib}/ install
1066 _startup_libs: ${_startup_libs:S/$/__L/}
1067 _startup_libs47: ${_startup_libs47:S/$/__L/}
1068 _startup_libs50: ${_startup_libs50:S/$/__L/}
1069 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
1070 _generic_libs: ${_generic_libs:S/$/__L/}
1072 # library targets must be ordered because there are inter-library
1073 # races (e.g. generation of tconfig.h)
1075 .ORDER: ${_startup_libs47:S/$/__L/}
1076 .ORDER: ${_startup_libs50:S/$/__L/}
1077 .ORDER: ${_startup_libs:S/$/__L/}
1078 .ORDER: ${_prebuild_libs:S/$/__L/}
1079 .ORDER: ${_generic_libs:S/$/__L/}
1081 .for __target in clean cleandepend cleandir obj depend includes
1082 .for entry in ${SUBDIR}
1083 ${entry}.${__target}__D: .PHONY
1084 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
1085 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \
1086 edir=${entry}.${MACHINE_ARCH}; \
1087 cd ${.CURDIR}/$${edir}; \
1089 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \
1091 cd ${.CURDIR}/$${edir}; \
1093 make ${__target} DIRPRFX=${DIRPRFX}$${edir}/
1095 par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
1096 .ORDER: ${SUBDIR:S/$/.${__target}__D/}
1098 .ORDER: par-clean par-cleandepend par-cleandir par-obj par-depend par-includes
1100 # The wmake target is used by /usr/bin/wmake to run make in a
1101 # world build environment.
1104 @echo '${WMAKEENV} make ${WMAKE_ARGS} -DSYSBUILD'
1107 @echo '${WMAKEENV} /bin/sh'
1110 @echo '${BMAKEENV} make ${BMAKE_ARGS} -DSYSBUILD'
1113 @echo '${BMAKEENV} /bin/sh'
1116 @echo '${TMAKEENV} make ${TMAKE_ARGS} -DSYSBUILD'
1119 @echo '${TMAKEENV} /bin/sh'
1122 @echo '${XMAKEENV} make ${XMAKE_ARGS} -DSYSBUILD'
1125 @echo '${XMAKEENV} /bin/sh'
1127 backupworld: backup-clean
1128 @mkdir -p ${WORLD_BACKUP}
1129 .if (exists(${DESTDIR}/sbin) && exists(${DESTDIR}/bin) && \
1130 exists(${DESTDIR}/usr/sbin) && exists(${DESTDIR}/usr/bin) && \
1131 exists(${DESTDIR}/usr/lib) && exists(${DESTDIR}/usr/libexec))
1132 tar -czf ${WORLD_BACKUP}/binaries.tar.gz -C ${DESTDIR}/ \
1133 --options gzip:compression-level=1 \
1134 sbin bin usr/sbin usr/bin usr/lib usr/libexec
1138 .if !defined(NO_BACKUP)
1139 rm -f ${AUTO_BACKUP}/binaries.tar.gz
1140 @mkdir -p ${AUTO_BACKUP}
1141 .if (exists(${DESTDIR}/sbin) && exists(${DESTDIR}/bin) && \
1142 exists(${DESTDIR}/usr/sbin) && exists(${DESTDIR}/usr/bin) && \
1143 exists(${DESTDIR}/usr/lib) && exists(${DESTDIR}/usr/libexec))
1144 /usr/bin/tar -czf ${AUTO_BACKUP}/binaries.tar.gz -C ${DESTDIR}/ \
1145 --options gzip:compression-level=1 \
1146 sbin bin usr/sbin usr/bin usr/lib usr/libexec
1151 rm -f ${AUTO_BACKUP}/binaries.tar.gz
1154 rm -f ${WORLD_BACKUP}/binaries.tar.gz
1157 .if !exists(${WORLD_BACKUP}/binaries.tar.gz)
1158 @echo "There does not seem to be a valid archive present."
1160 @echo "Restoring system binaries from manual backup archive..."
1161 @chflags -R noschg ${DESTDIR}/sbin ${DESTDIR}/bin \
1162 ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin \
1163 ${DESTDIR}/usr/lib ${DESTDIR}/usr/libexec
1164 tar -xzf ${WORLD_BACKUP}/binaries.tar.gz -C ${DESTDIR}/
1168 .if !exists(${AUTO_BACKUP}/binaries.tar.gz)
1169 @echo "There does not seem to be a valid archive present."
1171 @echo "Restoring system binaries from auto-backup archive..."
1172 @chflags -R noschg ${DESTDIR}/sbin ${DESTDIR}/bin \
1173 ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin \
1174 ${DESTDIR}/usr/lib ${DESTDIR}/usr/libexec
1175 tar -xzf ${AUTO_BACKUP}/binaries.tar.gz -C ${DESTDIR}/
1178 # Take advantage of bmake error response
1180 MAKE_PRINT_VAR_ON_ERROR= \
1191 .include <bsd.subdir.mk>