=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/Makefile,v retrieving revision 1.37 retrieving revision 1.45 diff -u -r1.37 -r1.45 --- src/Makefile 1998/05/18 17:40:00 1.37 +++ src/Makefile 1999/01/24 16:08:37 1.45 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.37 1998/05/18 17:40:00 mickey Exp $ +# $OpenBSD: Makefile,v 1.45 1999/01/24 16:08:37 art Exp $ # # For more information on building in tricky environments, please see @@ -17,8 +17,19 @@ # well as populate the /usr/obj properly with directories for the # objects. # -# 3) If you are reasonably sure that things will compile OK, use the +# 3) It is strongly recommended that you build and install a new kernel +# before rebuilding your system. Some of the new programs may use new +# functionality or depend on API changes that your old kernel doesn't have. +# +# 4) If you are reasonably sure that things will compile OK, use the # "make build" target supplied here. Good luck. +# +# 5) If you want to setup a cross-build environment, there is a "cross-tools" +# target available which upon completion of "make TARGET= cross-tools" +# (where is one of the names in the /sys/arch directory) will produce +# a set of compilation tools along with the includes in the /usr/cross/ +# directory. +# .include # for NOMAN, if it's there. @@ -50,7 +61,7 @@ beforeinstall: .ifndef DESTDIR - (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) + (cd ${.CURDIR}/etc && ${MAKE} DESTDIR= distrib-dirs) .else (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) .endif @@ -65,21 +76,23 @@ .ifdef GLOBAL_AUTOCONF_CACHE rm -f ${GLOBAL_AUTOCONF_CACHE} .endif - (cd ${.CURDIR}/share/mk && ${MAKE} install) - (cd ${.CURDIR}/include; ${MAKE} includes) - ${MAKE} cleandir - (cd ${.CURDIR}/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install) - (cd ${.CURDIR}/gnu/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install) + (cd ${.CURDIR}/share/mk && ${SUDO} ${MAKE} install) + (cd ${.CURDIR}/include; ${SUDO} ${MAKE} includes) + ${SUDO} ${MAKE} cleandir + (cd ${.CURDIR}/lib && ${MAKE} depend && ${MAKE} && \ + ${SUDO} ${MAKE} install) + (cd ${.CURDIR}/gnu/lib && ${MAKE} depend && ${MAKE} && \ + ${SUDO} ${MAKE} install) .if (${MACHINE_ARCH} == "mips") ldconfig .endif .if (${KERBEROS} == "yes") - (cd ${.CURDIR}/kerberosIV && ${MAKE} build) + (cd ${.CURDIR}/kerberosIV && ${MAKE} SUDO=${SUDO} build) .endif .if (${MACHINE_ARCH} == "mips") ldconfig .endif - ${MAKE} depend && ${MAKE} && ${MAKE} install + ${MAKE} depend && ${MAKE} && ${SUDO} ${MAKE} install .if !defined(TARGET) cross-tools: @@ -131,7 +144,7 @@ /bin/sh ${BSDSRCDIR}/gnu/usr.bin/binutils/configure \ --prefix ${CROSSDIR}/usr \ --target `cat ${CROSSDIR}/TARGET_CANON` && \ - ${MAKE} && ${MAKE} install) + ${MAKE} CFLAGS=${CFLAGS} && ${MAKE} DESTDIR=${CROSSDIR} install) ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 \ ${.CURDIR}/usr.bin/lorder/lorder.sh.gnm \ ${CROSSDIR}/usr/bin/`cat ${CROSSDIR}/TARGET_CANON`-lorder @@ -303,12 +316,13 @@ (cd $$lib; \ ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ ${MAKE} NOMAN=; \ - DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ - ${MAKE} NOMAN= install); \ + ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ + DESTDIR=${CROSSDIR} ${MAKE} NOMAN= install); \ done; \ ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} NOMAN=; \ - MAKEOBJDIR=obj.${MACHINE}.${TARGET} DESTDIR=${CROSSDIR} \ - SKIPDIR=libocurses/PSD.doc ${MAKE} NOMAN= install) + ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ + DESTDIR=${CROSSDIR} SKIPDIR=libocurses/PSD.doc \ + ${MAKE} NOMAN= install) ln -sf ${CROSSDIR}/usr/lib \ ${CROSSDIR}/usr/`cat ${CROSSDIR}/TARGET_CANON`/lib