Index: releng/8.4/Makefile.inc1 =================================================================== --- releng/8.4/Makefile.inc1 (revision 248849) +++ releng/8.4/Makefile.inc1 (revision 248850) @@ -1,1465 +1,1465 @@ # # $FreeBSD$ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir # -DNO_CLEAN do not clean at all # -DNO_SHARE do not go into share subdir # -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ} # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel # -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET="machine" to crossbuild world for a different machine type # # The intended user-driven targets are: # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" # doxygen - build API documentation of the kernel # update - convenient way to update your source tree (eg: cvsup/cvs) # # Standard targets (not defined here) are documented in the makefiles in # /usr/share/mk. These include: # obj depend all install clean cleandepend cleanobj .include .if ${MACHINE_ARCH} == "mips" MK_RESCUE=no # not yet .endif # We must do share/info early so that installation of info `dir' # entries works correctly. Do it first since it is less likely to # grow dependencies on include and lib than vice versa. # # We must do lib/ and libexec/ before bin/, because if installworld # installs a new /bin/sh, the 'make' command will *immediately* # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # SUBDIR= share/info lib libexec SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games .endif .if ${MK_CDDL} != "no" SUBDIR+=cddl .endif SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" SUBDIR+=kerberos5 .endif .if ${MK_RESCUE} != "no" SUBDIR+=rescue .endif SUBDIR+=sbin .if ${MK_CRYPT} != "no" SUBDIR+=secure .endif .if !defined(NO_SHARE) SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin # # We must do etc/ last for install/distribute to work. # SUBDIR+=etc # These are last, since it is nice to at least get the base system # rebuilt before you do them. .for _DIR in ${LOCAL_DIRS} .if exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} .endif .endfor .if defined(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} .endif .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} .endif .if defined(NO_CLEANDIR) CLEANDIR= clean cleandepend .else CLEANDIR= cleandir .endif CVS?= cvs -CVSFLAGS?= -r RELENG_8 -P -d -I! +CVSFLAGS?= -r RELENG_8_4 -P -d -I! SVN?= svn SVNFLAGS?= -r HEAD SUP?= /usr/bin/csup SUPFLAGS?= -g -L 2 .if defined(SUPHOST) SUPFLAGS+= -h ${SUPHOST} .endif MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) .if exists(/usr/include/osreldate.h) OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ /usr/include/osreldate.h .else OSRELDATE= 0 .endif .endif .if !defined(VERSION) VERSION!= uname -srp VERSION+= ${OSRELDATE} .endif # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} TARGET= ${TARGET_ARCH} .endif # Otherwise, default to current machine type and architecture. TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else _t= ${TARGET_ARCH}/${TARGET} .endif .for _t in ${_t} .if empty(KNOWN_ARCHES:M${_t}) .error Unknown target ${TARGET_ARCH}:${TARGET}. .endif .endfor .if ${TARGET} == ${MACHINE} TARGET_CPUTYPE?=${CPUTYPE} .else TARGET_CPUTYPE?= .endif .if !empty(TARGET_CPUTYPE) _TARGET_CPUTYPE=${TARGET_CPUTYPE} .else _TARGET_CPUTYPE=dummy .endif _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} .error CPUTYPE global should be set with ?=. .endif .if make(buildworld) BUILD_ARCH!= uname -p .if ${MACHINE_ARCH} != ${BUILD_ARCH} .error To cross-build, set TARGET_ARCH. .endif .endif .if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING) OBJTREE= ${MAKEOBJDIRPREFIX} .else OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} # # Avoid running mktemp(1) unless actually needed. # It may not be functional, e.g., due to new ABI # when in the middle of installing over this system. # .if make(distributeworld) || make(installworld) INSTALLTMP!= /usr/bin/mktemp -d -u -t install .endif # # Building a world goes through the following stages # # 1. legacy stage [BMAKE] # This stage is responsible for creating compatibility # shims that are needed by the bootstrap-tools, # build-tools and cross-tools stages. # 1. bootstrap-tools stage [BMAKE] # This stage is responsible for creating programs that # are needed for backward compatibility reasons. They # are not built as cross-tools. # 2. build-tools stage [TMAKE] # This stage is responsible for creating the object # tree and building any tools that are needed during # the build process. # 3. cross-tools stage [XMAKE] # This stage is responsible for creating any tools that # are needed for cross-builds. A cross-compiler is one # of them. # 4. world stage [WMAKE] # This stage actually builds the world. # 5. install stage (optional) [IMAKE] # This stage installs a previously built world. # BOOTSTRAPPING?= 0 # Common environment for world related stages CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} \ GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac .if ${OSRELDATE} < 700044 CROSSENV+= AR=gnu-ar RANLIB=gnu-ranlib .endif # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ VERSION="${VERSION}" \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ SSP_CFLAGS= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ -DNO_WARNS -DNO_CTF # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ -DWITHOUT_GDB # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ _LDSCRIPTROOT= \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} .if ${MK_CDDL} == "no" || defined(NO_CTF) WMAKEENV+= NO_CTF=1 .endif WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} .if ${TARGET_ARCH} == "amd64" # 32 bit world LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ -iprefix ${LIB32TMP}/usr/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 # Yes, the flags are redundant. LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ _LDSCRIPTROOT=${LIB32TMP} \ VERSION="${VERSION}" \ MACHINE=i386 \ MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ CC="${CC} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \ OBJC="${OBJC} ${LIB32FLAGS}" \ LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ AS="${AS} --32" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif # install stage IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ LD_LIBRARY_PATH=${INSTALLTMP} \ PATH_LOCALE=${INSTALLTMP}/locale IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh .else IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} .endif # kernel stage KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} # # buildworld # # Attempt to rebuild the entire system, with reasonable chance of # success, regardless of how old your existing system is. # _worldtmp: .if ${.CURDIR:C/[^,]//g} != "" # The m4 build of sendmail files doesn't like it if ',' is used # anywhere in the path of it's files. @echo @echo "*** Error: path to source tree contains a comma ','" @echo false .endif @echo @echo "--------------------------------------------------------------" @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} .if ${TARGET_ARCH} == "amd64" rm -rf ${LIB32TMP} .endif .else rm -rf ${WORLDTMP}/legacy/usr/include # XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ lib usr legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/legacy/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} .if ${MK_BIND_LIBS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null .endif _legacy: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1.1: legacy release compatibility shims" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} legacy _bootstrap-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1.2: bootstrap tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools _cleanobj: .if !defined(NO_CLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} .if ${TARGET_ARCH} == "amd64" ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} .endif .endif _obj: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj _build-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools _cross-tools: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools _includes: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.1: building includes" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes _libraries: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.2: building libraries" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_PROFILE libraries _depend: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.3: make dependencies" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend everything: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 4.4: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all .if ${TARGET_ARCH} == "amd64" build32: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 5.1: building 32 bit shim libraries" @echo "--------------------------------------------------------------" mkdir -p ${LIB32TMP}/usr/lib32 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${LIB32TMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .if ${MK_KERBEROS} != "no" .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=kerberos5/tools/ ${_t} .endfor .endif .for _t in obj includes cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} .if ${MK_CDDL} != "no" cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} .endif cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} .endif .endfor .for _dir in usr.bin/lex/lib cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ build-tools .endfor cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries .for _t in obj depend all cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ DIRPRFX=libexec/rtld-elf/ ${_t} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor distribute32 install32: .if make(distribute32) mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32/dtrace # XXX add to mtree .else mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree mkdir -p ${DESTDIR}/usr/lib32/dtrace # XXX add to mtree .endif cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CDDL} != "no" cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} .endif WMAKE_TGTS= .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools .endif WMAKE_TGTS+= _cleanobj _obj _build-tools .if !defined(SUBDIR_OVERRIDE) WMAKE_TGTS+= _cross-tools .endif WMAKE_TGTS+= _includes _libraries _depend everything .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" WMAKE_TGTS+= build32 .endif buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue buildworld_prologue: @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" buildworld_epilogue: @echo @echo "--------------------------------------------------------------" @echo ">>> World build completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" # # We need to have this as a target because the indirection between Makefile # and Makefile.inc1 causes the correct PATH to be used, rather than a # modification of the current environment's PATH. In addition, we need # to quote multiword values. # buildenvvars: @echo ${WMAKEENV:Q} buildenv: @echo Entering world for ${TARGET_ARCH}:${TARGET} @cd ${.CURDIR} && env ${WMAKEENV} sh || true TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32} toolchain: ${TOOLCHAIN_TGTS} kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} # # installcheck # # Checks to be sure system is ready for installworld/installkernel. # installcheck: # # Require DESTDIR to be set if installing for a different architecture. # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} .if !make(distributeworld) installcheck: installcheck_DESTDIR installcheck_DESTDIR: .if !defined(DESTDIR) || empty(DESTDIR) @echo "ERROR: Please set DESTDIR!"; \ false .endif .endif .endif # # Check for missing UIDs/GIDs. # CHECK_UIDS= CHECK_GIDS= audit .if ${MK_SENDMAIL} != "no" CHECK_UIDS+= smmsp CHECK_GIDS+= smmsp .endif .if ${MK_PF} != "no" CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf .endif installcheck: installcheck_UGID installcheck_UGID: .for uid in ${CHECK_UIDS} @if ! `id -u ${uid} >/dev/null 2>&1`; then \ echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ false; \ fi .endfor .for gid in ${CHECK_GIDS} @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \ echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ false; \ fi .endfor # # Required install tools to be saved in a scratch dir for safety. # .if ${MK_INFO} != "no" _install-info= install-info .endif ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep ${_install-info} \ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ test true uname wc zic # # distributeworld # # Distributes everything compiled by a `buildworld'. # # installworld # # Installs everything compiled by a 'buildworld'. # distributeworld installworld: installcheck mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ if progpath=`which $$prog`; then \ echo $$progpath; \ else \ echo "Required tool $$prog not found in PATH." >&2; \ exit 1; \ fi; \ done); \ libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ while read line; do \ set -- $$line; \ if [ "$$2 $$3" != "not found" ]; then \ echo $$2; \ else \ echo "Required library $$1 not found." >&2; \ exit 1; \ fi; \ done); \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} # # reinstall # # If you have a build server, you can NFS mount the source and obj directories # and do a 'make reinstall' on the *client* to install new binaries from the # most recent server build. # reinstall: @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy @echo @echo "--------------------------------------------------------------" @echo ">>> Installing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif redistribute: @echo "--------------------------------------------------------------" @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ DISTRIBUTION=lib32 .endif distrib-dirs distribution: cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET} # # buildkernel and installkernel # # Which kernels to build and/or install is specified by setting # KERNCONF. If not defined a GENERIC kernel is built/installed. # Only the existing (depending TARGET) config files are used # for building kernels and only the first of these is designated # as the one being installed. # # Note that we have to use TARGET instead of TARGET_ARCH when # we're in kernel-land. Since only TARGET_ARCH is (expected) to # be set to cross-build, we have to make sure TARGET is set # properly. .if defined(KERNFAST) NO_KERNELCLEAN= t NO_KERNELCONFIG= t NO_KERNELDEPEND= t NO_KERNELOBJ= t # Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah .if !defined(KERNCONF) && ${KERNFAST} != "1" KERNCONF=${KERNFAST} .endif .endif .if !defined(KERNCONF) && defined(KERNEL) KERNCONF= ${KERNEL} KERNWARN= .else KERNCONF?= GENERIC .endif INSTKERNNAME?= kernel KERNSRCDIR?= ${.CURDIR}/sys KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR} KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= INSTALLKERNEL= .for _kernel in ${KERNCONF} .if exists(${KERNCONFDIR}/${_kernel}) BUILDKERNELS+= ${_kernel} .if empty(INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif .endif .endfor # # buildkernel # # Builds all kernels defined by BUILDKERNELS. # buildkernel: .if empty(BUILDKERNELS) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false .endif .if defined(KERNWARN) @echo "--------------------------------------------------------------" @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF=" @echo "--------------------------------------------------------------" @sleep 3 .endif @echo .for _kernel in ${BUILDKERNELS} @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @echo "===> ${_kernel}" mkdir -p ${KRNLOBJDIR} .if !defined(NO_KERNELCONFIG) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 1: configuring the kernel" @echo "--------------------------------------------------------------" cd ${KRNLCONFDIR}; \ PATH=${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ ${KERNCONFDIR}/${_kernel} .endif .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} .endif .if !defined(NO_KERNELOBJ) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.1: making dependencies" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.2: building everything" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" .endfor # # installkernel, etc. # # Install the kernel defined by INSTALLKERNEL # installkernel installkernel.debug \ reinstallkernel reinstallkernel.debug: installcheck .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false .endif @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL}" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} # # doxygen # # Build the API documentation with doxygen # doxygen: @if [ ! -x `/usr/bin/which doxygen` ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all # # update # # Update the source tree, by running cvsup and/or running cvs to update to the # latest copy. # update: .if defined(SUP_UPDATE) @echo "--------------------------------------------------------------" @echo ">>> Running ${SUP}" @echo "--------------------------------------------------------------" @echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" @echo "!! Update methods with ${SUP} are deprecated." @echo "!! Please see http://www.freebsd.org/handbook/svn.html" @echo "!! and convert your update method to SVN_UPDATE or" @echo "!! freebsd-update(8)." @echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" @sleep 5 .if defined(SUPFILE) @${SUP} ${SUPFLAGS} ${SUPFILE} .endif .if defined(SUPFILE1) @${SUP} ${SUPFLAGS} ${SUPFILE1} .endif .if defined(SUPFILE2) @${SUP} ${SUPFLAGS} ${SUPFILE2} .endif .if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE) @${SUP} ${SUPFLAGS} ${PORTSSUPFILE} .endif .if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE) @${SUP} ${SUPFLAGS} ${DOCSUPFILE} .endif .endif .if defined(CVS_UPDATE) @cd ${.CURDIR} ; \ if [ -d CVS ] ; then \ echo "--------------------------------------------------------------" ; \ echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} ; \ echo "--------------------------------------------------------------" ; \ echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" ; \ echo "!! Update methods with CVS are deprecated." ; \ echo "!! Please see http://www.freebsd.org/handbook/svn.html" ; \ echo "!! and convert your update method to SVN_UPDATE or" ; \ echo "!! freebsd-update(8)." ; \ echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" ; \ sleep 5 ; \ echo ${CVS} -R -q update ${CVSFLAGS} ; \ ${CVS} -R -q update ${CVSFLAGS} ; \ fi .endif .if defined(SVN_UPDATE) @cd ${.CURDIR} ; \ if [ -d .svn ] ; then \ echo "--------------------------------------------------------------" ; \ echo ">>> Updating ${.CURDIR} using Subversion" ; \ echo "--------------------------------------------------------------" ; \ echo ${SVN} update ${SVNFLAGS} ; \ ${SVN} update ${SVNFLAGS} ; \ fi .endif # # ------------------------------------------------------------------------ # # From here onwards are utility targets used by the 'make world' and # related targets. If your 'world' breaks, you may like to try to fix # the problem and manually run the following targets to attempt to # complete the build. Beware, this is *not* guaranteed to work, you # need to have a pretty good grip on the current state of the system # to attempt to manually finish it. If in doubt, 'make world' again. # # # legacy: Build compatibility shims for the next three targets # legacy: .if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0 @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \ false .endif .for _tool in tools/build ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # # bootstrap-tools: Build tools needed for compatibility # .if ${MK_GAMES} != "no" _strfile= games/fortune/strfile .endif .if ${MK_CXX} != "no" _gperf= gnu/usr.bin/gperf .if ${BOOTSTRAPPING} < 700004 _groff= gnu/usr.bin/groff .else _groff= gnu/usr.bin/groff/tmac .endif .endif .if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022 _ar= usr.bin/ar .endif .if ${BOOTSTRAPPING} < 802000 _lex= usr.bin/lex .endif .if ${BOOTSTRAPPING} >= 1000013 _yacc= usr.bin/yacc .endif .if ${BOOTSTRAPPING} < 800013 _mklocale= usr.bin/mklocale .endif .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif .if ${MK_RESCUE} != "no" && \ ${BOOTSTRAPPING} < 700026 _crunchgen= usr.sbin/crunch/crunchgen .endif .if ${MK_CDDL} != "no" _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif bootstrap-tools: .for _tool in \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ ${_groff} \ ${_ar} \ ${_yacc} \ ${_lex} \ usr.bin/lorder \ usr.bin/makewhatis \ ${_mklocale} \ usr.bin/rpcgen \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ ${_crunchgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # # build-tools: Build special purpose build tools # .if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) _aicasm= sys/modules/aic7xxx/aicasm .endif .if !defined(NO_SHARE) _share= share/syscons/scrnmaps .endif .if ${MK_KERBEROS} != "no" _kerberos5_tools= kerberos5/tools .endif .if ${MK_RESCUE} != "no" _rescue= rescue/rescue .endif build-tools: .for _tool in \ bin/csh \ bin/sh \ ${_rescue} \ lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_share} \ ${_aicasm} \ usr.bin/awk \ lib/libmagic \ usr.sbin/sysinstall ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ build-tools .endfor .for _tool in \ gnu/usr.bin/cc/cc_tools \ ${_kerberos5_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all .endfor # # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif .endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${MK_RESCUE} != "no" || defined(RELEASEDIR) _crunchide= usr.sbin/crunch/crunchide .endif .if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR) _kgzip= usr.sbin/kgzip .endif .endif .if ${MK_BINUTILS} != "no" _binutils= gnu/usr.bin/binutils .endif .if ${MK_GCC} != "no" _cc= gnu/usr.bin/cc .endif cross-tools: .for _tool in \ ${_binutils} \ ${_cc} \ usr.bin/sed \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ ${_kgzip} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor # # hierarchy - ensure that all the needed directories are present # hierarchy: cd ${.CURDIR}/etc; ${MAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. # # The list of libraries with dependents (${_prebuild_libs}) and their # interdependencies (__L) are built automatically by the # ${.CURDIR}/tools/make_libdeps.sh script. # libraries: cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 _prereq_libs; \ ${MAKE} -f Makefile.inc1 _startup_libs; \ ${MAKE} -f Makefile.inc1 _prebuild_libs; \ ${MAKE} -f Makefile.inc1 _generic_libs; # # static libgcc.a prerequisite for shared libc # _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc # These dependencies are not automatically generated: # # gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before # all shared libraries for ELF. # _startup_libs= gnu/lib/csu .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) _startup_libs+= lib/csu/${MACHINE_ARCH}-elf .else _startup_libs+= lib/csu/${MACHINE_ARCH} .endif _startup_libs+= gnu/lib/libgcc _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr .endif _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib lib/libopie__L lib/libtacplus__L: lib/libmd__L .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair _cddl_lib= cddl/lib .endif .if ${MK_CRYPT} != "no" .if ${MK_OPENSSL} != "no" _secure_lib_libcrypto= secure/lib/libcrypto _secure_lib_libssl= secure/lib/libssl lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L .if ${MK_OPENSSH} != "no" _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS_SUPPORT} != "no" secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L .endif .endif .endif _secure_lib= secure/lib .endif .if ${MK_GSSAPI} != "no" _lib_libgssapi= lib/libgssapi .endif .if ${MK_IPX} != "no" _lib_libipx= lib/libipx .endif .if ${MK_KERBEROS} != "no" _kerberos5_lib= kerberos5/lib _kerberos5_lib_libasn1= kerberos5/lib/libasn1 _kerberos5_lib_libkrb5= kerberos5/lib/libkrb5 _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm .endif .if ${MK_NIS} != "no" _lib_libypclnt= lib/libypclnt .endif .if ${MK_OPENSSL} == "no" lib/libradius__L: lib/libmd__L .endif .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} DIRPRFX=${_lib}/ obj; \ ${MAKE} DIRPRFX=${_lib}/ depend; \ ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \ ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install .endif .endfor .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} ${_lib}__L: .PHONY .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} DIRPRFX=${_lib}/ obj; \ ${MAKE} DIRPRFX=${_lib}/ depend; \ ${MAKE} DIRPRFX=${_lib}/ all; \ ${MAKE} DIRPRFX=${_lib}/ install .endif .endfor # libpam is special: we need to build static PAM modules before # static PAM library, and dynamic PAM library before dynamic PAM # modules. lib/libpam__L: .PHONY ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ cd ${.CURDIR}/lib/libpam; \ ${MAKE} DIRPRFX=lib/libpam/ obj; \ ${MAKE} DIRPRFX=lib/libpam/ depend; \ ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \ ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install _prereq_libs: ${_prereq_libs:S/$/__PL/} _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} .for __target in all clean cleandepend cleandir depend includes obj .for entry in ${SUBDIR} ${entry}.${__target}__D: .PHONY ${_+_}@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \ edir=${entry}.${MACHINE_ARCH}; \ cd ${.CURDIR}/$${edir}; \ else \ ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \ edir=${entry}; \ cd ${.CURDIR}/$${edir}; \ fi; \ ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ .endfor par-${__target}: ${SUBDIR:S/$/.${__target}__D/} .endfor .include .if make(check-old) || make(check-old-dirs) || \ make(check-old-files) || make(check-old-libs) || \ make(delete-old) || make(delete-old-dirs) || \ make(delete-old-files) || make(delete-old-libs) # # check for / delete old files section # .include "ObsoleteFiles.inc" OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \ else you can not start such an application. Consult UPDATING for more \ information regarding how to cope with the removal/revision bump of a \ specific library." .if !defined(BATCH_DELETE_OLD_FILES) RM_I=-i .else RM_I=-v .endif delete-old-files: @echo ">>> Removing old files (only deletes safe to delete libs)" # Ask for every old file if the user really wants to remove it. # It's annoying, but better safe than sorry. @for file in ${OLD_FILES}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}"; \ fi; \ done # Remove catpages without corresponding manpages. @exec 3<&0; \ find ${DESTDIR}/usr/share/man/cat* ! -type d | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ read manpage; \ if [ ! -e "$${manpage}" ]; then \ rm ${RM_I} $${catpage} <&3 ; \ fi; \ done @echo ">>> Old files removed" check-old-files: @echo ">>> Checking for old files" @for file in ${OLD_FILES}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ done # Check for catpages without corresponding manpages. @find ${DESTDIR}/usr/share/man/cat* ! -type d | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ read manpage; \ if [ ! -e "$${manpage}" ]; then \ echo $${catpage} ; \ fi; \ done delete-old-libs: @echo ">>> Removing old libraries" @echo "${OLD_LIBS_MESSAGE}" | fmt @for file in ${OLD_LIBS}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \ rm ${RM_I} "${DESTDIR}/$${file}"; \ fi; \ done @echo ">>> Old libraries removed" check-old-libs: @echo ">>> Checking for old libraries" @for file in ${OLD_LIBS}; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ echo "${DESTDIR}/$${file}"; \ fi; \ done delete-old-dirs: @echo ">>> Removing old directories" @for dir in ${OLD_DIRS}; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ rmdir -v "${DESTDIR}/$${dir}" || true; \ elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ done @echo ">>> Old directories removed" check-old-dirs: @echo ">>> Checking for old directories" @for dir in ${OLD_DIRS}; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir}"; \ elif [ -L "${DESTDIR}/$${dir}" ]; then \ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \ fi; \ done delete-old: delete-old-files delete-old-dirs @echo "To remove old libraries run '${MAKE} delete-old-libs'." check-old: check-old-files check-old-libs check-old-dirs @echo "To remove old files and directories run '${MAKE} delete-old'." @echo "To remove old libraries run '${MAKE} delete-old-libs'." .endif # # showconfig - show build configuration. # showconfig: @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort ############### .if defined(XDEV) && defined(XDEV_ARCH) NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \ -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS XDDIR=${XDEV}-freebsd XDTP=/usr/${XDDIR} CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDTP} \ TOOLS_PREFIX=${XDTP} CD2ENV=${CDENV} \ MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp CDMAKE=${CDENV} ${MAKE} ${NOFUN} CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN} XDDESTDIR=${DESTDIR}${XDTP} .if !defined(OSREL) OSREL!= uname -r | sed -e 's/[-(].*//' .endif .ORDER: xdev-build xdev-install xdev: xdev-build xdev-install .ORDER: _xb-build-tools _xb-cross-tools xdev-build: _xb-build-tools _xb-cross-tools _xb-build-tools: ${_+_}cd ${.CURDIR}; \ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools _xb-cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ obj; \ ${CDMAKE} DIRPRFX=${_tool}/ depend; \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor _xi-mtree: ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}" mkdir -p ${XDDESTDIR} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ -p ${XDDESTDIR} >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${XDDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null .ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links _xi-cross-tools: @echo "_xi-cross-tools" .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} .endfor _xi-includes: ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \ DESTDIR=${XDDESTDIR} _xi-libraries: ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \ DESTDIR=${XDDESTDIR} _xi-links: ${_+_}cd ${XDDESTDIR}/usr/bin; \ for i in *; do \ ln -sf ../../${XDTP}/usr/bin/$$i \ ../../../../usr/bin/${XDDIR}-$$i; \ ln -sf ../../${XDTP}/usr/bin/$$i \ ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \ done .endif Index: releng/8.4/release/Makefile =================================================================== --- releng/8.4/release/Makefile (revision 248849) +++ releng/8.4/release/Makefile (revision 248850) @@ -1,1422 +1,1422 @@ # $FreeBSD$ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \ # [SVNBRANCH=some/branch] # # Where "/some/dir" is the pathname of a directory on a some filesystem with # at least 1000MB of free space, "somename" is what you want the release to # call itself, "/cvs/dir" is where our source repo resides and, optionally, # which CVS "tag" name should be used when checking out the sources to build # the release (default is HEAD). # # Please note the support for building from SVN is preliminary and there # are still questions about things like how to handle updates of # /usr/src on production systems (csup(1) replacement). It is a work # in progress and may change as the other issues get worked out. # # Please note: the md(4) driver must be present in the kernel # (either by being compiled in or available as a kld(4) module), # otherwise the target 'release.8' and possibly others will fail. # # Note: If you add options to this file, please keep release(7) updated! # # Set these, release builder! # # Fixed version: #BUILDNAME=8.4-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d BASE = 8.4 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set -#RELEASETAG=RELENG_8 +#RELEASETAG=RELENG_8_4 # # To test a release with a source tree containing patches and # other work. This tree will get copied instead of getting the # src/ tree from a CVS checkout. For "rerelease", this will NOT # be copied; cvs update will be used instead. #EXTSRCDIR=/usr/src # # To use a checked-out ports collection directory instead of # checking out from a local CVS repository, set this option. #EXTPORTSDIR=/usr/ports # # To use a checked-out doc/ directory instead of # checking out from a local CVS repository, set this option. #EXTDOCDIR=/usr/doc # # To add other options to the CVS subcommands (co,up), set #CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'" # # To add other options to the CVS command, set #CVSARGS="-lfq" # # To prefix the CVS command #CVSPREFIX="/usr/bin/time" # # Where the CVS repository is #CVSROOT="/home/ncvs" # # To add other options to the Subversion subcommands (co,up), set #SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'" # # To prefix the Subversion command #SVNPREFIX="/usr/bin/time" # # Where the Subversion repository is #SVNROOT=svn://svn.freebsd.org/base # # Subversion branch to build for src. If this is not set then it is # automatically computed from RELEASETAG. -#SVNBRANCH=stable/8 +#SVNBRANCH=releng/8.4 # # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we # are building an official release. Otherwise, we are building for # a branch. .if defined(RELEASETAG) ISRELEASE!= expr "${RELEASETAG}" : '^RELENG_.*_RELEASE$$' || true .if ${ISRELEASE} != 0 # Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees. AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//' DOCRELEASETAG?= ${AUXRELEASETAG} PORTSRELEASETAG?= ${AUXRELEASETAG} .endif .endif # Determine the Subversion source branch that corresponds to the requested # RELEASETAG. .if !defined(SVNBRANCH) .if defined(RELEASETAG) SVNBRANCH!= echo "${RELEASETAG}" | awk -f ${.CURDIR}/svnbranch.awk .else SVNBRANCH= head .endif .endif # If you want to pass flags to the world build such as -j X, use # WORLD_FLAGS. Similarly, you can specify make flags for kernel # builds via KERNEL_FLAGS. #WORLD_FLAGS=-j4 #KERNEL_FLAGS=-j4 TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} .else TARGET?= ${TARGET_ARCH} .endif CROSSENV= TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} CROSSMAKE= ${MAKE} ${CROSSENV} NATIVEMAKE= ${MAKE} TARGET_ARCH=${MACHINE_ARCH} TARGET=${MACHINE} # If you are using a local CVS repository with components stored in # non-standard modules, override these on the make commandline or # in the environment. RELEASESRCMODULE?= src RELEASEDOCMODULE?= doc RELEASEPORTSMODULE?= ports # Uncomment this to disable the doc.1 target. Docs normally require # the ports tree, so NOPORTS can be set together with NODOC in order # to have neither ports or docs. If only NOPORTS is set to YES, but # docs are still desired, the DOMINIMALDOCPORTS logic below will only # install the ports that are minimally required for the release note documentation. This is # intended as a compromise, less disk space is required than for using # the entire ports collection (and much less time due to the huge number # of directories it would create), but still quite a bit as well as some # CPU cycles (some of the programs are C++, and things like ghostscript # belong to the required ports nevertheless). # #NODOC= YES #NOPORTS= YES # When retrieving ports using the pkg_add -r method, set your proxies to these. # src/release/${arch}/mkisoimages.sh can use these. #HTTP_PROXY?= www.example.com #FTP_PROXY?= ftp.example.com # When creating ISO images, point ${CD_PACKAGE_TREE} to a directory containing # the package split by an earlier invocation of the 'package-split' target. #CD_PACKAGE_TREE= /path/to/pkg # Extra source tarballs; each argument is a pair of source dir and # distribution name. The dist name should not exceed 7 characters # (another "s" for "source" will be prepended). #EXTRA_SRC= games/fortune fortune # Modify this definition if you want the release notes # and other release documentation in a language other than English. RELNOTES_LANG?= en_US.ISO8859-1 # As an alternative to installing the entire ports collection (which # can take a huge amount of time, in particular on slower disks), # setting ${MINIMALDOCPORTS} allows to install and build just those # ports that are really required for getting the docs up & running. .if defined(NOPORTS) && !defined(NODOC) DOMINIMALDOCPORTS= YES .include "Makefile.inc.docports" RELEASEPORTSMODULE= ${MINIMALDOCPORTS} ports/sysutils/cdrtools .endif # Helper variable .if defined(NOPORTS) .if !defined(DOMINIMALDOCPORTS) || ${DOMINIMALDOCPORTS} != "YES" NOPORTSATALL= YES .endif .endif # # Doing 'make index' in /usr/ports requires Perl. MAKEINDEXPORTS= lang/perl5.12 DOCPORTS= textproc/docproj # Set this to wherever the distfiles required by release procedures. .if defined(DOCDISTFILES) # Respect DOCDISTFILES which is used before. RELEASEDISTFILES?= ${DOCDISTFILES} .else RELEASEDISTFILES?= ${.CURDIR}/../../ports/distfiles .endif # Set this to 1 if you want -P to be used for automatic keyboard detection # on the boot floppy. WARNING: Breaks on some Athlon (K7) motherboards. AUTO_KEYBOARD_DETECT?= 0 .if !defined(NODOC) DIST_DOCS_ARCH_INDEP= hardware readme relnotes errata DIST_DOCS_ARCH_DEP= .endif # Things which without too much trouble can be considered variables # BASE_DISTS are special in that they get full /etc installation sets. # OTHER_DISTS?= catpages manpages games proflibs dict info doc ${ARCH_DISTS} BASE_DISTS?= base .if ${TARGET_ARCH} == "amd64" ARCH_DISTS?= lib32 .endif DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} # # Build and package both GENERIC and SMP kernels if the target # has both configuration files. Otherwise only GENERIC is done. # .if exists(${.CURDIR}/../sys/${TARGET}/conf/SMP) KERNELS_BASE?= GENERIC SMP .else KERNELS_BASE?= GENERIC .endif # mountpoint for filesystems. MNT= /mnt # Various floppy image parameters. # .undef MAKE_FLOPPIES .if ${TARGET_ARCH} == "i386" MAKE_DVD= SEPARATE_LIVEFS= SPLIT_MFSROOT= .if ${TARGET} == "pc98" MAKE_FLOPPIES= true SMALLFLOPPYSIZE= 1200 SMALLFLOPPYSPLITSIZE= 1152 SMALLFLOPPYLABEL= fd1200 SPLIT_MFSROOT= .endif FLOPPYSIZE= 1440 FLOPPYSPLITSIZE= 1392 FLOPPYINODE= 40000 FLOPPYLABEL= fd1440 BOOTINODE= 80000 MFSSIZE= 4320 MFSINODE= 8000 MFSLABEL= minimum3 .elif ${TARGET_ARCH} == "sparc64" DISKLABEL= sunlabel MAKE_DVD= MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto MINIROOT= SEPARATE_LIVEFS= .elif ${TARGET_ARCH} == "ia64" DISKLABEL= "" MAKE_DVD= MFSSIZE= 8192 MFSINODE= 8192 MFSLABEL= auto SEPARATE_LIVEFS= .elif ${TARGET_ARCH} == "amd64" MAKE_DVD= FLOPPYSIZE= 1440 FLOPPYSPLITSIZE= 1392 FLOPPYINODE= 40000 FLOPPYLABEL= fd1440 BOOTINODE= 80000 MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto SEPARATE_LIVEFS= SPLIT_MFSROOT= .elif ${TARGET_ARCH} == "powerpc" DISKLABEL= "" MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto SEPARATE_LIVEFS= .endif .if defined(NO_FLOPPIES) .undef MAKE_FLOPPIES .endif .if exists(/sbin/bsdlabel) DISKLABEL?= bsdlabel .else DISKLABEL?= disklabel .endif ZIPPER= gzip -9 --no-name ZIPNSPLIT= ${ZIPPER} -c | split -b 1392k - # Things which may get you into trouble if you change them MTREEFILES= ${.CURDIR}/../etc/mtree _R?= /R RD= ${_R}/stage RND= ${RD}/release.doc FD= ${_R}/ftp CD= ${_R}/cdrom CD_BOOT= ${CD}/bootonly CD_DISC1= ${CD}/disc1 CD_DISC2= ${CD}/disc2 .if defined(MAKE_DVD) CD_DVD1= ${CD}/dvd1 .endif .if !defined(NODOC) CD_DOCS= ${CD}/docs .endif .if defined(SEPARATE_LIVEFS) CD_LIVEFS= ${CD}/livefs .else CD_LIVEFS= ${CD_DISC1} .endif _MK?= ${CHROOTDIR}/mk # Where the bootstrap ports (see DOCPORTS) get installed. LOCALDIR= /usr/local/bin .if ${TARGET} != ${MACHINE} && ${DISKLABEL} == "bsdlabel" DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} ${TARGET} .else DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${DISKLABEL} "" .endif CRUNCH_TARGETS= boot .if ${TARGET_ARCH} == "i386" CRUNCH_TARGETS+=fixit .if ${TARGET} == "pc98" CRUNCH_TARGETS+=fixit-small .endif .endif .if defined(MAKE_FLOPPIES) EXTRAS= floppies.1 .if ${TARGET_ARCH} == "i386" EXTRAS+= floppies.2 .endif EXTRAS+= floppies.3 .endif EXTRAS+= ftp.1 .if !defined(NOCDROM) EXTRAS+= cdrom.1 cdrom.2 cdrom.3 .if defined(MAKE_ISOS) EXTRAS+= iso.1 .endif BOOTABLE="-b" .endif .if !defined(NODOC) DOCREL= doc.1 doc.2 .endif .if !make(release) && !make(rerelease) && !make(package-split) BINMAKE!= cd ${.CURDIR}/..; ${MAKE} -V BINMAKE WMAKEENV!= cd ${.CURDIR}/..; \ ${BINMAKE} ${CROSSENV} -f Makefile.inc1 -V WMAKEENV WMAKE= ${WMAKEENV} ${BINMAKE} .endif CVS_SRCARGS= -P .if defined(RELEASETAG) CVS_SRCARGS+= -r ${RELEASETAG} .endif CVS_DOCARGS= -P .if defined(DOCRELEASETAG) CVS_DOCARGS+= -r ${DOCRELEASETAG} .endif CVS_PORTSARGS= -P .if defined(PORTSRELEASETAG) CVS_PORTSARGS+= -r ${PORTSRELEASETAG} .endif WORLDDIR?= ${.CURDIR}/.. release rerelease: .if !defined(CHROOTDIR) || !defined(BUILDNAME) @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false .endif .if !defined(NOPORTSATALL) && !defined(EXTPORTSDIR) && !defined(CVSROOT) @echo "Building ports requires CVSROOT or EXTPORTSDIR" && false .endif .if !defined(NODOC) && !defined(EXTDOCDIR) && !defined(CVSROOT) @echo "Building docs requires CVSROOT or EXTDOCDIR" && false .endif .if !defined(EXTSRCDIR) && !defined(CVSROOT) && !defined(SVNROOT) @echo "The source tree requires SVNROOT, CVSROOT, or EXTSRCDIR" && false .endif .if defined(NOPORTSATALL) && !defined(NODOC) @echo "Ports are required for building the release docs. Either set NODOC or" @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!" @exit 1 .endif .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES) .for p in ${LOCAL_PATCHES} .if !exists(${p}) @echo "The patch file ${p} does not exist!" @exit 1 .endif .endfor .endif .if defined(LOCAL_SCRIPT) && !exists(${LOCAL_SCRIPT}) @echo "The local script ${LOCAL_SCRIPT} does not exist!" @exit 1 .endif .if make(release) .if exists(${CHROOTDIR}) # The first command will fail on a handful of files that have their schg # flags set. But it greatly speeds up the next two commands. # NB: clear any vestigial devfs mount, just in case -umount ${CHROOTDIR}/dev > /dev/null 2>&1 -rm -rf ${CHROOTDIR} 2>/dev/null -chflags -R 0 ${CHROOTDIR}/. -rm -rf ${CHROOTDIR} .endif mkdir -p ${CHROOTDIR} @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`" cd ${WORLDDIR} && ${NATIVEMAKE} -DWITHOUT_GAMES -DWITHOUT_HTML -DWITHOUT_LIB32 \ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE installworld DESTDIR=${CHROOTDIR} cd ${WORLDDIR} && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR} if [ -f /etc/resolv.conf ]; then \ cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \ fi .if defined(EXTLOCALDIR) rm -rf ${CHROOTDIR}/usr/local cd ${CHROOTDIR}/usr && cp -R -H ${EXTLOCALDIR} local .endif rm -rf ${CHROOTDIR}/usr/src .if defined(EXTSRCDIR) cd ${CHROOTDIR}/usr && \ cp -R -H ${EXTSRCDIR} src .elif defined(SVNROOT) cd ${CHROOTDIR}/usr && \ ${SVNPREFIX} svn co ${SVNCMDARGS} ${SVNROOT}/${SVNBRANCH} \ ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && \ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE} .endif .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES) .for p in ${LOCAL_PATCHES} patch -d ${CHROOTDIR}/usr/${RELEASESRCMODULE} ${PATCH_FLAGS} < ${p} .endfor .endif .if defined(LOCAL_SCRIPT) cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} \ RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} .endif rm -rf ${CHROOTDIR}/usr/ports .if !defined(NOPORTSATALL) .if defined(EXTPORTSDIR) cd ${CHROOTDIR}/usr && cp -R -H ${EXTPORTSDIR} ports # If there are distfiles downloaded removing them rm -rf ports/distfiles/* .else cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE} .endif .endif .if !defined(NODOC) rm -rf ${CHROOTDIR}/usr/doc .if defined(EXTDOCDIR) cd ${CHROOTDIR}/usr && cp -R -H ${EXTDOCDIR} doc .else cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE} .endif if [ -d ${RELEASEDISTFILES}/ ]; then \ cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \ else \ mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \ fi .if !defined(NO_PREFETCHDISTFILES) @cd ${.CURDIR} && ${MAKE} fetch-distfiles .endif .endif .endif .if make(rerelease) .if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR) .if defined(SVNROOT) cd ${CHROOTDIR}/usr/src && ${SVNPREFIX} svn switch ${SVNCMDARGS} \ ${SVNROOT}/${SVNBRANCH} .elif !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -A .else cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -r ${RELEASETAG} .endif rm -f ${CHROOTDIR}/tmp/.world_done .if !defined(NOPORTS) && !defined(EXTPORTSDIR) cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d rm -f ${CHROOTDIR}/tmp/.skip_ports_index .endif .if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES" for i in ${MINIMALDOCPORTS}; do \ ( cd ${CHROOTDIR}/usr/$$i && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d ) ; \ done .endif .if !defined(NODOC) cd ${CHROOTDIR}/usr/doc && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d .endif .endif .endif -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release echo "#!/bin/sh" > ${_MK} echo "set -ex" >> ${_MK} echo "trap 'umount /dev || true' 0" >> ${_MK} echo "_RELTARGET=\$${1:-doRELEASE}" >> ${_MK} .for var in \ AUTO_KEYBOARD_DETECT \ BUILDNAME \ CD_PACKAGE_TREE \ DISTRIBUTIONS \ DOMINIMALDOCPORTS \ EXTRA_SRC \ FTP_PASSIVE_MODE \ FTP_PROXY \ HTTP_PROXY \ KERNELS \ KERNELS_BASE \ KERNEL_FLAGS \ MAKE_DVD \ MAKE_FLOPPIES \ MAKE_ISOS \ NOCDROM \ NODOC \ NOPORTS \ NO_SHARED \ NOSRC \ NO_CPU_CFLAGS \ NO_CPU_COPTFLAGS \ NO_FLOPPIES \ RELEASETAG \ RELNOTES_LANG \ SEPARATE_LIVEFS \ TARGET \ TARGET_ARCH \ WORLD_FLAGS .if defined(${var}) echo "export ${var}=\"${${var}}\"" >> ${_MK} .endif .endfor # Don't remove this, or the build will fall over! echo "export RELEASEDIR=${_R}" >> ${_MK} echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${_MK} echo "export MANBUILDCAT=YES" >> ${_MK} # NB: these may fail if the host is running w/o devfs echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK} echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK} echo "if [ ! -c /dev/null ]; then" >> ${_MK} echo " echo /dev/null is not a device!" >> ${_MK} echo " exit 1" >> ${_MK} echo "fi" >> ${_MK} echo "if [ -x /etc/rc.d/ldconfig ]; then" >> ${_MK} echo " /etc/rc.d/ldconfig start" >> ${_MK} echo "else" >> ${_MK} echo " ldconfig /lib /usr/lib /usr/local/lib || true" >> ${_MK} echo "fi" >> ${_MK} echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK} echo " cd /usr/src" >> ${_MK} echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNO_CLEAN buildworld && \\" >> ${_MK} echo " touch /tmp/.world_done || exit 1" >> ${_MK} echo "fi" >> ${_MK} echo "if [ ! -f /tmp/.skip_ports_index ]; then" >> ${_MK} echo " echo \">>> make index started on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK} echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} echo " rm -f INDEX*" >> ${_MK} echo " make index -DINDEX_PRISTINE" >> ${_MK} echo " rm -f INDEX*.tmp" >> ${_MK} echo " touch /tmp/.skip_ports_index" >> ${_MK} echo " echo \">>> make index finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK} echo "fi" >> ${_MK} echo "cd /usr/src/release" >> ${_MK} echo "make obj" >> ${_MK} echo "if [ -f Makefile.sysinstall ]; then" >> ${_MK} echo " make -f Makefile.sysinstall \$${_RELTARGET}" >> ${_MK} echo "else" >> ${_MK} echo " make \$${_RELTARGET}" >> ${_MK} echo "fi" >> ${_MK} echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK} chmod 755 ${_MK} .if defined(NOPORTS) touch ${CHROOTDIR}/tmp/.skip_ports_index .endif # Ensure md.ko is loaded if md(4) is not statically compiled into # the kernel -mdconfig 2>/dev/null env -i /usr/sbin/chroot `dirname ${_MK}` /`basename ${_MK}` clean: rm -rf ${CRUNCH_TARGETS:S/$/_crunch/} release.[0-8] ${EXTRAS} fetch-distfiles: @for i in ${MAKEINDEXPORTS}; do \ cd ${CHROOTDIR}/usr/ports/$$i && \ make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \ checksum-recursive ; \ done @for i in ${DOCPORTS}; do \ cd ${CHROOTDIR}/usr/ports/$$i && \ make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \ WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes \ checksum-recursive ; \ done # Clean out ${_R} and make the directory structure. release.1: mkdir -p ${_R} -rm -rf ${_R}/* 2> /dev/null -chflags -R noschg ${_R}/. rm -rf ${_R}/* mkdir ${RD} .if defined(MAKE_FLOPPIES) mkdir ${RD}/floppies .endif mkdir ${RD}/trees for i in ${DISTRIBUTIONS}; do \ mkdir ${RD}/trees/$$i && \ mtree -deU -f ${MTREEFILES}/BSD.root.dist \ -p ${RD}/trees/$$i > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ -p ${RD}/trees/$$i/usr > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.include.dist \ -p ${RD}/trees/$$i/usr/include > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.var.dist \ -p ${RD}/trees/$$i/var > /dev/null ; \ done mkdir ${RD}/kernels for i in ${KERNELS_BASE} ${KERNELS}; do \ mkdir -p ${RD}/kernels/$${i}; \ done touch ${.TARGET} # Install the system into the various distributions. release.2: cd ${.CURDIR}/.. && ${CROSSMAKE} distrib-dirs DESTDIR=${RD}/trees/base cd ${.CURDIR}/.. && ${CROSSMAKE} ${WORLD_FLAGS} distributeworld \ DISTDIR=${RD}/trees sh ${.CURDIR}/scripts/mm-mtree.sh -F "${CROSSENV}" -D "${RD}/trees/base" touch ${.TARGET} # Make and install the generic kernel(s). release.3: .for kernel in ${KERNELS_BASE} ${KERNELS} cd ${.CURDIR}/..; \ ${CROSSMAKE} ${KERNEL_FLAGS} \ KERNCONF=${kernel} kernel \ DESTDIR=${RD}/kernels KODIR=/${kernel} .endfor touch ${.TARGET} # Make and install the three crunched binaries which live on the floppies. # You are not supposed to like this :-) release.4: rm -rf ${RD}/crunch mkdir -p ${RD}/crunch .for j in ${CRUNCH_TARGETS} .if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf) rm -rf ${j}_crunch mkdir ${j}_crunch cd ${j}_crunch; ${WMAKEENV} MAKEFLAGS="-m ${.CURDIR}/../share/mk" \ NO_WERROR= crunchgen -o \ ${.CURDIR}/${TARGET}/${j}_crunch.conf cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean cd ${.CURDIR}/..; ${BINMAKE} -f Makefile.inc1 _build-tools cd ${j}_crunch; CFLAGS="-Os -pipe" ${WMAKE} -f ${j}_crunch.mk \ -DNO_CPU_CFLAGS all ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch mv ${j}_crunch/${j}_crunch ${RD}/crunch/${j} .endif .endfor touch ${.TARGET} # # --==## Fix up the distributions. ##==-- # release.5: # Create any "synthetic dists" now. @for i in ${DISTRIBUTIONS}; do \ if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ echo -n "Running $$i dist creation script... "; \ env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \ echo "Done."; \ fi \ done \ # Remove all the directories we don't need. -cd ${RD}/trees && \ (find ${OTHER_DISTS} -path '*/var/empty' | xargs chflags noschg; \ find ${OTHER_DISTS} -depth -type d -empty -delete) touch ${.TARGET} # # --==## Package up the tarballs from assembled trees ##==-- # release.6: rm -rf ${RD}/dists mkdir -p ${RD}/dists @for i in ${DISTRIBUTIONS} ; \ do \ if [ -d ${RD}/trees/$${i} ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ SD=${RD}/trees/$${i} \ TN=$$i TD=$$i ARG="." && \ echo "$${i} distribution is finished."; \ fi ; \ done @for i in ${KERNELS_BASE} ${KERNELS} ; \ do \ if [ -d ${RD}/kernels/$${i} ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ SD=${RD}/kernels \ TN=$$i TD=kernels ARG="$$i" && \ echo "$${i} distribution is finished."; \ fi ; \ done .if !defined(NOPORTS) # XXX: Inline stripped version of doTARBALL @rm -rf ${RD}/dists/ports/ports* @mkdir -p ${RD}/dists/ports @echo rolling ports/ports tarball @tar --exclude CVS --exclude .svn --exclude 'ports/distfiles/*' \ -czf ${RD}/dists/ports/ports.tgz -C /usr ports @cp ${.CURDIR}/scripts/ports-install.sh ${RD}/dists/ports/install.sh @(cd ${RD}/dists/ports; \ rm -f CHECKSUM.MD5 CHECKSUM.SHA256; \ md5 * > .CHECKSUM.MD5; \ sha256 * > .CHECKSUM.SHA256; \ mv .CHECKSUM.MD5 CHECKSUM.MD5; \ mv .CHECKSUM.SHA256 CHECKSUM.SHA256) @echo "ports distribution is finished." .endif touch ${.TARGET} # # --==## Make source dists ##==-- # release.7: .if !defined(NOSRC) @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \ TD=src TN=sbase ARG="[A-Z]*" @for i in `cd /usr/src && echo [a-z]*` ; do \ if [ -d /usr/src/$$i ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ TN=`echo s$$i | tr -d '.' | \ sed -e 's/usr/u/' \ -e 's/kerberos5/krb5/'` \ SD=/usr/src TD=src ARG="$$i" ; \ fi ; \ done .if defined(EXTRA_SRC) @set ${EXTRA_SRC} && \ while [ $$# -ge 2 ] ; do \ if [ -d /usr/src/$$1 ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \ fi && shift && shift ; \ done .endif (cd ${RD}/dists/src; \ rm -f CHECKSUM.MD5 CHECKSUM.SHA256; \ md5 * > .CHECKSUM.MD5; \ sha256 * > .CHECKSUM.SHA256; \ mv .CHECKSUM.MD5 CHECKSUM.MD5; \ mv .CHECKSUM.SHA256 CHECKSUM.SHA256) @echo "src distribution is finished." .endif touch ${.TARGET} # Build the memory root filesystem. release.8: cp ${RD}/trees/base/etc/disktab /etc rm -rf ${RD}/mfsfd mkdir ${RD}/mfsfd cd ${RD}/mfsfd && \ mkdir -p etc/defaults dev mnt stand/etc/defaults stand/help \ var/empty @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ DIR=${RD}/mfsfd/stand ZIP=false ( cd ${RD}/mfsfd && \ for dir in bin sbin ; do \ ln -sf /stand $$dir; \ done ) cp ${RD}/trees/base/sbin/dhclient-script ${RD}/mfsfd/stand cp ${.CURDIR}/../etc/master.passwd ${RD}/mfsfd/etc/master.passwd cp ${RD}/trees/base/etc/*pwd.db ${RD}/mfsfd/etc/ ( for F in defaults/rc.conf netconfig protocols ; do \ sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \ ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \ done ) grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \ ${RD}/trees/base/etc/services | \ sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \ > ${RD}/mfsfd/stand/etc/services grep 'operator' ${RD}/trees/base/etc/group \ > ${RD}/mfsfd/stand/etc/group ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services ln ${RD}/mfsfd/stand/etc/group ${RD}/mfsfd/etc/group ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig cp ${RD}/trees/base/COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp .if !defined(NODOC) @for i in ${DIST_DOCS_ARCH_INDEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \ ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ done @for i in ${DIST_DOCS_ARCH_DEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \ ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ done .endif -test -f ${.CURDIR}/install.cfg \ && cp ${.CURDIR}/install.cfg ${RD}/mfsfd @mkdir -p ${RD}/mfsfd/boot .if ${TARGET_ARCH} != "ia64" && ${TARGET_ARCH} != "powerpc" @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot .endif .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64" @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot .endif @tar --exclude CVS --exclude .svn -cf - \ -C ${.CURDIR}/../usr.sbin/sysinstall help | \ tar xf - -C ${RD}/mfsfd/stand @mkdir -p ${RD}/mfsroot sh -e ${DOFS_SH} ${RD}/mfsroot/mfsroot ${RD} ${MNT} \ ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} @${ZIPPER} -fv ${RD}/mfsroot/mfsroot touch ${.TARGET} KERNFLOPPYSET= ${RD}/floppyset/kern/kernel.gz .if defined(SMALLFLOPPYSIZE) SMALLKERNFLOPPYSET= ${RD}/floppyset/kern-small/kernel.gz .endif .if defined(SPLIT_MFSROOT) MFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot/mfsroot.gz .if defined(SMALLFLOPPYSIZE) SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot-small/mfsroot.gz .endif .endif # Build boot and install floppies. floppies.1: @${ZIPPER} -c ${RD}/kernels/GENERIC/kernel > ${RD}/kernels/kernel.gz @echo "Making the kernel boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \ FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz .if defined(SMALLFLOPPYSIZE) @echo "Making the small kernel boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern-small \ FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz \ FDSIZE="SMALL" .endif .if defined(SPLIT_MFSROOT) @echo "Making the mfsroot boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot \ FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz .if defined(SMALLFLOPPYSIZE) @echo "Making the small mfsroot boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=mfsroot-small \ FLOPPYDESC="Memory Filesystem" SPLITFILE=${RD}/mfsroot/mfsroot.gz \ FDSIZE="SMALL" .endif @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \ KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \ MFSROOTFILE="${MFSROOTFLOPPYSET}.split ${MFSROOTFLOPPYSET}.boot" .if defined(SMALLFLOPPYSIZE) @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \ KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \ MFSROOTFILE="${SMALLMFSROOTFLOPPYSET}.split ${SMALLMFSROOTFLOPPYSET}.boot" \ FDSIZE="SMALL" .endif .else # !SPLIT_MFSROOT @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot" \ KERNFILE="${KERNFLOPPYSET}.split ${KERNFLOPPYSET}.boot" \ MFSROOTFILE=${RD}/mfsroot/mfsroot.gz .if defined(SMALLFLOPPYSIZE) @cd ${.CURDIR} && ${MAKE} buildBootFloppy FSIMAGE="boot-small" \ KERNFILE="${SMALLKERNFLOPPYSET}.split ${SMALLKERNFLOPPYSET}.boot" \ MFSROOTFILE=${RD}/mfsroot/mfsroot.gz \ FDSIZE="SMALL" .endif .endif # SPLIT_MFSROOT touch ${.TARGET} # Build fixit floppy. floppies.2: @echo "Making fixit floppy." @rm -rf ${RD}/fixitfd @mkdir ${RD}/fixitfd @cd ${RD}/fixitfd && \ mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \ usr/share/misc @cp ${RD}/trees/base/etc/spwd.db ${RD}/trees/base/etc/group \ ${RD}/fixitfd/etc @sed -e 's/#.*//' ${RD}/trees/base/etc/protocols \ > ${RD}/fixitfd/etc/protocols @sed -e 's/#.*//' ${RD}/trees/base/usr/share/misc/scsi_modes \ > ${RD}/fixitfd/usr/share/misc/scsi_modes @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar @chmod 555 ${RD}/fixitfd/stand/tar .if defined(SMALLFLOPPYSIZE) @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit-small \ DIR=${RD}/fixitfd/stand ZIP=false @sh -e ${DOFS_SH} ${RD}/floppies/fixit-small.flp ${RD} ${MNT} \ ${SMALLFLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${SMALLFLOPPYLABEL} @rm -rf ${RD}/fixitfd/stand @mkdir ${RD}/fixitfd/stand .endif @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit \ DIR=${RD}/fixitfd/stand ZIP=false @sh -e ${DOFS_SH} ${RD}/floppies/fixit.flp ${RD} ${MNT} \ ${FLOPPYSIZE} ${RD}/fixitfd ${FLOPPYINODE} ${FLOPPYLABEL} touch ${.TARGET} # Do our last minute floppies directory setup floppies.3: @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5) @(cd ${RD}/floppies; sha256 *.flp > CHECKSUM.SHA256) touch ${.TARGET} # # --==## Setup a suitable ftp-area ##==-- # ftp.1: @echo "Setting up FTP distribution area" @mkdir -p ${FD} -@ln -s . ${FD}/${BUILDNAME} .if defined(MAKE_FLOPPIES) @cd ${RD} && find floppies -print | cpio -dumpl ${FD} .endif @cd ${RD}/dists && find . -print | cpio -dumpl ${FD} .if !defined(NODOC) @for i in ${DIST_DOCS_ARCH_INDEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \ ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/article.html \ ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @for i in ${DIST_DOCS_ARCH_DEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \ ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \ ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${FD} .endif @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf touch ${.TARGET} # Build a live filesystem cdrom image cdrom.1: @echo "Building CDROM live filesystem image" @mkdir -p ${CD_LIVEFS} @for i in ${DISTRIBUTIONS} ; \ do \ if [ -d ${RD}/trees/$${i} ] ; then \ chflags -R noschg ${RD}/trees/$${i} || true ; \ ( cd ${RD}/trees/$${i} && \ find . -depth -print | cpio -dumpl ${CD_LIVEFS} ) ; \ fi \ done .if defined(MAKE_DVD) @echo "Building DVD filesystem image as well as CDROM" @mkdir -p ${CD_DVD1}/${BUILDNAME} @for i in ${DISTRIBUTIONS} ; \ do \ if [ -d ${RD}/trees/$${i} ] ; then \ chflags -R noschg ${RD}/trees/$${i} || true ; \ ( cd ${RD}/trees/$${i} && \ find . -depth -print | cpio -dumpl ${CD_DVD1} ) ; \ fi \ done .endif @echo "Copy GENERIC kernel to boot area" @cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel @rm -f ${CD_LIVEFS}/boot/kernel/*.symbols @rm -f ${CD_LIVEFS}/.profile @cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile @ln -sf /rescue ${CD_LIVEFS}/stand @echo "Setting up CDROM boot area" @rm -f ${CD_LIVEFS}/boot/loader.conf @cp ${RD}/mfsroot/mfsroot.gz ${CD_LIVEFS}/boot/mfsroot.gz @echo 'mfsroot_load="YES"' > ${CD_LIVEFS}/boot/loader.conf @echo 'mfsroot_type="mfs_root"' >> ${CD_LIVEFS}/boot/loader.conf @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_LIVEFS}/boot/loader.conf .if exists(${RD}/trees/base/boot/device.hints) # Break the link to device.hints so we can modify it @rm -f ${CD_LIVEFS}/boot/device.hints @cp ${RD}/trees/base/boot/device.hints ${CD_LIVEFS}/boot/device.hints .endif @echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf .if defined(MAKE_DVD) @cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel @rm -f ${CD_DVD1}/boot/kernel/*.symbols @rm -f ${CD_DVD1}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile @ln -sf /rescue ${CD_DVD1}/stand @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf @rm -f ${CD_DVD1}/boot/loader.conf @cp ${RD}/mfsroot/mfsroot.gz ${CD_DVD1}/boot/mfsroot.gz @echo 'mfsroot_load="YES"' > ${CD_DVD1}/boot/loader.conf @echo 'mfsroot_type="mfs_root"' >> ${CD_DVD1}/boot/loader.conf @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DVD1}/boot/loader.conf .if exists(${RD}/trees/base/boot/device.hints) @rm -f ${CD_DVD1}/boot/device.hints @cp ${RD}/trees/base/boot/device.hints ${CD_DVD1}/boot/device.hints .endif .endif touch ${.TARGET} # Build disc1 and disc2 cdrom images cdrom.2: @echo "Building CDROM disc1 filesystem image" @mkdir -p ${CD_DISC1}/${BUILDNAME} .if defined(MAKE_FLOPPIES) @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1} .endif @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1}/${BUILDNAME} .if !defined(NODOC) @for i in ${DIST_DOCS_ARCH_INDEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \ ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/article.html \ ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @for i in ${DIST_DOCS_ARCH_DEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \ ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \ ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DISC1} .endif .if defined(SEPARATE_LIVEFS) @cp -Rp ${CD_LIVEFS}/boot ${CD_DISC1} @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf .endif @echo "CD_VOLUME = 1" >> ${CD_DISC1}/cdrom.inf @echo "Building CDROM disc2 filesystem image" @mkdir -p ${CD_DISC2} @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf @echo "CD_VOLUME = 2" >> ${CD_DISC2}/cdrom.inf .if defined(MAKE_DVD) .if defined(MAKE_FLOPPIES) @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DVD1} .endif @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DVD1}/${BUILDNAME} .if !defined(NODOC) @for i in ${DIST_DOCS_ARCH_INDEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \ ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/article.html \ ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @for i in ${DIST_DOCS_ARCH_DEP}; do \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \ ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \ ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ done @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DVD1} .endif @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf @echo "CD_VOLUME = 1" >> ${CD_DVD1}/cdrom.inf .endif .if !defined(NODOC) @echo "Building CDROM docs filesystem image" @mkdir -p ${CD_DOCS} @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf @echo "CD_VOLUME = 3" >> ${CD_DOCS}/cdrom.inf .endif touch ${.TARGET} # # --==## Setup a suitable cdrom-area ##==-- # cdrom.3: .if defined(CD_BOOT) @echo "Building bootonly CDROM filesystem image" @mkdir -p ${CD_BOOT} @cp -Rp ${CD_LIVEFS}/boot ${CD_BOOT} @echo "CD_VERSION = ${BUILDNAME}" > ${CD_BOOT}/cdrom.inf .if defined(MINIROOT) @echo "Building bootonly UFS filesystem image" @mkdir -p ${FD}/miniroot @sh -e ${DOFS_SH} ${FD}/miniroot/miniroot.ufs \ ${RD} ${MNT} 0 ${CD_BOOT} 8192 auto @${ZIPPER} -v ${FD}/miniroot/miniroot.ufs .endif .endif touch ${.TARGET} .if make(iso.1) .if defined(CD_PACKAGE_TREE) .if exists(${CD_PACKAGE_TREE}/disc1) CD_DISC1_PKGS= ${CD_PACKAGE_TREE}/disc1 .endif .if exists(${CD_PACKAGE_TREE}/disc2) CD_DISC2_PKGS= ${CD_PACKAGE_TREE}/disc2 .endif # scripts/package-trees.sh names all discs according to the "discX" # scheme where X is the number of the disc .if exists(${CD_PACKAGE_TREE}/disc3) CD_DOCS_PKGS= ${CD_PACKAGE_TREE}/disc3 .endif .if exists(${CD_PACKAGE_TREE}/dvd1) CD_DVD1_PKGS= ${CD_PACKAGE_TREE}/dvd1 .endif .endif .endif iso.1: .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) @echo "Creating ISO images..." .if defined(CD_BOOT) @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_bootonly \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} .endif @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ ${CD_DISC1_PKGS} @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ FreeBSD_Packages \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ ${CD_DISC2_PKGS} .if defined(MAKE_DVD) @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ ${CD_DVD1_PKGS} .endif .if !defined(NODOC) @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ FreeBSD_Documentation \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \ ${CD_DOCS_PKGS} .endif .if defined(SEPARATE_LIVEFS) @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_LiveFS \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} .endif @echo "Generating MD5 and SHA256 sums..." @(cd ${CD} && md5 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5) @(cd ${CD} && sha256 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256) touch ${.TARGET} .else @echo "Do not know how to create an ISO for ${TARGET}." .endif # # --==## Documentation Project tools required to build the release notes ##==-- # doc.1: @echo "Making docproj tools..." @for i in ${DOCPORTS}; do \ cd /usr/ports/$$i && \ env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \ make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \ WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \ done touch ${.TARGET} # # --==## RELNOTESng: Next-generation replacements for *.TXT files ##==-- # doc.2: @echo "Making release documentation..." @cd ${.CURDIR}/doc && make all install clean 'FORMATS=html txt' \ INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${RND} touch ${.TARGET} # Various "subroutine" and other supporting targets. # RD= # SD= # TD= # ARG= doTARBALL: .if !defined(SD) @echo "SD undefined in doTARBALL" && exit 1 .endif .if !defined(TD) @echo "TD undefined in doTARBALL" && exit 1 .endif .if !defined(ARG) @echo "ARG undefined in doTARBALL" && exit 1 .endif @rm -rf ${RD}/dists/${TD}/${TN}* @mkdir -p ${RD}/dists/${TD} @( cd ${SD} && \ tn=`echo ${TN} | tr 'A-Z' 'a-z'` && \ echo rolling ${TD}/$$tn tarball &&\ tar --exclude CVS --exclude .svn --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \ sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn \ > ${RD}/dists/${TD}/$$tn.inf && \ if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \ cp -p ${.CURDIR}/scripts/$${TD}-install.sh \ ${RD}/dists/${TD}/install.sh && \ chmod +x ${RD}/dists/${TD}/install.sh; \ fi && \ if [ "${SD}" != "/usr/src" ]; then \ mtree -c -i -p ${SD}/${ARG} \ -k gname,md5digest,mode,nlink,uname,size,link,type \ > ${RD}/dists/${TD}/$$tn.mtree ; \ else \ true; \ fi; \ ( cd ${RD}/dists/${TD}; \ rm -f CHECKSUM.MD5 CHECKSUM.SHA256; \ md5 * > .CHECKSUM.MD5; \ sha256 * > .CHECKSUM.SHA256; \ mv .CHECKSUM.MD5 CHECKSUM.MD5; \ mv .CHECKSUM.SHA256 CHECKSUM.SHA256) \ ) doRELEASE: release.1 release.2 ${DOCREL} release.3 release.4 \ release.5 release.6 release.7 release.8 ${EXTRAS} @echo "Release done" floppies: @rm -f release.4 release.8 floppies.[123] @cd ${.CURDIR} && ${MAKE} release.4 release.8 floppies.1 floppies.2 \ floppies.3 @cd ${RD} && find floppies -print | cpio -dumpl ${FD} installCRUNCH: .if !defined(CRUNCH) @echo "CRUNCH undefined in installCRUNCH" && exit 1 .endif .if !defined(DIR) @echo "DIR undefined in installCRUNCH" && exit 1 .endif .if !defined(ZIP) @echo "ZIP undefined in installCRUNCH" && exit 1 .endif @if ${ZIP} ; then \ ${ZIPPER} < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \ else \ ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \ fi @chmod 555 ${DIR}/${CRUNCH}_crunch @if [ -f ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf ] ; then \ for i in `crunchgen -l ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf` ; do \ ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ done \ else \ for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \ ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ done \ fi # # --==## Build a floppy set for a splitfs file ##==-- # # FLOPPYBASE - basename of floppy image files # FLOPPYDESC - description of floppy set # SPLITFILE - filename of the file to split # FDSIZE - if specified and "small", small floppy is created .if make(makeFloppySet) SPLITDIR= ${RD}/floppyset/${FLOPPYBASE} .if defined(FDSIZE) && ${FDSIZE} == "SMALL" FLPSPLITSIZE= ${SMALLFLOPPYSPLITSIZE} FLPSIZE= ${SMALLFLOPPYSIZE} FLPLABEL= ${SMALLFLOPPYLABEL} .else FLPSPLITSIZE= ${FLOPPYSPLITSIZE} FLPSIZE= ${FLOPPYSIZE} FLPLABEL= ${FLOPPYLABEL} .endif .endif makeFloppySet: .if !defined(FLOPPYBASE) @echo "FLOPPYBASE undefined in ${.TARGET}" && exit 1 .endif .if !defined(FLOPPYDESC) @echo "FLOPPYDESC undefined in ${.TARGET}" && exit 1 .endif .if !defined(SPLITFILE) @echo "SPLITFILE undefined in ${.TARGET}" && exit 1 .endif sh ${.CURDIR}/scripts/split-file.sh ${SPLITFILE} \ ${RD}/floppyset/${FLOPPYBASE} ${FLPSPLITSIZE} "${FLOPPYDESC}" ( splitfile=${SPLITDIR}/`basename ${SPLITFILE}`.split ; \ lines=`cat $${splitfile} | wc -l`; \ lines=$$(($$lines - 1)) ; \ for line in `jot $$lines`; do \ file=`head -n $$(($${line} + 1)) $${splitfile} | tail -1 | cut -f 1 -d ' '` ; \ sh -e ${DOFS_SH} ${RD}/floppies/${FLOPPYBASE}$${line}.flp \ ${RD} ${MNT} ${FLPSIZE} ${SPLITDIR}/$${file} \ ${BOOTINODE} ${FLPLABEL}; \ done ) # # --==## Build a boot floppy ##==-- # # FSIMAGE - base floppy image name # FDSIZE - if specified and "small", small floppy is created # KERNFILE - path to kernel split file # MFSROOTFILE - path to mfsroot split file .if make(buildBootFloppy) IMAGEDIR= ${RD}/image.${FSIMAGE} BOOTDIR= ${RD}/trees/base/boot HINTSFILE= ${BOOTDIR}/device.hints ACPI_KO= ${RD}/kernels/GENERIC/acpi.ko IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp .if defined(FDSIZE) && ${FDSIZE} == "SMALL" FLPSIZE= ${SMALLFLOPPYSIZE} FLPLABEL= ${SMALLFLOPPYLABEL} .else FLPSIZE= ${FLOPPYSIZE} FLPLABEL= ${FLOPPYLABEL} .endif .endif buildBootFloppy: .if !defined(FSIMAGE) @echo "FSIMAGE undefined in ${.TARGET}" && exit 1 .endif .if !defined(KERNFILE) @echo "KERNFILE undefined in ${.TARGET}" && exit 1 .endif .if !defined(MFSROOTFILE) @echo "MFSROOTFILE undefined in ${.TARGET}" && exit 1 .endif @echo "Running ${.TARGET} for ${FSIMAGE}" @rm -rf ${IMAGEDIR} @mkdir ${IMAGEDIR} @echo "Setting up /boot directory for ${FSIMAGE} floppy" @mkdir -p ${IMAGEDIR}/boot .if ${TARGET_ARCH} == "i386" @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o -o \ ${IMAGEDIR}/boot/loader ${BOOTDIR}/loader .else @cp ${BOOTDIR}/loader ${IMAGEDIR}/boot .endif @cp -Rp ${BOOTDIR}/*.4th ${BOOTDIR}/defaults ${BOOTDIR}/loader.help \ ${BOOTDIR}/loader.rc ${IMAGEDIR}/boot .if exists(${HINTSFILE}) @cp ${HINTSFILE} ${IMAGEDIR}/boot/device.hints @${ZIPPER} ${IMAGEDIR}/boot/device.hints .endif @${ZIPPER} ${IMAGEDIR}/boot/*.4th ${IMAGEDIR}/boot/loader.help \ ${IMAGEDIR}/boot/defaults/loader.conf @echo 'bootfile="/kernel"' > ${IMAGEDIR}/boot/loader.conf .if exists(${ACPI_KO}) @${ZIPPER} -c ${ACPI_KO} > ${IMAGEDIR}/acpi.ko.gz @echo 'acpi_load="YES"' >> ${IMAGEDIR}/boot/loader.conf @echo 'acpi_name="/acpi.ko"' >> ${IMAGEDIR}/boot/loader.conf @echo 'acpi_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf .endif @echo 'mfsroot_load="YES"' >> ${IMAGEDIR}/boot/loader.conf @echo 'mfsroot_type="mfs_root"' >> ${IMAGEDIR}/boot/loader.conf @echo 'mfsroot_name="/mfsroot"' >> ${IMAGEDIR}/boot/loader.conf .if !exists(${ACPI_KO}) @echo 'mfsroot_before="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf .endif .if defined(SPLIT_MFSROOT) @echo 'mfsroot_after="read -p \"Insert boot floppy and press Enter\""' >> ${IMAGEDIR}/boot/loader.conf .endif .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" .if ${AUTO_KEYBOARD_DETECT} @echo "-P" >> ${IMAGEDIR}/boot.config .endif .endif @rm -f ${IMAGEFILE} @cp ${KERNFILE} ${MFSROOTFILE} ${IMAGEDIR} sh -e ${DOFS_SH} ${IMAGEFILE} ${RD} ${MNT} ${FLPSIZE} ${IMAGEDIR} \ ${BOOTINODE} ${FLPLABEL} @echo "Created ${RD}/floppies/${FSIMAGE}.flp" .if make(package-split) # Targets related to making a package split # # PKG_COPY instructs the script to copy the actual package files rather than # make hard links # PKG_TREE is the path to the package tree to be split # PKG_DEST is the path to the destination tree to create the split in # PKG_VERBOSE asks for verbose output of the layout process # PKG_INDEX is the path to the INDEX file. By default ${PKG_TREE}/INDEX. .if defined(PKG_COPY) PKG_DO_COPY= cp .else PKG_DO_COPY= ln .endif PKG_WRKIDX= ${PKG_DEST}/INDEX.master PKG_ENV?= .if defined(TARGET_ARCH) PKG_ENV+= PKG_ARCH=${TARGET_ARCH} .endif .if defined(PKG_VERBOSE) PKG_ENV+= PKG_VERBOSE=1 .endif PKG_INDEX?= ${PKG_TREE}/INDEX package-split: .if !defined(PKG_TREE) @echo "PKG_TREE must be defined" && exit 1 .endif .if !defined(PKG_DEST) @echo "PKG_DEST must be defined" && exit 1 .endif @env ${PKG_ENV} python ${.CURDIR}/scripts/package-split.py \ ${PKG_INDEX} ${PKG_WRKIDX} @env ${PKG_ENV} sh ${.CURDIR}/scripts/package-trees.sh ${PKG_DO_COPY} \ ${PKG_WRKIDX} ${PKG_TREE} ${PKG_DEST} .endif .include Index: releng/8.4/share/examples/cvsup/standard-supfile =================================================================== --- releng/8.4/share/examples/cvsup/standard-supfile (revision 248849) +++ releng/8.4/share/examples/cvsup/standard-supfile (revision 248850) @@ -1,91 +1,91 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the # FreeBSD-current source tree. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently # # To keep your CVS tree up-to-date run: # # csup standard-supfile # # Note that this only updates the tree contents and does not # update what is actually installed. # # You may wish to change some of the settings in this file to better # suit your system: # # host=CHANGE_THIS.FreeBSD.org # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at # http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # # base=/var/db # This specifies the root where csup will store information # about the collections you have transferred to your system. # A setting of "/var/db" will generate this information in # /var/db/sup. You can override the "base" setting on the # command line with cvsup's "-b base" option. This directory # must exist in order to run CVSup. # # prefix=/usr # This specifies where to place the requested files. A # setting of "/usr" will place all of the files requested # in "/usr/src" (e.g., "/usr/src/bin", "/usr/src/lib"). # The prefix directory must exist in order to run CVSup. # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites # listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=RELENG_8 +*default release=cvs tag=RELENG_8_4 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try # commenting out the following line. (Normally, today's CPUs are fast enough # that you want to run compression.) *default compress ## Main Source Tree. # # The easiest way to get the main source tree is to use the "src-all" # mega-collection. It includes all of the individual "src-*" collections. src-all # These are the individual collections that make up "src-all". If you # use these, be sure to comment out "src-all" above. #src-base #src-bin #src-cddl #src-contrib #src-etc #src-games #src-gnu #src-include #src-kerberos5 #src-kerberosIV #src-lib #src-libexec #src-release #src-rescue #src-sbin #src-share #src-sys #src-tools #src-usrbin #src-usrsbin # These are the individual collections that make up FreeBSD's crypto # collection. They are no longer export-restricted and are a part of # src-all #src-crypto #src-eBones #src-secure #src-sys-crypto Index: releng/8.4/sys/sys/param.h =================================================================== --- releng/8.4/sys/sys/param.h (revision 248849) +++ releng/8.4/sys/sys/param.h (revision 248850) @@ -1,338 +1,338 @@ /*- * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)param.h 8.3 (Berkeley) 4/4/95 * $FreeBSD$ */ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ #include #define BSD 199506 /* System version (year & month). */ #define BSD4_3 1 #define BSD4_4 1 /* * __FreeBSD_version numbers are documented in the Porter's Handbook. * If you bump the version for any reason, you should update the documentation * there. * Currently this lives here in the doc/ repository: * * head/en_US.ISO8859-1/books/porters-handbook/book.xml * * scheme is: Rxx * 'R' is in the range 0 to 4 if this is a release branch or * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 803501 /* Master, propagated to newvers */ +#define __FreeBSD_version 804000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, * which by definition is always true on FreeBSD. This macro is also defined * on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD. * * It is tempting to use this macro in userland code when we want to enable * kernel-specific routines, and in fact it's fine to do this in code that * is part of FreeBSD itself. However, be aware that as presence of this * macro is still not widespread (e.g. older FreeBSD versions, 3rd party * compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in * external applications without also checking for __FreeBSD__ as an * alternative. */ #undef __FreeBSD_kernel__ #define __FreeBSD_kernel__ #ifdef _KERNEL #define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #endif #ifndef LOCORE #include #endif /* * Machine-independent constants (some used in following include files). * Redefined constants are from POSIX 1003.1 limits file. * * MAXCOMLEN should be >= sizeof(ac_comm) (see ) * MAXLOGNAME should be == UT_NAMESIZE+1 (see ) */ #include #define MAXCOMLEN 19 /* max command name remembered */ #define MAXINTERP 32 /* max interpreter file name length */ #define MAXLOGNAME 17 /* max login name length (incl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous processes */ #define NCARGS ARG_MAX /* max bytes for an exec function */ #define NGROUPS (NGROUPS_MAX+1) /* max number groups */ #define NOFILE OPEN_MAX /* max open files per process */ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ #define SPECNAMELEN 63 /* max length of devicename */ /* More types and definitions used throughout the kernel. */ #ifdef _KERNEL #include #include #ifndef LOCORE #include #include #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #endif #ifndef _KERNEL /* Signals. */ #include #endif /* Machine type dependent parameters. */ #include #ifndef _KERNEL #include #endif #ifndef _NO_NAMESPACE_POLLUTION #ifndef DEV_BSHIFT #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #endif #define DEV_BSIZE (1<>PAGE_SHIFT) #endif /* * btodb() is messy and perhaps slow because `bytes' may be an off_t. We * want to shift an unsigned type to avoid sign extension and we don't * want to widen `bytes' unnecessarily. Assume that the result fits in * a daddr_t. */ #ifndef btodb #define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ (sizeof (bytes) > sizeof(long) \ ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \ : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) #endif #ifndef dbtob #define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ ((off_t)(db) << DEV_BSHIFT) #endif #endif /* _NO_NAMESPACE_POLLUTION */ #define PRIMASK 0x0ff #define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ #define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ #define PBDRY 0x400 /* for PCATCH stop is done on the user boundary */ #define NZERO 0 /* default "nice" */ #define NBBY 8 /* number of bits in a byte */ #define NBPW sizeof(int) /* number of bytes per word (integer) */ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ #define NODEV (dev_t)(-1) /* non-existent device */ /* * File system parameters and macros. * * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes * per block. MAXBSIZE may be made larger without effecting * any existing filesystems as long as it does not exceed MAXPHYS, * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you * make it too big the kernel will not be able to optimally use * the KVM memory reserved for the buffer cache and will wind * up with too-few buffers. * * The default is 16384, roughly 2x the block size used by a * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ #define BKVASIZE 16384 /* must be power of 2 */ #define BKVAMASK (BKVASIZE-1) /* * MAXPATHLEN defines the longest permissible path length after expanding * symbolic links. It is used to allocate a temporary buffer from the buffer * pool in which to do the name expansion, hence should be a power of two, * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the * maximum number of symbolic links that may be expanded in a path name. * It should be set high enough to allow all legitimate uses, but halt * infinite loops reasonably quickly. */ #define MAXPATHLEN PATH_MAX #define MAXSYMLINKS 32 /* Bit map related macros. */ #define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) \ (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) \ ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #ifdef _KERNEL /* * Basic byte order function prototypes for non-inline functions. */ #ifndef LOCORE #ifndef _BYTEORDER_PROTOTYPED #define _BYTEORDER_PROTOTYPED __BEGIN_DECLS __uint32_t htonl(__uint32_t); __uint16_t htons(__uint16_t); __uint32_t ntohl(__uint32_t); __uint16_t ntohs(__uint16_t); __END_DECLS #endif #endif #ifndef lint #ifndef _BYTEORDER_FUNC_DEFINED #define _BYTEORDER_FUNC_DEFINED #define htonl(x) __htonl(x) #define htons(x) __htons(x) #define ntohl(x) __ntohl(x) #define ntohs(x) __ntohs(x) #endif /* !_BYTEORDER_FUNC_DEFINED */ #endif /* lint */ #endif /* _KERNEL */ /* * Scale factor for scaled integers used to count %cpu time and load avgs. * * The number of CPU `tick's that map to a unique `%age' can be expressed * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that * can be calculated (assuming 32 bits) can be closely approximated using * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). * * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. */ #define FSHIFT 11 /* bits to right of fixed binary point */ #define FSCALE (1<> (PAGE_SHIFT - DEV_BSHIFT)) #define ctodb(db) /* calculates pages to devblks */ \ ((db) << (PAGE_SHIFT - DEV_BSHIFT)) /* * Given the pointer x to the member m of the struct s, return * a pointer to the containing structure. */ #define member2struct(s, m, x) \ ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) #endif /* _SYS_PARAM_H_ */