1 |
|
# |
2 |
|
# $FreeBSD: src/Makefile.inc1,v 1.499.2.7 2006/01/07 19:40:08 netchild Exp $ |
3 |
< |
# $MidnightBSD: src/Makefile.inc1,v 1.14 2009/04/05 22:48:21 laffer1 Exp $ |
3 |
> |
# $MidnightBSD: src/Makefile.inc1,v 1.34 2012/02/19 22:51:18 laffer1 Exp $ |
4 |
|
# |
5 |
|
# Make command line options: |
6 |
|
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir |
12 |
|
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update |
13 |
|
# -DNO_DOCUPDATE do not update doc in ${MAKE} update |
14 |
|
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list |
15 |
+ |
# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools# list |
16 |
|
# TARGET="machine" to crossbuild world for a different machine type |
17 |
|
|
18 |
|
# |
26 |
|
# /usr/share/mk. These include: |
27 |
|
# obj depend all install clean cleandepend cleanobj |
28 |
|
|
29 |
+ |
# You are supposed to define both of these when calling Makefile.inc1 |
30 |
+ |
# directly. However, some old scripts don't. Cope for the moment, but |
31 |
+ |
# issue a new warning for a transition period. |
32 |
+ |
.if defined(TARGET) && !defined(TARGET_ARCH) |
33 |
+ |
.warning "You must pass both TARGET and TARGET_ARCH to Makefile.inc1. Setting TARGET_ARCH=${TARGET}." |
34 |
+ |
TARGET_ARCH=${TARGET} |
35 |
+ |
.endif |
36 |
+ |
.if !defined(TARGET) || !defined(TARGET_ARCH) |
37 |
+ |
.error "Both TARGET and TARGET_ARCH must be defined." |
38 |
+ |
.endif |
39 |
+ |
|
40 |
|
.include <bsd.own.mk> |
41 |
|
|
42 |
|
# We must do share/info early so that installation of info `dir' |
50 |
|
# |
51 |
|
SUBDIR= share/info lib libexec |
52 |
|
SUBDIR+=bin |
53 |
+ |
.if ${MK_APACHE} != "no" |
54 |
+ |
SUBDIR+=apache |
55 |
+ |
.endif |
56 |
|
.if ${MK_GAMES} != "no" |
57 |
|
SUBDIR+=games |
58 |
|
.endif |
100 |
|
CLEANDIR= cleandir |
101 |
|
.endif |
102 |
|
|
103 |
+ |
BUILDENV_SHELL?=/bin/sh |
104 |
+ |
LOCAL_TOOL_DIRS?= |
105 |
+ |
|
106 |
|
CVS?= cvs |
107 |
|
CVSFLAGS?= -r . -P -d -I! |
108 |
|
SUP?= /usr/local/bin/cvsup |
123 |
|
|
124 |
|
# Guess machine architecture from machine type, and vice versa. |
125 |
|
.if !defined(TARGET_ARCH) && defined(TARGET) |
126 |
< |
TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} |
126 |
> |
TARGET_ARCH= ${TARGET} |
127 |
|
.elif !defined(TARGET) && defined(TARGET_ARCH) && \ |
128 |
|
${TARGET_ARCH} != ${MACHINE_ARCH} |
129 |
|
TARGET= ${TARGET_ARCH} |
132 |
|
TARGET?= ${MACHINE} |
133 |
|
TARGET_ARCH?= ${MACHINE_ARCH} |
134 |
|
|
135 |
< |
KNOWN_ARCHES?= amd64 i386 sparc64 sparc64/sun4v |
135 |
> |
KNOWN_ARCHES?= amd64 i386 sparc64 |
136 |
|
.if ${TARGET} == ${TARGET_ARCH} |
137 |
|
_t= ${TARGET} |
138 |
|
.else |
166 |
|
.error To cross-build, set TARGET_ARCH. |
167 |
|
.endif |
168 |
|
.endif |
169 |
< |
.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING) |
169 |
> |
.if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING) |
170 |
|
OBJTREE= ${MAKEOBJDIRPREFIX} |
171 |
|
.else |
172 |
< |
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} |
172 |
> |
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} |
173 |
|
.endif |
174 |
|
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp |
175 |
|
# /usr/games added for fortune which depend on strfile |
178 |
|
STRICTTMPPATH= ${BPATH}:${XPATH} |
179 |
|
TMPPATH= ${STRICTTMPPATH}:${PATH} |
180 |
|
|
181 |
+ |
# |
182 |
+ |
# Avoid running mktemp(1) unless actually needed. |
183 |
+ |
# It may not be functional, e.g., due to new ABI |
184 |
+ |
# when in the middle of installing over this system. |
185 |
+ |
# |
186 |
+ |
.if make(distributeworld) || make(installworld) |
187 |
|
INSTALLTMP!= /usr/bin/mktemp -d -u -t install |
188 |
+ |
.endif |
189 |
|
|
190 |
|
# |
191 |
|
# Building a world goes through the following stages |
291 |
|
.endif |
292 |
|
|
293 |
|
# install stage |
294 |
+ |
IMAKEENV= ${CROSSENV} |
295 |
+ |
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 |
296 |
|
.if empty(.MAKEFLAGS:M-n) |
297 |
< |
IMAKEENV= ${CROSSENV} \ |
298 |
< |
PATH=${STRICTTMPPATH}:${INSTALLTMP} |
297 |
> |
IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ |
298 |
> |
LD_LIBRARY_PATH=${INSTALLTMP} \ |
299 |
> |
PATH_LOCALE=${INSTALLTMP}/locale |
300 |
> |
IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh |
301 |
|
.else |
302 |
< |
IMAKEENV= ${CROSSENV} \ |
274 |
< |
PATH=${TMPPATH}:${INSTALLTMP} |
302 |
> |
IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} |
303 |
|
.endif |
276 |
– |
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 |
304 |
|
|
305 |
|
# kernel stage |
306 |
|
KMAKEENV= ${WMAKEENV} |
334 |
|
rm -rf ${WORLDTMP}/legacy/usr/include |
335 |
|
# XXX - These two can depend on any header file. |
336 |
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c |
337 |
+ |
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c |
338 |
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c |
339 |
|
.endif |
340 |
|
.for _dir in \ |
341 |
< |
usr/bin usr/games usr/include/sys usr/lib \ |
314 |
< |
usr/libexec usr/sbin usr/share/dict \ |
315 |
< |
usr/share/groff_font/devX100 \ |
316 |
< |
usr/share/groff_font/devX100-12 \ |
317 |
< |
usr/share/groff_font/devX75 \ |
318 |
< |
usr/share/groff_font/devX75-12 \ |
319 |
< |
usr/share/groff_font/devascii \ |
320 |
< |
usr/share/groff_font/devcp1047 \ |
321 |
< |
usr/share/groff_font/devdvi \ |
322 |
< |
usr/share/groff_font/devhtml \ |
323 |
< |
usr/share/groff_font/devkoi8-r \ |
324 |
< |
usr/share/groff_font/devlatin1 \ |
325 |
< |
usr/share/groff_font/devlbp \ |
326 |
< |
usr/share/groff_font/devlj4 \ |
327 |
< |
usr/share/groff_font/devps \ |
328 |
< |
usr/share/groff_font/devutf8 \ |
329 |
< |
usr/share/tmac/mdoc usr/share/tmac/mm |
330 |
< |
mkdir -p ${WORLDTMP}/legacy/${_dir} |
331 |
< |
.endfor |
332 |
< |
.for _dir in \ |
333 |
< |
lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \ |
334 |
< |
usr/libexec usr/sbin usr/share/misc |
341 |
> |
lib usr legacy/usr |
342 |
|
mkdir -p ${WORLDTMP}/${_dir} |
343 |
|
.endfor |
344 |
+ |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
345 |
+ |
-p ${WORLDTMP}/legacy/usr >/dev/null |
346 |
+ |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
347 |
+ |
-p ${WORLDTMP}/usr >/dev/null |
348 |
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
349 |
|
-p ${WORLDTMP}/usr/include >/dev/null |
350 |
|
ln -sf ${.CURDIR}/sys ${WORLDTMP} |
425 |
|
@echo "--------------------------------------------------------------" |
426 |
|
@echo ">>> stage 5.1: building 32 bit shim libraries" |
427 |
|
@echo "--------------------------------------------------------------" |
428 |
< |
.for _dir in \ |
429 |
< |
usr/include usr/lib32 usr/share/misc |
430 |
< |
mkdir -p ${LIB32TMP}/${_dir} |
420 |
< |
.endfor |
428 |
> |
mkdir -p ${LIB32TMP}/usr/include |
429 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
430 |
> |
-p ${LIB32TMP}/usr >/dev/null |
431 |
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
432 |
|
-p ${LIB32TMP}/usr/include >/dev/null |
433 |
|
mkdir -p ${WORLDTMP} |
441 |
|
.for _t in obj includes |
442 |
|
cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t} |
443 |
|
cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t} |
444 |
+ |
.if ${MK_APACHE} != "no" |
445 |
+ |
cd ${.CURDIR}/apache/lib; ${LIB32WMAKE} ${_t} |
446 |
+ |
.endif |
447 |
|
.if ${MK_CDDL} != "no" |
448 |
< |
cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t} |
448 |
> |
cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} |
449 |
|
.endif |
450 |
< |
cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t} |
450 |
> |
cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} |
451 |
|
.if ${MK_CRYPT} != "no" |
452 |
< |
cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t} |
452 |
> |
cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} |
453 |
|
.endif |
454 |
|
.if ${MK_KERBEROS} != "no" |
455 |
< |
cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t} |
455 |
> |
cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} |
456 |
|
.endif |
457 |
|
.endfor |
458 |
|
.for _dir in usr.bin/lex/lib |
459 |
< |
cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj |
459 |
> |
cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj |
460 |
|
.endfor |
461 |
|
.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic |
462 |
|
cd ${.CURDIR}/${_dir}; \ |
463 |
< |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools |
463 |
> |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ |
464 |
> |
DIRPRFX=${_dir}/ build-tools |
465 |
|
.endfor |
466 |
|
cd ${.CURDIR}; \ |
467 |
|
${LIB32WMAKE} -f Makefile.inc1 libraries |
468 |
|
.for _t in obj depend all |
469 |
< |
cd ${.CURDIR}/libexec/rtld-elf; \ |
470 |
< |
PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t} |
469 |
> |
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ |
470 |
> |
DIRPRFX=libexec/rtld-elf/ ${_t} |
471 |
> |
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ |
472 |
> |
DIRPRFX=usr.bin/ldd ${_t} |
473 |
|
.endfor |
474 |
|
|
475 |
|
distribute32 install32: |
479 |
|
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree |
480 |
|
.endif |
481 |
|
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
482 |
+ |
.if ${MK_CDDL} != "no" |
483 |
+ |
cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
484 |
+ |
.endif |
485 |
|
cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
486 |
|
.if ${MK_CRYPT} != "no" |
487 |
|
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
488 |
|
.endif |
489 |
< |
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} |
489 |
> |
.if ${MK_KERBEROS} != "no" |
490 |
> |
cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
491 |
|
.endif |
492 |
+ |
cd ${.CURDIR}/libexec/rtld-elf; \ |
493 |
+ |
PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} |
494 |
+ |
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} |
495 |
+ |
.endif |
496 |
|
|
473 |
– |
|
497 |
|
WMAKE_TGTS= |
498 |
|
.if !defined(SUBDIR_OVERRIDE) |
499 |
|
WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools |
532 |
|
|
533 |
|
buildenv: |
534 |
|
@echo Entering world for ${TARGET_ARCH}:${TARGET} |
535 |
< |
@cd ${.CURDIR} && env ${WMAKEENV} sh || true |
535 |
> |
@cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true |
536 |
|
|
537 |
|
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} |
538 |
|
toolchain: ${TOOLCHAIN_TGTS} |
588 |
|
.endfor |
589 |
|
|
590 |
|
# |
591 |
+ |
# Required install tools to be saved in a scratch dir for safety. |
592 |
+ |
# |
593 |
+ |
.if ${MK_INFO} != "no" |
594 |
+ |
_install-info= install-info |
595 |
+ |
.endif |
596 |
+ |
.if ${MK_ZONEINFO} != "no" |
597 |
+ |
_zoneinfo= zic tzsetup |
598 |
+ |
.endif |
599 |
+ |
|
600 |
+ |
ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ |
601 |
+ |
date echo egrep find grep ${_install-info} \ |
602 |
+ |
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ |
603 |
+ |
test true uname wc ${_zoneinfo} |
604 |
+ |
|
605 |
+ |
# |
606 |
|
# distributeworld |
607 |
|
# |
608 |
|
# Distributes everything compiled by a `buildworld'. |
611 |
|
# |
612 |
|
# Installs everything compiled by a 'buildworld'. |
613 |
|
# |
614 |
+ |
|
615 |
+ |
# Non-base distributions produced by the base system |
616 |
+ |
EXTRA_DISTRIBUTIONS= doc games |
617 |
+ |
.if defined(LIB32TMP) && ${MK_LIB32} != "no" |
618 |
+ |
EXTRA_DISTRIBUTIONS+= lib32 |
619 |
+ |
.endif |
620 |
+ |
|
621 |
|
distributeworld installworld: installcheck |
622 |
|
mkdir -p ${INSTALLTMP} |
623 |
< |
for prog in [ awk cap_mkdb cat chflags chmod chown \ |
624 |
< |
date echo egrep find grep install-info \ |
625 |
< |
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ |
626 |
< |
test true uname wc zic; do \ |
627 |
< |
cp `which $$prog` ${INSTALLTMP}; \ |
628 |
< |
done |
629 |
< |
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} |
630 |
< |
rm -rf ${INSTALLTMP} |
623 |
> |
progs=$$(for prog in ${ITOOLS}; do \ |
624 |
> |
if progpath=`which $$prog`; then \ |
625 |
> |
echo $$progpath; \ |
626 |
> |
else \ |
627 |
> |
echo "Required tool $$prog not found in PATH." >&2; \ |
628 |
> |
exit 1; \ |
629 |
> |
fi; \ |
630 |
> |
done); \ |
631 |
> |
libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ |
632 |
> |
while read line; do \ |
633 |
> |
set -- $$line; \ |
634 |
> |
if [ "$$2 $$3" != "not found" ]; then \ |
635 |
> |
echo $$2; \ |
636 |
> |
else \ |
637 |
> |
echo "Required library $$1 not found." >&2; \ |
638 |
> |
exit 1; \ |
639 |
> |
fi; \ |
640 |
> |
done); \ |
641 |
> |
cp $$libs $$progs ${INSTALLTMP} |
642 |
> |
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale |
643 |
> |
.if make(distributeworld) |
644 |
> |
.for dist in ${EXTRA_DISTRIBUTIONS} |
645 |
> |
-mkdir ${DESTDIR}/${DISTDIR}/${dist} |
646 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ |
647 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null |
648 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
649 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null |
650 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
651 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null |
652 |
> |
.endfor |
653 |
> |
-mkdir ${DESTDIR}/${DISTDIR}/base |
654 |
> |
${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \ |
655 |
> |
DESTDIR=${DESTDIR}/${DISTDIR}/base |
656 |
> |
.endif |
657 |
> |
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ |
658 |
> |
${IMAKEENV} rm -rf ${INSTALLTMP} |
659 |
> |
.if make(distributeworld) |
660 |
> |
.for dist in ${EXTRA_DISTRIBUTIONS} |
661 |
> |
find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete |
662 |
> |
.endfor |
663 |
> |
.endif |
664 |
|
|
665 |
+ |
packageworld: |
666 |
+ |
.for dist in base ${EXTRA_DISTRIBUTIONS} |
667 |
+ |
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ |
668 |
+ |
tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz . |
669 |
+ |
.endfor |
670 |
+ |
|
671 |
|
# |
672 |
|
# reinstall |
673 |
|
# |
694 |
|
@echo ">>> Distributing everything" |
695 |
|
@echo "--------------------------------------------------------------" |
696 |
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute |
697 |
< |
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" |
698 |
< |
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32 |
697 |
> |
.if defined(LIB32TMP) && ${MK_LIB32} != "no" |
698 |
> |
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ |
699 |
> |
DISTRIBUTION=lib32 |
700 |
|
.endif |
701 |
|
|
702 |
|
distrib-dirs distribution: |
716 |
|
# be set to cross-build, we have to make sure TARGET is set |
717 |
|
# properly. |
718 |
|
|
719 |
+ |
.if defined(KERNFAST) |
720 |
+ |
NO_KERNELCLEAN= t |
721 |
+ |
NO_KERNELCONFIG= t |
722 |
+ |
NO_KERNELDEPEND= t |
723 |
+ |
NO_KERNELOBJ= t |
724 |
+ |
# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah |
725 |
+ |
.if !defined(KERNCONF) && ${KERNFAST} != "1" |
726 |
+ |
KERNCONF=${KERNFAST} |
727 |
+ |
.endif |
728 |
+ |
.endif |
729 |
|
.if !defined(KERNCONF) && defined(KERNEL) |
730 |
|
KERNCONF= ${KERNEL} |
731 |
|
KERNWARN= |
790 |
|
@echo "--------------------------------------------------------------" |
791 |
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} |
792 |
|
.endif |
793 |
+ |
.if !defined(NO_KERNELOBJ) |
794 |
|
@echo |
795 |
|
@echo "--------------------------------------------------------------" |
796 |
|
@echo ">>> stage 2.2: rebuilding the object tree" |
797 |
|
@echo "--------------------------------------------------------------" |
798 |
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj |
799 |
+ |
.endif |
800 |
|
@echo |
801 |
|
@echo "--------------------------------------------------------------" |
802 |
|
@echo ">>> stage 2.3: build tools" |
803 |
|
@echo "--------------------------------------------------------------" |
804 |
|
cd ${KRNLOBJDIR}/${_kernel}; \ |
805 |
+ |
PATH=${BPATH}:${PATH} \ |
806 |
|
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ |
807 |
< |
${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile |
807 |
> |
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ |
808 |
> |
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile |
809 |
|
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. |
810 |
|
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) |
811 |
|
.for target in obj depend all |
812 |
|
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ |
813 |
+ |
PATH=${BPATH}:${PATH} \ |
814 |
|
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ |
815 |
< |
${MAKE} -DNO_CPU_CFLAGS ${target} |
815 |
> |
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} |
816 |
|
.endfor |
817 |
|
.endif |
818 |
|
.if !defined(NO_KERNELDEPEND) |
844 |
|
false |
845 |
|
.endif |
846 |
|
@echo "--------------------------------------------------------------" |
847 |
< |
@echo ">>> Installing kernel" |
847 |
> |
@echo ">>> Installing kernel ${INSTALLKERNEL}" |
848 |
|
@echo "--------------------------------------------------------------" |
849 |
|
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ |
850 |
|
${CROSSENV} PATH=${TMPPATH} \ |
851 |
|
${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} |
852 |
|
|
853 |
+ |
distributekernel distributekernel.debug: |
854 |
+ |
.if empty(INSTALLKERNEL) |
855 |
+ |
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ |
856 |
+ |
false |
857 |
+ |
.endif |
858 |
+ |
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ |
859 |
+ |
${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ |
860 |
+ |
DESTDIR=${DESTDIR}/${DISTDIR}/kernel \ |
861 |
+ |
${.TARGET:S/distributekernel/install/} |
862 |
+ |
|
863 |
+ |
packagekernel: |
864 |
+ |
${_+_}cd ${DESTDIR}/${DISTDIR}/kernel; \ |
865 |
+ |
tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz . |
866 |
+ |
|
867 |
|
# |
868 |
|
# doxygen |
869 |
|
# |
971 |
|
usr.bin/xinstall \ |
972 |
|
${_gensnmptree} \ |
973 |
|
usr.sbin/config \ |
974 |
< |
${_crunchgen} \ |
974 |
> |
${_crunchgen} |
975 |
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ |
976 |
|
cd ${.CURDIR}/${_tool}; \ |
977 |
|
${MAKE} DIRPRFX=${_tool}/ obj; \ |
1004 |
|
bin/csh \ |
1005 |
|
bin/sh \ |
1006 |
|
${_rescue} \ |
1007 |
+ |
${LOCAL_TOOL_DIRS} \ |
1008 |
|
lib/ncurses/ncurses \ |
1009 |
|
lib/ncurses/ncursesw \ |
1010 |
|
${_share} \ |
1082 |
|
# |
1083 |
|
# static libgcc.a prerequisite for shared libc |
1084 |
|
# |
1085 |
< |
_prereq_libs= gnu/lib/libgcc |
1085 |
> |
_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc |
1086 |
|
|
1087 |
|
# These dependencies are not automatically generated: |
1088 |
|
# |
1102 |
|
|
1103 |
|
_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ |
1104 |
|
${_kerberos5_lib_libroken} \ |
1105 |
< |
lib/libbz2 lib/libcom_err lib/libcrypt lib/libexpat \ |
1105 |
> |
lib/libbz2 lib/libcom_err lib/libcrypt \ |
1106 |
> |
lib/libexpat \ |
1107 |
|
${_lib_libgssapi} ${_lib_libipx} \ |
1108 |
|
lib/libkiconv lib/libkvm lib/libmd \ |
1109 |
|
lib/ncurses/ncurses lib/ncurses/ncursesw \ |
1111 |
|
lib/libradius lib/libsbuf lib/libtacplus lib/libutil \ |
1112 |
|
${_lib_libypclnt} lib/libz lib/msun \ |
1113 |
|
${_secure_lib_libcrypto} ${_secure_lib_libssh} \ |
1114 |
< |
${_secure_lib_libssl} |
1114 |
> |
${_secure_lib_libssl} lib/libsqlite3 lib/liblzma \ |
1115 |
> |
lib/libarchive lib/libfetch lib/libmagic |
1116 |
|
|
1117 |
|
.if ${MK_LIBTHR} != "no" && ${MK_LIBKSE} != "no" |
1118 |
|
_default_thread_lib= lib/${DEFAULT_THREAD_LIB} |
1122 |
|
_default_thread_lib= lib/libkse |
1123 |
|
.endif |
1124 |
|
|
1125 |
< |
_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib |
1125 |
> |
_generic_libs= ${_apache_lib} ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib |
1126 |
|
|
1127 |
|
lib/libopie__L lib/libtacplus__L: lib/libmd__L |
1128 |
|
|
1129 |
+ |
.if ${MK_APACHE} != "no" |
1130 |
+ |
_apache_lib= apache/lib |
1131 |
+ |
.endif |
1132 |
+ |
|
1133 |
|
.if ${MK_CDDL} != "no" |
1134 |
|
_cddl_lib= cddl/lib |
1135 |
|
.endif |
1257 |
|
@echo ">>> Removing old files (only deletes safe to delete libs)" |
1258 |
|
# Ask for every old file if the user really wants to remove it. |
1259 |
|
# It's annoying, but better safe than sorry. |
1260 |
< |
@for file in ${OLD_FILES}; do \ |
1260 |
> |
# NB: We cannot pass the list of OLD_FILES as a parameter because the |
1261 |
> |
# argument list will get too long. Using .for/.endfor make "loops" will make |
1262 |
> |
# the Makefile parser segfault. |
1263 |
> |
@exec 3<&0; \ |
1264 |
> |
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1265 |
> |
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ |
1266 |
> |
while read file; do \ |
1267 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1268 |
|
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ |
1269 |
< |
rm ${RM_I} "${DESTDIR}/$${file}"; \ |
1269 |
> |
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ |
1270 |
|
fi; \ |
1271 |
|
done |
1272 |
|
# Remove catpages without corresponding manpages. |
1273 |
< |
@3<&0; \ |
1273 |
> |
@exec 3<&0; \ |
1274 |
|
find ${DESTDIR}/usr/share/man/cat* ! -type d | \ |
1275 |
|
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ |
1276 |
|
while read catpage; do \ |
1277 |
|
read manpage; \ |
1278 |
|
if [ ! -e "$${manpage}" ]; then \ |
1279 |
< |
rm ${RM_I} $${catpage} <&3 ; \ |
1279 |
> |
rm ${RM_I} $${catpage} <&3; \ |
1280 |
|
fi; \ |
1281 |
|
done |
1282 |
|
@echo ">>> Old files removed" |
1283 |
|
|
1284 |
|
check-old-files: |
1285 |
|
@echo ">>> Checking for old files" |
1286 |
< |
@for file in ${OLD_FILES}; do \ |
1286 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1287 |
> |
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ |
1288 |
> |
while read file; do \ |
1289 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1290 |
|
echo "${DESTDIR}/$${file}"; \ |
1291 |
|
fi; \ |
1296 |
|
while read catpage; do \ |
1297 |
|
read manpage; \ |
1298 |
|
if [ ! -e "$${manpage}" ]; then \ |
1299 |
< |
echo $${catpage} ; \ |
1299 |
> |
echo $${catpage}; \ |
1300 |
|
fi; \ |
1301 |
|
done |
1302 |
|
|
1303 |
|
delete-old-libs: |
1304 |
|
@echo ">>> Removing old libraries" |
1305 |
|
@echo "${OLD_LIBS_MESSAGE}" | fmt |
1306 |
< |
@for file in ${OLD_LIBS}; do \ |
1306 |
> |
@exec 3<&0; \ |
1307 |
> |
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1308 |
> |
-V OLD_LIBS | xargs -n1 | \ |
1309 |
> |
while read file; do \ |
1310 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1311 |
|
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ |
1312 |
< |
rm ${RM_I} "${DESTDIR}/$${file}"; \ |
1312 |
> |
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ |
1313 |
|
fi; \ |
1314 |
|
done |
1315 |
|
@echo ">>> Old libraries removed" |
1316 |
|
|
1317 |
|
check-old-libs: |
1318 |
|
@echo ">>> Checking for old libraries" |
1319 |
< |
@for file in ${OLD_LIBS}; do \ |
1319 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1320 |
> |
-V OLD_LIBS | xargs -n1 | \ |
1321 |
> |
while read file; do \ |
1322 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1323 |
|
echo "${DESTDIR}/$${file}"; \ |
1324 |
|
fi; \ |
1326 |
|
|
1327 |
|
delete-old-dirs: |
1328 |
|
@echo ">>> Removing old directories" |
1329 |
< |
@for dir in ${OLD_DIRS}; do \ |
1329 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1330 |
> |
-V OLD_DIRS | xargs -n1 | \ |
1331 |
> |
while read dir; do \ |
1332 |
|
if [ -d "${DESTDIR}/$${dir}" ]; then \ |
1333 |
|
rmdir -v "${DESTDIR}/$${dir}" || true; \ |
1334 |
|
elif [ -L "${DESTDIR}/$${dir}" ]; then \ |
1339 |
|
|
1340 |
|
check-old-dirs: |
1341 |
|
@echo ">>> Checking for old directories" |
1342 |
< |
@for dir in ${OLD_DIRS}; do \ |
1342 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1343 |
> |
-V OLD_DIRS | xargs -n1 | \ |
1344 |
> |
while read dir; do \ |
1345 |
|
if [ -d "${DESTDIR}/$${dir}" ]; then \ |
1346 |
|
echo "${DESTDIR}/$${dir}"; \ |
1347 |
|
elif [ -L "${DESTDIR}/$${dir}" ]; then \ |