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.29 2011/03/13 17:16:38 laffer1 Exp $ |
3 |
> |
# $MidnightBSD: src/Makefile.inc1,v 1.30 2011/08/13 21:20:12 laffer1 Exp $ |
4 |
|
# |
5 |
|
# Make command line options: |
6 |
|
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir |
25 |
|
# /usr/share/mk. These include: |
26 |
|
# obj depend all install clean cleandepend cleanobj |
27 |
|
|
28 |
+ |
# You are supposed to define both of these when calling Makefile.inc1 |
29 |
+ |
# directly. However, some old scripts don't. Cope for the moment, but |
30 |
+ |
# issue a new warning for a transition period. |
31 |
+ |
.if defined(TARGET) && !defined(TARGET_ARCH) |
32 |
+ |
.warning "You must pass both TARGET and TARGET_ARCH to Makefile.inc1. Setting TARGET_ARCH=${TARGET}." |
33 |
+ |
TARGET_ARCH=${TARGET} |
34 |
+ |
.endif |
35 |
+ |
.if !defined(TARGET) || !defined(TARGET_ARCH) |
36 |
+ |
.error "Both TARGET and TARGET_ARCH must be defined." |
37 |
+ |
.endif |
38 |
+ |
|
39 |
|
.include <bsd.own.mk> |
40 |
|
|
41 |
|
# We must do share/info early so that installation of info `dir' |
119 |
|
|
120 |
|
# Guess machine architecture from machine type, and vice versa. |
121 |
|
.if !defined(TARGET_ARCH) && defined(TARGET) |
122 |
< |
TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} |
122 |
> |
TARGET_ARCH= ${TARGET} |
123 |
|
.elif !defined(TARGET) && defined(TARGET_ARCH) && \ |
124 |
|
${TARGET_ARCH} != ${MACHINE_ARCH} |
125 |
|
TARGET= ${TARGET_ARCH} |
128 |
|
TARGET?= ${MACHINE} |
129 |
|
TARGET_ARCH?= ${MACHINE_ARCH} |
130 |
|
|
131 |
< |
KNOWN_ARCHES?= amd64 i386 sparc64 sparc64/sun4v |
131 |
> |
KNOWN_ARCHES?= amd64 i386 sparc64 |
132 |
|
.if ${TARGET} == ${TARGET_ARCH} |
133 |
|
_t= ${TARGET} |
134 |
|
.else |
174 |
|
STRICTTMPPATH= ${BPATH}:${XPATH} |
175 |
|
TMPPATH= ${STRICTTMPPATH}:${PATH} |
176 |
|
|
177 |
+ |
# |
178 |
+ |
# Avoid running mktemp(1) unless actually needed. |
179 |
+ |
# It may not be functional, e.g., due to new ABI |
180 |
+ |
# when in the middle of installing over this system. |
181 |
+ |
# |
182 |
+ |
.if make(distributeworld) || make(installworld) |
183 |
|
INSTALLTMP!= /usr/bin/mktemp -d -u -t install |
184 |
+ |
.endif |
185 |
|
|
186 |
|
# |
187 |
|
# Building a world goes through the following stages |
287 |
|
.endif |
288 |
|
|
289 |
|
# install stage |
290 |
+ |
IMAKEENV= ${CROSSENV} |
291 |
+ |
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 |
292 |
|
.if empty(.MAKEFLAGS:M-n) |
293 |
< |
IMAKEENV= ${CROSSENV} \ |
294 |
< |
PATH=${STRICTTMPPATH}:${INSTALLTMP} |
293 |
> |
IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ |
294 |
> |
LD_LIBRARY_PATH=${INSTALLTMP} \ |
295 |
> |
PATH_LOCALE=${INSTALLTMP}/locale |
296 |
> |
IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh |
297 |
|
.else |
298 |
< |
IMAKEENV= ${CROSSENV} \ |
277 |
< |
PATH=${TMPPATH}:${INSTALLTMP} |
298 |
> |
IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} |
299 |
|
.endif |
279 |
– |
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 |
300 |
|
|
301 |
|
# kernel stage |
302 |
|
KMAKEENV= ${WMAKEENV} |
330 |
|
rm -rf ${WORLDTMP}/legacy/usr/include |
331 |
|
# XXX - These two can depend on any header file. |
332 |
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c |
333 |
+ |
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c |
334 |
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c |
335 |
|
.endif |
336 |
|
.for _dir in \ |
337 |
< |
usr/bin usr/games usr/include/sys usr/lib \ |
317 |
< |
usr/libexec usr/sbin usr/share/dict \ |
318 |
< |
usr/share/groff_font/devX100 \ |
319 |
< |
usr/share/groff_font/devX100-12 \ |
320 |
< |
usr/share/groff_font/devX75 \ |
321 |
< |
usr/share/groff_font/devX75-12 \ |
322 |
< |
usr/share/groff_font/devascii \ |
323 |
< |
usr/share/groff_font/devcp1047 \ |
324 |
< |
usr/share/groff_font/devdvi \ |
325 |
< |
usr/share/groff_font/devhtml \ |
326 |
< |
usr/share/groff_font/devkoi8-r \ |
327 |
< |
usr/share/groff_font/devlatin1 \ |
328 |
< |
usr/share/groff_font/devlbp \ |
329 |
< |
usr/share/groff_font/devlj4 \ |
330 |
< |
usr/share/groff_font/devps \ |
331 |
< |
usr/share/groff_font/devutf8 \ |
332 |
< |
usr/share/tmac/mdoc usr/share/tmac/mm |
333 |
< |
mkdir -p ${WORLDTMP}/legacy/${_dir} |
334 |
< |
.endfor |
335 |
< |
.for _dir in \ |
336 |
< |
lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \ |
337 |
< |
usr/libdata/pkgconfig usr/libexec usr/sbin usr/share/misc |
337 |
> |
lib usr legacy/usr |
338 |
|
mkdir -p ${WORLDTMP}/${_dir} |
339 |
|
.endfor |
340 |
+ |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
341 |
+ |
-p ${WORLDTMP}/legacy/usr >/dev/null |
342 |
+ |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
343 |
+ |
-p ${WORLDTMP}/usr >/dev/null |
344 |
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
345 |
|
-p ${WORLDTMP}/usr/include >/dev/null |
346 |
|
ln -sf ${.CURDIR}/sys ${WORLDTMP} |
421 |
|
@echo "--------------------------------------------------------------" |
422 |
|
@echo ">>> stage 5.1: building 32 bit shim libraries" |
423 |
|
@echo "--------------------------------------------------------------" |
424 |
< |
.for _dir in \ |
425 |
< |
usr/include usr/lib32 usr/share/misc |
426 |
< |
mkdir -p ${LIB32TMP}/${_dir} |
423 |
< |
.endfor |
424 |
> |
mkdir -p ${LIB32TMP}/usr/include |
425 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
426 |
> |
-p ${LIB32TMP}/usr >/dev/null |
427 |
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
428 |
|
-p ${LIB32TMP}/usr/include >/dev/null |
429 |
|
mkdir -p ${WORLDTMP} |
441 |
|
cd ${.CURDIR}/apache/lib; ${LIB32WMAKE} ${_t} |
442 |
|
.endif |
443 |
|
.if ${MK_CDDL} != "no" |
444 |
< |
cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t} |
444 |
> |
cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} |
445 |
|
.endif |
446 |
< |
cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t} |
446 |
> |
cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} |
447 |
|
.if ${MK_CRYPT} != "no" |
448 |
< |
cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t} |
448 |
> |
cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} |
449 |
|
.endif |
450 |
|
.if ${MK_KERBEROS} != "no" |
451 |
< |
cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t} |
451 |
> |
cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} |
452 |
|
.endif |
453 |
|
.endfor |
454 |
|
.for _dir in usr.bin/lex/lib |
455 |
< |
cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj |
455 |
> |
cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj |
456 |
|
.endfor |
457 |
|
.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic |
458 |
|
cd ${.CURDIR}/${_dir}; \ |
459 |
< |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools |
459 |
> |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ |
460 |
> |
DIRPRFX=${_dir}/ build-tools |
461 |
|
.endfor |
462 |
|
cd ${.CURDIR}; \ |
463 |
|
${LIB32WMAKE} -f Makefile.inc1 libraries |
464 |
|
.for _t in obj depend all |
465 |
< |
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t} |
466 |
< |
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t} |
465 |
> |
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ |
466 |
> |
DIRPRFX=libexec/rtld-elf/ ${_t} |
467 |
> |
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ |
468 |
> |
DIRPRFX=usr.bin/ldd ${_t} |
469 |
|
.endfor |
470 |
|
|
471 |
|
distribute32 install32: |
475 |
|
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree |
476 |
|
.endif |
477 |
|
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
478 |
+ |
.if ${MK_CDDL} != "no" |
479 |
+ |
cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
480 |
+ |
.endif |
481 |
|
cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
482 |
|
.if ${MK_CRYPT} != "no" |
483 |
|
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
485 |
|
.if ${MK_KERBEROS} != "no" |
486 |
|
cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
487 |
|
.endif |
488 |
< |
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} |
488 |
> |
cd ${.CURDIR}/libexec/rtld-elf; \ |
489 |
> |
PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} |
490 |
|
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} |
491 |
|
.endif |
492 |
|
|
483 |
– |
|
493 |
|
WMAKE_TGTS= |
494 |
|
.if !defined(SUBDIR_OVERRIDE) |
495 |
|
WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools |
584 |
|
.endfor |
585 |
|
|
586 |
|
# |
587 |
+ |
# Required install tools to be saved in a scratch dir for safety. |
588 |
+ |
# |
589 |
+ |
.if ${MK_INFO} != "no" |
590 |
+ |
_install-info= install-info |
591 |
+ |
.endif |
592 |
+ |
.if ${MK_ZONEINFO} != "no" |
593 |
+ |
_zoneinfo= zic tzsetup |
594 |
+ |
.endif |
595 |
+ |
|
596 |
+ |
ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ |
597 |
+ |
date echo egrep find grep ${_install-info} \ |
598 |
+ |
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ |
599 |
+ |
test true uname wc ${_zoneinfo} |
600 |
+ |
|
601 |
+ |
# |
602 |
|
# distributeworld |
603 |
|
# |
604 |
|
# Distributes everything compiled by a `buildworld'. |
607 |
|
# |
608 |
|
# Installs everything compiled by a 'buildworld'. |
609 |
|
# |
610 |
+ |
|
611 |
+ |
# Non-base distributions produced by the base system |
612 |
+ |
EXTRA_DISTRIBUTIONS= games |
613 |
+ |
.if defined(LIB32TMP) && ${MK_LIB32} != "no" |
614 |
+ |
EXTRA_DISTRIBUTIONS+= lib32 |
615 |
+ |
.endif |
616 |
+ |
|
617 |
|
distributeworld installworld: installcheck |
618 |
|
mkdir -p ${INSTALLTMP} |
619 |
< |
for prog in [ awk cap_mkdb cat chflags chmod chown \ |
620 |
< |
date echo egrep find grep install-info \ |
621 |
< |
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ |
622 |
< |
test true uname wc zic; do \ |
623 |
< |
cp `which $$prog` ${INSTALLTMP}; \ |
624 |
< |
done |
625 |
< |
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} |
626 |
< |
rm -rf ${INSTALLTMP} |
619 |
> |
progs=$$(for prog in ${ITOOLS}; do \ |
620 |
> |
if progpath=`which $$prog`; then \ |
621 |
> |
echo $$progpath; \ |
622 |
> |
else \ |
623 |
> |
echo "Required tool $$prog not found in PATH." >&2; \ |
624 |
> |
exit 1; \ |
625 |
> |
fi; \ |
626 |
> |
done); \ |
627 |
> |
libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ |
628 |
> |
while read line; do \ |
629 |
> |
set -- $$line; \ |
630 |
> |
if [ "$$2 $$3" != "not found" ]; then \ |
631 |
> |
echo $$2; \ |
632 |
> |
else \ |
633 |
> |
echo "Required library $$1 not found." >&2; \ |
634 |
> |
exit 1; \ |
635 |
> |
fi; \ |
636 |
> |
done); \ |
637 |
> |
cp $$libs $$progs ${INSTALLTMP} |
638 |
> |
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale |
639 |
> |
.if make(distributeworld) |
640 |
> |
.for dist in ${EXTRA_DISTRIBUTIONS} |
641 |
> |
-mkdir ${DESTDIR}/${DISTDIR}/${dist} |
642 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ |
643 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null |
644 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ |
645 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null |
646 |
> |
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ |
647 |
> |
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null |
648 |
> |
.endfor |
649 |
> |
-mkdir ${DESTDIR}/${DISTDIR}/base |
650 |
> |
${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \ |
651 |
> |
DESTDIR=${DESTDIR}/${DISTDIR}/base |
652 |
> |
.endif |
653 |
> |
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ |
654 |
> |
${IMAKEENV} rm -rf ${INSTALLTMP} |
655 |
> |
.if make(distributeworld) |
656 |
> |
.for dist in ${EXTRA_DISTRIBUTIONS} |
657 |
> |
find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete |
658 |
> |
.endfor |
659 |
> |
.endif |
660 |
|
|
661 |
+ |
packageworld: |
662 |
+ |
.for dist in base ${EXTRA_DISTRIBUTIONS} |
663 |
+ |
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ |
664 |
+ |
tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz . |
665 |
+ |
.endfor |
666 |
+ |
|
667 |
|
# |
668 |
|
# reinstall |
669 |
|
# |
690 |
|
@echo ">>> Distributing everything" |
691 |
|
@echo "--------------------------------------------------------------" |
692 |
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute |
693 |
< |
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" |
694 |
< |
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32 |
693 |
> |
.if defined(LIB32TMP) && ${MK_LIB32} != "no" |
694 |
> |
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ |
695 |
> |
DISTRIBUTION=lib32 |
696 |
|
.endif |
697 |
|
|
698 |
|
distrib-dirs distribution: |
712 |
|
# be set to cross-build, we have to make sure TARGET is set |
713 |
|
# properly. |
714 |
|
|
715 |
+ |
.if defined(KERNFAST) |
716 |
+ |
NO_KERNELCLEAN= t |
717 |
+ |
NO_KERNELCONFIG= t |
718 |
+ |
NO_KERNELDEPEND= t |
719 |
+ |
NO_KERNELOBJ= t |
720 |
+ |
# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah |
721 |
+ |
.if !defined(KERNCONF) && ${KERNFAST} != "1" |
722 |
+ |
KERNCONF=${KERNFAST} |
723 |
+ |
.endif |
724 |
+ |
.endif |
725 |
|
.if !defined(KERNCONF) && defined(KERNEL) |
726 |
|
KERNCONF= ${KERNEL} |
727 |
|
KERNWARN= |
786 |
|
@echo "--------------------------------------------------------------" |
787 |
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} |
788 |
|
.endif |
789 |
+ |
.if !defined(NO_KERNELOBJ) |
790 |
|
@echo |
791 |
|
@echo "--------------------------------------------------------------" |
792 |
|
@echo ">>> stage 2.2: rebuilding the object tree" |
793 |
|
@echo "--------------------------------------------------------------" |
794 |
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj |
795 |
+ |
.endif |
796 |
|
@echo |
797 |
|
@echo "--------------------------------------------------------------" |
798 |
|
@echo ">>> stage 2.3: build tools" |
799 |
|
@echo "--------------------------------------------------------------" |
800 |
|
cd ${KRNLOBJDIR}/${_kernel}; \ |
801 |
|
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ |
802 |
< |
${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile |
802 |
> |
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ |
803 |
> |
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile |
804 |
|
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. |
805 |
|
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) |
806 |
|
.for target in obj depend all |
807 |
|
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ |
808 |
|
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ |
809 |
< |
${MAKE} -DNO_CPU_CFLAGS ${target} |
809 |
> |
${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} |
810 |
|
.endfor |
811 |
|
.endif |
812 |
|
.if !defined(NO_KERNELDEPEND) |
838 |
|
false |
839 |
|
.endif |
840 |
|
@echo "--------------------------------------------------------------" |
841 |
< |
@echo ">>> Installing kernel" |
841 |
> |
@echo ">>> Installing kernel ${INSTALLKERNEL}" |
842 |
|
@echo "--------------------------------------------------------------" |
843 |
|
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ |
844 |
|
${CROSSENV} PATH=${TMPPATH} \ |
845 |
|
${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} |
846 |
|
|
847 |
+ |
distributekernel distributekernel.debug: |
848 |
+ |
.if empty(INSTALLKERNEL) |
849 |
+ |
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ |
850 |
+ |
false |
851 |
+ |
.endif |
852 |
+ |
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ |
853 |
+ |
${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ |
854 |
+ |
DESTDIR=${DESTDIR}/${DISTDIR}/kernel \ |
855 |
+ |
${.TARGET:S/distributekernel/install/} |
856 |
+ |
|
857 |
+ |
packagekernel: |
858 |
+ |
${_+_}cd ${DESTDIR}/${DISTDIR}/kernel; \ |
859 |
+ |
tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz . |
860 |
+ |
|
861 |
|
# |
862 |
|
# doxygen |
863 |
|
# |
1075 |
|
# |
1076 |
|
# static libgcc.a prerequisite for shared libc |
1077 |
|
# |
1078 |
< |
_prereq_libs= gnu/lib/libgcc |
1078 |
> |
_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc |
1079 |
|
|
1080 |
|
# These dependencies are not automatically generated: |
1081 |
|
# |
1095 |
|
|
1096 |
|
_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \ |
1097 |
|
${_kerberos5_lib_libroken} \ |
1098 |
< |
lib/libbz2 lib/libcom_err lib/libcrypt lib/libexpat \ |
1098 |
> |
lib/libbz2 lib/libcom_err lib/libcrypt \ |
1099 |
> |
lib/libexpat \ |
1100 |
|
${_lib_libgssapi} ${_lib_libipx} \ |
1101 |
|
lib/libkiconv lib/libkvm lib/libmd \ |
1102 |
|
lib/ncurses/ncurses lib/ncurses/ncursesw \ |
1250 |
|
@echo ">>> Removing old files (only deletes safe to delete libs)" |
1251 |
|
# Ask for every old file if the user really wants to remove it. |
1252 |
|
# It's annoying, but better safe than sorry. |
1253 |
< |
@for file in ${OLD_FILES}; do \ |
1253 |
> |
# NB: We cannot pass the list of OLD_FILES as a parameter because the |
1254 |
> |
# argument list will get too long. Using .for/.endfor make "loops" will make |
1255 |
> |
# the Makefile parser segfault. |
1256 |
> |
@exec 3<&0; \ |
1257 |
> |
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1258 |
> |
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ |
1259 |
> |
while read file; do \ |
1260 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1261 |
|
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ |
1262 |
< |
rm ${RM_I} "${DESTDIR}/$${file}"; \ |
1262 |
> |
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ |
1263 |
|
fi; \ |
1264 |
|
done |
1265 |
|
# Remove catpages without corresponding manpages. |
1266 |
< |
@3<&0; \ |
1266 |
> |
@exec 3<&0; \ |
1267 |
|
find ${DESTDIR}/usr/share/man/cat* ! -type d | \ |
1268 |
|
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ |
1269 |
|
while read catpage; do \ |
1270 |
|
read manpage; \ |
1271 |
|
if [ ! -e "$${manpage}" ]; then \ |
1272 |
< |
rm ${RM_I} $${catpage} <&3 ; \ |
1272 |
> |
rm ${RM_I} $${catpage} <&3; \ |
1273 |
|
fi; \ |
1274 |
|
done |
1275 |
|
@echo ">>> Old files removed" |
1276 |
|
|
1277 |
|
check-old-files: |
1278 |
|
@echo ">>> Checking for old files" |
1279 |
< |
@for file in ${OLD_FILES}; do \ |
1279 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1280 |
> |
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ |
1281 |
> |
while read file; do \ |
1282 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1283 |
|
echo "${DESTDIR}/$${file}"; \ |
1284 |
|
fi; \ |
1289 |
|
while read catpage; do \ |
1290 |
|
read manpage; \ |
1291 |
|
if [ ! -e "$${manpage}" ]; then \ |
1292 |
< |
echo $${catpage} ; \ |
1292 |
> |
echo $${catpage}; \ |
1293 |
|
fi; \ |
1294 |
|
done |
1295 |
|
|
1296 |
|
delete-old-libs: |
1297 |
|
@echo ">>> Removing old libraries" |
1298 |
|
@echo "${OLD_LIBS_MESSAGE}" | fmt |
1299 |
< |
@for file in ${OLD_LIBS}; do \ |
1299 |
> |
@exec 3<&0; \ |
1300 |
> |
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1301 |
> |
-V OLD_LIBS | xargs -n1 | \ |
1302 |
> |
while read file; do \ |
1303 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1304 |
|
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ |
1305 |
< |
rm ${RM_I} "${DESTDIR}/$${file}"; \ |
1305 |
> |
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \ |
1306 |
|
fi; \ |
1307 |
|
done |
1308 |
|
@echo ">>> Old libraries removed" |
1309 |
|
|
1310 |
|
check-old-libs: |
1311 |
|
@echo ">>> Checking for old libraries" |
1312 |
< |
@for file in ${OLD_LIBS}; do \ |
1312 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1313 |
> |
-V OLD_LIBS | xargs -n1 | \ |
1314 |
> |
while read file; do \ |
1315 |
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ |
1316 |
|
echo "${DESTDIR}/$${file}"; \ |
1317 |
|
fi; \ |
1319 |
|
|
1320 |
|
delete-old-dirs: |
1321 |
|
@echo ">>> Removing old directories" |
1322 |
< |
@for dir in ${OLD_DIRS}; do \ |
1322 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1323 |
> |
-V OLD_DIRS | xargs -n1 | \ |
1324 |
> |
while read dir; do \ |
1325 |
|
if [ -d "${DESTDIR}/$${dir}" ]; then \ |
1326 |
|
rmdir -v "${DESTDIR}/$${dir}" || true; \ |
1327 |
|
elif [ -L "${DESTDIR}/$${dir}" ]; then \ |
1332 |
|
|
1333 |
|
check-old-dirs: |
1334 |
|
@echo ">>> Checking for old directories" |
1335 |
< |
@for dir in ${OLD_DIRS}; do \ |
1335 |
> |
@${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ |
1336 |
> |
-V OLD_DIRS | xargs -n1 | \ |
1337 |
> |
while read dir; do \ |
1338 |
|
if [ -d "${DESTDIR}/$${dir}" ]; then \ |
1339 |
|
echo "${DESTDIR}/$${dir}"; \ |
1340 |
|
elif [ -L "${DESTDIR}/$${dir}" ]; then \ |