diff --git a/Makefile.inc1 b/Makefile.inc1 index f758e94824c1..03180cb13193 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,1098 +1,1098 @@ # # $FreeBSD$ # # Make command line options: # -DNO_DYNAMICROOT do not link /bin and /sbin dynamically # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) # -DNO_RESCUE do not build rescue binaries -# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir -# -DNOCLEAN do not clean at all +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir +# -DNO_CLEAN do not clean at all # -DNO_CRYPT will prevent building of crypt versions # -DNO_MAN do not build the manual pages # -DNO_PROFILE do not build profiled libraries # -DNO_GAMES do not go into games subdir # -DNO_SHARE do not go into share subdir # -DNO_INFO do not make or install info files # -DNO_LIBC_R do not build libc_r. # -DNO_FORTRAN do not build g77 and related libraries. # -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_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_DOCUPDATE do not update doc in ${MAKE} update # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET_ARCH="arch" to crossbuild world to a different arch # # The intended user-driven targets are: # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" # 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 # 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. # # We must do etc last for install/distribute to work. # SUBDIR= share/info include lib libexec bin .if !defined(NO_GAMES) SUBDIR+=games .endif SUBDIR+=gnu .if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) SUBDIR+=kerberos5 .endif .if !defined(NO_RESCUE) SUBDIR+=rescue .endif SUBDIR+=sbin .if !defined(NO_CRYPT) SUBDIR+=secure .endif .if !defined(NO_SHARE) SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin 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(NOCLEANDIR) +.if defined(NO_CLEANDIR) CLEANDIR= clean cleandepend .else CLEANDIR= cleandir .endif CVS?= cvs CVSFLAGS?= -A -P -d -I! SUP?= /usr/local/bin/cvsup SUPFLAGS?= -g -L 2 -P - .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 TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} TARGET_CPUTYPE?=${CPUTYPE} .else TARGET?= ${TARGET_ARCH} TARGET_CPUTYPE?= .endif .if !empty(TARGET_CPUTYPE) _TARGET_CPUTYPE=${TARGET_CPUTYPE} .else _TARGET_CPUTYPE=dummy .endif _CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \ CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE .if ${_CPUTYPE} != ${_TARGET_CPUTYPE} .error CPUTYPE global should be set with ?=. .endif .if make(buildworld) BUILD_ARCH!= sysctl -n hw.machine_arch .if ${MACHINE_ARCH} != ${BUILD_ARCH} .error To cross-build, set TARGET_ARCH. .endif .endif .if ${MACHINE} == ${TARGET} OBJTREE= ${MAKEOBJDIRPREFIX} .else OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} # /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} INSTALLTMP!= /usr/bin/mktemp -d -u -t install # # 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 # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PIC -DNO_PROFILE \ -DNO_SHARED -DNO_CPU_CFLAGS -DNO_WARNS # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} .if ${MACHINE_ARCH} == "amd64" # 32 bit world LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 LIB32CC= ${LIB32PREFLAGS} \ ${LIB32POSTFLAGS} LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \ ${LIB32POSTFLAGS} LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \ ${LIB32POSTFLAGS} # Yes, the flags are redundant. LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ MACHINE_ARCH=i386 \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ CC="cc ${LIB32CC}" \ CXX="c++ ${LIB32CXX}" \ OBJC="cc ${LIB32OBJC}" \ LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ AS="as --32" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DNO_BIND -DNO_MAN -DNO_INFO -DNO_HTML \ CC="cc ${LIB32CC}" \ CXX="c++ ${LIB32CXX}" \ OBJC="cc ${LIB32OBJC}" \ LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ AS="as --32" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 .endif # install stage .if empty(.MAKEFLAGS:M-n) IMAKEENV= ${CROSSENV} \ PATH=${STRICTTMPPATH}:${INSTALLTMP} .else IMAKEENV= ${CROSSENV} \ PATH=${TMPPATH}:${INSTALLTMP} .endif IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 # kernel stage KMAKEENV= ${WMAKEENV} # # 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(NOCLEAN) +.if !defined(NO_CLEAN) rm -rf ${WORLDTMP} .else rm -rf ${WORLDTMP}/legacy/usr/include # XXX - These two can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ usr/bin usr/games usr/include/c++/3.4 usr/include/sys usr/lib \ usr/libexec usr/sbin usr/share/dict \ usr/share/groff_font/devX100 \ usr/share/groff_font/devX100-12 \ usr/share/groff_font/devX75 \ usr/share/groff_font/devX75-12 \ usr/share/groff_font/devascii \ usr/share/groff_font/devcp1047 \ usr/share/groff_font/devdvi \ usr/share/groff_font/devhtml \ usr/share/groff_font/devkoi8-r \ usr/share/groff_font/devlatin1 \ usr/share/groff_font/devlbp \ usr/share/groff_font/devlj4 \ usr/share/groff_font/devps \ usr/share/groff_font/devutf8 \ usr/share/tmac/mdoc usr/share/tmac/mm mkdir -p ${WORLDTMP}/legacy/${_dir} .endfor .for _dir in \ lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \ usr/libexec usr/sbin usr/share/misc \ usr/share/snmp/defs usr/share/snmp/mibs mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} .if defined(WITH_BIND_LIBS) && !defined(NO_BIND) 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(NOCLEAN) +.if !defined(NO_CLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} .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 -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_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 ${MACHINE_ARCH} == "amd64" build32: @echo @echo "--------------------------------------------------------------" @echo ">>> stage 5.1: building 32 bit shim libraries" @echo "--------------------------------------------------------------" .for _dir in \ lib lib32 usr/bin usr/include usr/lib32 usr/libdata/ldscripts \ usr/libexec usr/sbin usr/share/misc \ usr/share/snmp/defs usr/share/snmp/mibs mkdir -p ${LIB32TMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} .if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} .endfor .endif .for _t in obj includes cd ${.CURDIR}/include; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} cd ${.CURDIR}/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} cd ${.CURDIR}/gnu/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .if !defined(NO_CRYPT) cd ${.CURDIR}/secure/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .endif .if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) cd ${.CURDIR}/kerberos5/lib; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .endif .endfor .for _dir in usr.sbin/pcvt/keycap usr.bin/lex/lib cd ${.CURDIR}/${_dir}; \ ${LIB32MAKE} DESTDIR=${LIB32TMP} obj .endfor .for _dir in lib/libncurses lib/libmagic cd ${.CURDIR}/${_dir}; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} build-tools .endfor cd ${.CURDIR}; \ ${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries .for _t in obj depend all cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} .endfor install32: mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree cd ${.CURDIR}/lib; ${LIB32MAKE} install cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install .if !defined(NO_CRYPT) cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install .endif cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install .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 ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) WMAKE_TGTS+= build32 .endif buildworld: ${WMAKE_TGTS} .ORDER: ${WMAKE_TGTS} TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything} toolchain: ${TOOLCHAIN_TGTS} kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} # # Use this to add checks to installworld/installkernel targets. # SPECIAL_INSTALLCHECKS= # # The following install-time check will see if the installation will # change the type used for time_t, and if it will, the target makes # sure that the user is expecting to make that change. # .if ${TARGET_ARCH} == "sparc64" SPECIAL_INSTALLCHECKS+=sparc64_installcheck CUR_TIMET!= grep __time_t /usr/include/machine/_types.h | awk '{print $$2}' SRC_TIMET!= grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | \ awk '{print $$2}' NEWSPARC_TIMETYPE?=${CUR_TIMET} sparc64_installcheck: .if ${CUR_TIMET} != ${SRC_TIMET} @echo .if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} @echo "*** ERROR: This target would change the type used for time_t!" .else @echo "* Note: This installation changes the type used for time_t." .endif @echo "* " @echo "* This host has time_t defined as ${CUR_TIMET}," @echo "* and this installation would change that to type ${SRC_TIMET}." .if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} @echo "* " @echo "* If that is *NOT* what you wanted, then you need to change the" @echo "* typedef of __time_t in ${.CURDIR}/sys/sparc64/include/_types.h" @echo "* from '${SRC_TIMET}' to '${CUR_TIMET}'. After that you *MUST*" @echo "* do a complete cleanworld, buildworld, buildkernel before you" @echo "* retry the 'make' command. Also read /usr/src/UPDATING.64BTT." @echo "* " @echo "* If that *is* what you want, then enter the commands:" @echo " NEWSPARC_TIMETYPE=${SRC_TIMET}" @echo " export NEWSPARC_TIMETYPE" @echo "* and repeat your 'make' command." @echo false .endif @echo .elif ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} @echo @echo "*** ERROR: NEWSPARC_TIMETYPE is set to '${NEWSPARC_TIMETYPE}'" @echo "*** but ${.CURDIR}/sys/sparc64/include/_types.h" @echo "*** has __time_t defined as '${SRC_TIMET}'." false .else @# in sparc64_installcheck, all TIMETYPEs == '${CUR_TIMET}' .endif .endif # # installcheck # # Checks to be sure system is ready for installworld # CHECK_UIDS= CHECK_GIDS= .if !defined(NO_SENDMAIL) CHECK_UIDS+= smmsp CHECK_GIDS+= smmsp .endif .if !defined(NO_PF) CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf .endif installcheck: ${SPECIAL_INSTALLCHECKS} .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 # # distributeworld # # Distributes everything compiled by a `buildworld'. # # installworld # # Installs everything compiled by a 'buildworld'. # distributeworld installworld: installcheck mkdir -p ${INSTALLTMP} for prog in [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep \ ln make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ test true uname wc zic; do \ cp `which $$prog` ${INSTALLTMP}; \ done ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} 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: ${SPECIAL_INSTALLCHECKS} @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 ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif redistribute: @echo "--------------------------------------------------------------" @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute # # 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(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(NOCLEAN) && !defined(NO_KERNELCLEAN) +.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${CLEANDIR} .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ ${MAKE} -DNO_CPU_CFLAGS -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; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ ${MAKE} -DNO_CPU_CFLAGS ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.1: making dependencies" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend -DNO_MODULES_OBJ .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.2: building everything" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} 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: ${SPECIAL_INSTALLCHECKS} .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install." false .endif @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" cd ${.CURDIR}; \ ${CROSSENV} PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 hierarchy @echo @echo "--------------------------------------------------------------" @echo ">>> Installing kernel" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} # # 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 "--------------------------------------------------------------" .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) @echo "--------------------------------------------------------------" @echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS} .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: .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 !defined(NO_GAMES) _strfile= games/fortune/strfile .endif .if !defined(NO_CXX) _gperf= gnu/usr.bin/gperf .if ${BOOTSTRAPPING} < 500113 _groff= gnu/usr.bin/groff .else _groff= gnu/usr.bin/groff/tmac .endif .endif .if ${BOOTSTRAPPING} < 502102 _lex= usr.bin/lex .endif .if ${BOOTSTRAPPING} < 450005 || \ ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 _uudecode= usr.bin/uudecode .endif .if ${BOOTSTRAPPING} < 430002 || \ ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 _xargs= usr.bin/xargs .endif .if ${BOOTSTRAPPING} < 430002 || \ ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 _yacc= usr.bin/yacc .endif .if !defined(NO_RESCUE) && \ ${BOOTSTRAPPING} < 502128 _crunchgen= usr.sbin/crunch/crunchgen .endif .if ${BOOTSTRAPPING} < 502128 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif .if ${BOOTSTRAPPING} < 500019 _kbdcontrol= usr.sbin/kbdcontrol .endif bootstrap-tools: .for _tool in \ ${_strfile} \ ${_gperf} \ ${_groff} \ gnu/usr.bin/texinfo \ usr.bin/colldef \ ${_lex} \ usr.bin/makewhatis \ usr.bin/rpcgen \ ${_uudecode} \ ${_xargs} \ usr.bin/xinstall \ ${_yacc} \ usr.sbin/config \ ${_crunchgen} \ ${_gensnmptree} \ ${_kbdcontrol} ${_+_}@${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 !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) _kerberos5_tools= kerberos5/tools .endif .if !defined(NO_RESCUE) _rescue= rescue/rescue .endif build-tools: .for _tool in \ bin/csh \ bin/sh \ ${_rescue} \ lib/libncurses \ ${_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} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ ${BOOTSTRAPPING} < 500037 _elf2aout= usr.bin/elf2aout .endif .if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH} _btxld= usr.sbin/btxld .endif .if (!defined(NO_RESCUE) || \ defined(RELEASEDIR)) && \ (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101) _crunchide= usr.sbin/crunch/crunchide .endif .if ${TARGET_ARCH} == "alpha" && ${TARGET_ARCH} != ${MACHINE_ARCH} _elf2exe= usr.sbin/elf2exe .endif .if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ defined(RELEASEDIR) _kgzip= usr.sbin/kgzip .endif cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ ${_elf2aout} \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ ${_elf2exe} \ ${_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 _startup_libs; \ ${MAKE} -f Makefile.inc1 _prebuild_libs; \ ${MAKE} -f Makefile.inc1 _generic_libs; # These dependencies are not automatically generated: # # gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all # shared libraries for ELF. # _startup_libs= gnu/lib/csu gnu/lib/libgcc .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) _startup_libs+= lib/csu/${MACHINE_ARCH}-elf .else _startup_libs+= lib/csu/${MACHINE_ARCH} .endif _prebuild_libs= _generic_libs= gnu/lib .if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) _prebuild_libs+= kerberos5/lib/libasn1 _prebuild_libs+= kerberos5/lib/libgssapi _prebuild_libs+= kerberos5/lib/libkrb5 _prebuild_libs+= kerberos5/lib/libroken _generic_libs+= kerberos5/lib .endif _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \ lib/libkvm lib/libmd \ lib/libncurses lib/libnetgraph lib/libopie lib/libpam \ lib/libradius \ lib/libsbuf lib/libtacplus lib/libutil \ lib/libz lib/msun lib/libopie__L lib/libtacplus__L: lib/libmd__L .if !defined(NO_BIND) .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64" _prebuild_libs+= lib/libc_r .else _prebuild_libs+= lib/libpthread .endif .endif _generic_libs+= lib .if !defined(NO_CRYPT) .if !defined(NO_OPENSSL) _prebuild_libs+= secure/lib/libcrypto secure/lib/libssl lib/libradius__L: secure/lib/libssl__L secure/lib/libssl__L: secure/lib/libcrypto__L .if !defined(NO_OPENSSH) _prebuild_libs+= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if !defined(NO_KERBEROS) secure/lib/libssh__L: kerberos5/lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libasn1__L lib/libcom_err__L lib/libmd__L \ kerberos5/lib/libroken__L .endif .endif .endif _generic_libs+= secure/lib .endif .if defined(NO_CRYPT) || defined(NO_OPENSSL) lib/libradius__L: lib/libmd__L .endif .if !defined(NO_NIS) _prebuild_libs+= lib/libypclnt .endif _generic_libs+= usr.bin/lex/lib .if ${MACHINE_ARCH} == "i386" _generic_libs+= usr.sbin/pcvt/keycap .endif .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} ${_lib}__L: .PHONY .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (depend,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${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 (depend,all,install)"; \ cd ${.CURDIR}/lib/libpam; \ ${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 _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 diff --git a/release/Makefile b/release/Makefile index 4af7c4529791..7ecb756a8793 100644 --- a/release/Makefile +++ b/release/Makefile @@ -1,1224 +1,1224 @@ # $FreeBSD$ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] # # 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 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=6.0-CURRENT # # Automatic SNAP versioning: DATE != date +%Y%m%d BASE = 6.0 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set #RELEASETAG=RELENG_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 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" # # 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 # 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. # Similarly, you can specify make flags for make readmes via PORTREADMES_FLAGS. #WORLD_FLAGS=-j4 #KERNEL_FLAGS=-j4 #PORTREADMES_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 docs. 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). # # Setting this also disables building of release note documentation # (RELNOTESng). #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_EXTRA_BITS} to a directory containing # extra packages or other files. It will be appended to the disk 1 ISO. #CD_EXTRA_BITS= /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} .endif # Make changing names of disc1/disc2 CD's possible. DISC1_LABEL?= fbsd_miniinst DISC1_NAME?= miniinst DISC2_LABEL?= fbsd_livefs DISC2_NAME?= disc2 # 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.8 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is # controlled by the RELNOTES_LANG variable above.) #DOC_LANG= en_US.ISO8859-1 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= readme errata DIST_DOCS_ARCH_DEP= installation relnotes hardware .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 BASE_DISTS?= base DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} # mountpoint for filesystems. MNT= /mnt # Various floppy image parameters. # .undef MAKE_FLOPPIES .if ${TARGET_ARCH} == "i386" MAKE_FLOPPIES= true .if ${TARGET} == "pc98" 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} == "alpha" MAKE_FLOPPIES= true FLOPPYSIZE= 1440 FLOPPYSPLITSIZE= 1392 FLOPPYINODE= 40000 FLOPPYLABEL= fd1440 BOOTINODE= 80000 MFSSIZE= 4320 MFSINODE= 8000 MFSLABEL= auto SPLIT_MFSROOT= .elif ${TARGET_ARCH} == "sparc64" DISKLABEL= sunlabel MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto MINIROOT= .elif ${TARGET_ARCH} == "ia64" MFSSIZE= 8192 MFSINODE= 8192 MFSLABEL= auto .elif ${TARGET_ARCH} == "amd64" MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto .elif ${TARGET_ARCH} == "powerpc" DISKLABEL= "" MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto .endif .if defined(NO_FLOPPIES) .undef MAKE_FLOPPIES .endif .if exists(/sbin/bsdlabel) DISKLABEL?= bsdlabel .else DISKLABEL?= disklabel .endif ZIPNSPLIT= gzip --no-name -9 -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 .if ${TARGET} != "pc98" CD_BOOT= ${CD}/bootonly .endif CD_DISC1= ${CD}/disc1 CD_DISC2= ${CD}/disc2 _MK?= ${CHROOTDIR}/mk # Some architectures may not have space for the ports tree on disc2. # For these architectures there is no sense building the README.html # files no matter what. .if ${TARGET_ARCH} == "ia64" NOPORTREADMES= yes .endif # 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 .if defined(MAKE_ISOS) EXTRAS+= iso.1 .endif .if ${TARGET} == "pc98" BOOTABLE= .else BOOTABLE="-b" .endif .endif .if !defined(NODOC) DOCREL= doc.1 doc.2 .endif .if !make(release) && !make(rerelease) 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) || !defined(CVSROOT) @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false .endif .if defined(NOPORTSATALL) && !defined(NODOC) @echo "Ports are required for building the 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 noschg ${CHROOTDIR}/. -rm -rf ${CHROOTDIR} .endif mkdir -p ${CHROOTDIR} @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`" cd ${WORLDDIR} && ${NATIVEMAKE} -DNO_GAMES -DNO_HTML -DNO_INFO -DNO_MAN \ -DNO_PROFILE installworld DESTDIR=${CHROOTDIR} cd ${WORLDDIR}/etc && ${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 .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) cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE} .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) .if !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) cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d rm -f ${CHROOTDIR}/tmp/.skip_ports_index \ ${CHROOTDIR}/tmp/.skip_ports_readmes .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 # Add version information to those things that need it. if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \ cd ${CHROOTDIR}/usr/src/sys/conf && \ mv newvers.sh foo && \ sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && \ rm foo; \ fi -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_EXTRA_BITS \ DISC1_LABEL \ DISC1_NAME \ DISC2_LABEL \ DISC2_NAME \ DISTRIBUTIONS \ DOC_LANG \ DOMINIMALDOCPORTS \ EXTRA_SRC \ FTP_PASSIVE_MODE \ FTP_PROXY \ HTTP_PROXY \ KERNELS \ KERNEL_FLAGS \ MAKE_FLOPPIES \ MAKE_ISOS \ NOCDROM \ NODOC \ NOPORTS \ NO_SHARED \ NOSRC \ NO_CPU_CFLAGS \ NO_CPU_COPTFLAGS \ NO_FLOPPIES \ NO_SENDMAIL \ RELEASETAG \ RELNOTES_LANG \ 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 [ -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} -DNOCLEAN buildworld && \\" >> ${_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 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 "if [ ! -f /tmp/.skip_ports_readmes ]; then" >> ${_MK} echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK} echo " cd /usr/ports" >> ${_MK} echo " make ${PORTREADMES_FLAGS} readmes" >> ${_MK} echo " touch /tmp/.skip_ports_readmes" >> ${_MK} echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${_MK} echo "fi" >> ${_MK} echo "cd /usr/src/release" >> ${_MK} echo "make obj" >> ${_MK} echo "make \$${_RELTARGET}" >> ${_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 .if defined(NOPORTS) || defined(NOPORTREADMES) touch ${CHROOTDIR}/tmp/.skip_ports_readmes .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 mkdir ${RD}/kernels 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 touch ${.TARGET} # Install the system into the various distributions. release.2: cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base cd ${.CURDIR}/.. && ${CROSSMAKE} ${WORLD_FLAGS} distributeworld \ DISTDIR=${RD}/trees touch ${.TARGET} # Make and install the generic kernel(s). release.3: .for kernel in ${KERNELS} cd ${.CURDIR}/..; \ ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \ KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \ DESTDIR=${RD}/trees/base .endfor # Install a standard boot kernel+modules. cd ${.CURDIR}/..; \ ${CROSSMAKE} ${KERNEL_FLAGS} \ kernel \ DESTDIR=${RD}/trees/base; \ cd ${.CURDIR}/..; \ ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \ reinstallkernel -DINSTALL_DEBUG \ DESTDIR=${RD}/trees/base 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} 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} -depth -type d -print | xargs rmdir 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 .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 'ports/distfiles/*' \ --exclude README.html -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; \ md5 * > CHECKSUM.MD5) @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; md5 * > CHECKSUM.MD5) @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 @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 .if ${TARGET} == "pc98" cp ${.CURDIR}/../etc/defaults/pccard.conf \ ${RD}/mfsfd/etc/defaults/pccard.conf .endif cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf ( 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 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT \ ${RD}/mfsfd/stand/help/INSTALL.TXT .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 -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} @gzip -9fnv ${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: @gzip -9nc ${RD}/trees/base/boot/kernel/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: .if !defined(NODOC) @cp ${RND}/${RELNOTES_LANG}/installation/${TARGET}/article.txt \ ${RD}/floppies/README.TXT @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5) .else @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5) .endif 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} @mv ${FD}/INSTALLATION.TXT ${FD}/INSTALL.TXT @mv ${FD}/INSTALLATION.HTM ${FD}/INSTALL.HTM .endif @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf touch ${.TARGET} # # --==## Setup a suitable cdrom-area ##==-- # cdrom.1: @echo "Setting up CDROM distribution area" @mkdir -p ${CD_BOOT} ${CD_DISC1} ${CD_DISC2} -@ln -s . ${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} @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_DISC2} ) ; \ fi \ done @rm -f ${CD_DISC2}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf .if !defined(NOPORTS) && !defined(NOPORTREADMES) @tar --exclude CVS --exclude 'ports/distfiles/*' -czf - \ -C /usr ports | (cd ${CD_DISC2}/usr; tar -xpBf -) .endif .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} @mv ${CD_DISC1}/INSTALLATION.TXT ${CD_DISC1}/INSTALL.TXT @mv ${CD_DISC1}/INSTALLATION.HTM ${CD_DISC1}/INSTALL.HTM .endif .if ${TARGET} != "pc98" @echo "Setting up boot area" @rm -f ${CD_DISC2}/boot/loader.conf @cp ${RD}/mfsroot/mfsroot.gz ${CD_DISC2}/boot/mfsroot.gz @echo 'mfsroot_load="YES"' > ${CD_DISC2}/boot/loader.conf @echo 'mfsroot_type="mfs_root"' >> ${CD_DISC2}/boot/loader.conf @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/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_DISC2}/boot/device.hints @cp ${RD}/trees/base/boot/device.hints ${CD_DISC2}/boot/device.hints .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64" @echo 'hint.atkbd.0.flags="0x1"' >> ${CD_DISC2}/boot/device.hints .endif .endif .if defined(CD_BOOT) @cp -Rp ${CD_DISC2}/boot ${CD_BOOT} .if defined(MINIROOT) @mkdir -p ${FD}/miniroot @sh -e ${DOFS_SH} ${FD}/miniroot/miniroot.ufs \ ${RD} ${MNT} 0 ${CD_BOOT} 8192 auto @gzip -9v ${FD}/miniroot/miniroot.ufs .endif .endif @cp -Rp ${CD_DISC2}/boot ${CD_DISC1} .endif touch ${.TARGET} iso.1: .if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh) @echo "Creating ISO images..." .if defined(CD_BOOT) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ fbsd_bootonly \ ${CD}/${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} .endif @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ ${DISC1_LABEL} \ ${CD}/${BUILDNAME}-${TARGET}-${DISC1_NAME}.iso ${CD_DISC1} @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ ${DISC2_LABEL} \ ${CD}/${BUILDNAME}-${TARGET}-${DISC2_NAME}.iso ${CD_DISC2} .if defined(CD_EXTRA_BITS) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ fbsd_boot \ ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ ${CD_EXTRA_BITS} \ && false .endif @(cd ${CD} && md5 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5) touch ${.TARGET} .else @echo "Do not know how to create an ISO for ${TARGET_ARCH}." .endif # # --==## Documentation Project files such as the Handbook and FAQ ##==-- # doc.1: @echo "Making docs..." @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 @cd /usr/doc && make all install 'FORMATS=html html-split txt' \ INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc \ URLS_ABSOLUTE=YES 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='' 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' | cut -c1-8` && \ echo rolling ${TD}/$$tn tarball &&\ tar --exclude CVS --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; \ 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; \ md5 * > CHECKSUM.MD5 ) \ ) 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 \ gzip -9 < ${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= ${BOOTDIR}/kernel/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} == "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 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64" @echo 'hint.atkbd.0.flags="0x1"' >> ${IMAGEDIR}/boot/device.hints .endif @gzip -9n ${IMAGEDIR}/boot/device.hints .endif @gzip -9n ${IMAGEDIR}/boot/*.4th ${IMAGEDIR}/boot/loader.help \ ${IMAGEDIR}/boot/defaults/loader.conf @echo 'bootfile="/kernel"' > ${IMAGEDIR}/boot/loader.conf .if exists(${ACPI_KO}) @gzip -9nc ${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 ${TARGET_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT} @echo "-P" >> ${IMAGEDIR}/boot.config .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" .include diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd index ff6bf48fff8b..1f218051b8a0 100755 --- a/release/picobsd/build/picobsd +++ b/release/picobsd/build/picobsd @@ -1,958 +1,958 @@ #!/bin/sh - # # $FreeBSD$ # # The new PicoBSD build script. Invoked as # # picobsd [options] floppy_type site_name # # Where floppy_type is a directory where the picobsd config info # is held, and ${floppy_type}/floppy.tree.${site_name} contains # optional site-specific configuration. # # For Options, see the bottom of the file where the processing is # done. The picobsd(8) manpage might be of some help, but code and docs # tend to lose sync over time... # # This script depends on the following files: # # in ${PICO_TREE} : # Makefile.conf Makefile used to build the kernel # config shell variables, sourced here. # mfs.mtree mtree config file # # floppy.tree/ files which go on the floppy # mfs_tree/ files which go onto the mfs # # in ${MY_TREE} : # PICOBSD kernel config file # config shell variables, sourced here. # crunch.conf crunchgen configuration # floppy.tree.exclude files from floppy.tree/ which we do not need here. # floppy.tree/ local additions to the floppy.tree # floppy.tree.${site}/ same as above, site specific. # mfs_tree/ local additions to the mfs_free # #--- The main entry point is at the end. # # There are two set of initialization. The first one (set_defaults) # is done on entry to the script, and is used to set default values # for all variables which do not depend on floppy type and source tree. # # The second set is done after command line parsing, e.g. # to resolve dependencies on the source tree. # # Naming: # + variables that control operation (e.g. verbosity) and are generally # set from the command line have o_ ("option") as a name prefix # # + variables which contain pathnames and values that should not change # have c_ ("constant") as a name prefix # # + variables exported to Makefiles and subshells are CAPITAL # # + variables local to the script are lowercase, possibly with # an l_ ("local") prefix # SRC points to your FreeBSD source tree. # l_usrtree points to the /usr subdir for the source tree. # Normally /usr or ${SRC}/../usr # l_objtree points to the obj tree. Normally ${l_usrtree}/obj-pico # PICO_TREE is where standard picobsd stuff resides. # Normally ${SRC}/release/picobsd # You can set SRC with --src # It is not recommended to override the other variables. # MY_TREE (set later) is where this floppy type resides. # BUILDDIR is the build directory # set some default values for variables. # needs to be done as the first thing in the script. # log something on stdout if verbose. o_verbose=0 # this needs to be here! log() { if [ ${o_verbose} -gt 0 ] ; then printf "\n*** %s\n" "$*" if [ ${o_verbose} -gt 1 ] ; then read -p "=== Press enter to continue" foo fi fi } logverbose() { local foo printf "\n*** %s\n" "$*" read -p "=== Press enter to continue" foo } set_defaults() { # no way to use logging in this function, variable not set yet. # EDITOR is the editor you use # fd_size floppy size in KB (default to 1440). You can use 1480, # 1720, 2880, etc. but beware that only 1440 and 1480 will boot # from 1.44M floppy drives (1480 will not work on vmware). EDITOR=${EDITOR:-vi} fd_size=${fd_size:-1440} o_all_in_mfs="yes" # put all files in mfs so you can boot and run # the image via diskless boot. o_clean="" # do not clean o_interactive="" # default is interactive o_verbose=0 # verbose level, 0 is silent o_tarv="" # tar verbose flag, "" or "v" o_init_src="" # non "" if we need to init libs and includes. o_makeopts=${MAKEOPTS:--s} # make options, be silent by default o_no_devfs=yes # we do not want devfs o_do_modules="" # do not build modules SRC="/usr/src" # default location for sources c_startdir=`pwd` # directory where we start # used to lookup config and create BUILDDIR c_boot1=/boot/boot1 # boot blocks (in case you want custom ones) c_boot2=/boot/boot2 c_reply=${c_reply:-`mktemp "/tmp/reply.XXXXXXXXXX"`} # file where User replies will be put c_mnt=`mktemp -d "/tmp/picobsd.XXXXXXXXXX"` # mountpoint used to build memory filesystems c_fs=fs.PICOBSD # filename used for the memory filesystem c_img=picobsd.bin # filename used for the picobsd image # select the right memory disk name case `uname -r` in 5.*) l_vn="md" l_makedev="${SRC}/etc/MAKEDEV" ;; *) l_vn="vn" l_makedev="/dev/MAKEDEV" ;; esac l_newfs="-m 0 -o space -f 512 -b 4096" # Find a suitable vnode l_vnum=`mount | awk "/${l_vn}/ { num++ } END { printf \"%d\", num }"` l_vndev=${l_vn}${l_vnum} set -e trap fail 2 #trap fail 3 #trap fail 6 trap fail 15 free_vnode # cleanup old vnodes } create_includes_and_libraries2() { log "create_includes_and_libraries2() for ${SRC}" MAKEOBJDIRPREFIX=${l_objtree} export MAKEOBJDIRPREFIX ( cd ${SRC}; - make -DNOCLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R -DPICOBSD buildworld + make -DNO_CLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R -DPICOBSD buildworld ) } create_includes_and_libraries() { local e i log "create_includes_and_libraries() for ${SRC}" # Optionally creates include directory and libraries. mkdir -p ${l_usrtree}/include # the include directory... mkdir -p ${l_usrtree}/share/misc # a few things go here mkdir -p ${l_usrtree}/lib # libraries mkdir -p ${l_usrtree}/sbin # some binaries # override variables for ownershiip and destinations # BINOWN:BINGRP are also used for include files (cd ${SRC}; \ BINOWN=`id -un` BINGRP=`id -gn` \ DESTDIR=${l_usrtree}/.. \ make -m ${SRC}/share/mk includes ) || fail $? includes # Pick up the correct headers for libraries. CFLAGS="-nostdinc -I${l_usrtree}/include" ; export CFLAGS (cd ${SRC} # $e is the invocation of make with correct environment e="MAKEOBJDIRPREFIX=${l_objtree}/picobsd/libraries \ BINOWN=`id -un` BINGRP=`id -gn` \ DESTDIR=${l_usrtree}/.. \ make -m ${SRC}/share/mk \ -DNO_HTML -DNO_INFO -DNO_MAN -DNO_SHARE -DNO_FSCHG " log "do a 'make obj' in a few places." # This is very version-specific... The following works for 5.0 for i in lib secure/lib gnu/lib usr.sbin/pcvt/keycap \ gnu/usr.bin/perl usr.bin/lex usr.sbin/config ; do (cd ${i}; eval $e obj) done log "now make the static libraries" eval $e -DNO_PROFILE -DNO_PIC libraries (cd ${SRC}/usr.sbin/config eval $e # build binary eval $e install # install it ) ) || fail $? "libraries" log "Libraries done" } # set_type looks in user or system directories for the floppy type # specified as first argument, and sets variables according to the config. # file. Also sets MY_TREE and BUILDDIR and SITE set_type() { local a i log "set_type()" THETYPE=$1 SITE=$2 a=$1 for i in ${c_startdir}/${a} ${PICO_TREE}/${a} ; do log "set_type: checking $i" if [ -d $i -a -f $i/PICOBSD -a -f $i/crunch.conf ] ; then set -- `cat $i/PICOBSD | \ awk '/^#PicoBSD/ {print $2, $3, $4, $5, $6}'` if [ "$1" != "" ]; then MFS_SIZE=$1 ; init_name=$2 mfs_inodes=$3 ; fd_inodes=$4 name=`(cd $i ; pwd) ` name=`basename $name` MY_TREE=$i BUILDDIR=${c_startdir}/build_dir-${name} log "Matching file $name in $i" return ; fi fi done echo "Type $a NOT FOUND" } clean_tree() { log "clean_tree()" if [ "${name}" = "" ] ; then echo "---> Wrong floppy type" exit 3 fi rm -rf ${BUILDDIR} } # free as much as possible from the vnode free_vnode() { log "free_vnode() ${l_vndev} " umount ${c_mnt} 2> /dev/null || true umount /dev/${l_vndev} 2> /dev/null || true if [ "${l_vn}" = "vn" ] ; then vnconfig -u ${l_vndev} 2> /dev/null || true else mdconfig -d -u ${l_vnum} 2> /dev/null || true fi } # prepare a message to be printed in the dialog menus. set_msgs() { # OK log "set_msgs()" MSG1="Type: ${THETYPE} name $name" MSG="PicoBSD build -- Current parameters:\n\n\t1. ${MSG1}\n\ \t2. MFS size: ${MFS_SIZE} kB\n\ \t3. Site-info: ${SITE}\n\t4. Full-path: ${MY_TREE}\n" } # Main build procedure. build_image() { log "build_image() <${name}>" [ "${name}" != "" ] || fail $? bad_type clear set_msgs printf "${MSG}---> We'll use the sources living in ${SRC}\n\n" # read config variables from a global and then a type-specific file # basically STAND_LINKS and MY_DEVS, but can also override other # variables. # . ${PICO_TREE}/build/config if [ -f ${MY_TREE}/config ] ; then . ${MY_TREE}/config fi # location of the object directory PICO_OBJ=${l_objtree}/picobsd/${THETYPE} log "PICO_OBJ is ${PICO_OBJ}" if [ ${OSVERSION} -ge 500035 ] ; then MAKEOBJDIRPREFIX=${l_objtree} export MAKEOBJDIRPREFIX log `cd ${SRC}; make -f Makefile.inc1 -V WMAKEENV` eval export `cd ${SRC}; make -f Makefile.inc1 -V WMAKEENV` fi # create build directory and subtree mkdir -p ${BUILDDIR}/crunch # remove any old stuff rm -f ${BUILDDIR}/kernel.gz ${BUILDDIR}/${c_fs} # invoke commands to build a kernel do_kernel # fill a subdirectory with things that go into the floppy # (mostly /etc and similar stuff) populate_floppy_fs # populate it and produce a file with the MFS image populate_mfs_tree # things which go into mfs # create, mount and fill a filesystem with floppy image fill_floppy_image # copies everything into the floppy } build_package() { local z msg log "build_package()" touch build.status echo "##############################################" >>build.status echo "## `date` ">>build.status echo "##############################################" >>build.status for z in bridge dial router net isp ; do set_type ${z} echo "---------------------------------------------">>build.status echo "Building TYPE=${z}, SIZE=${MFS_SIZE}" >>build.status msg="(ok)" # error message build_image || msg="** FAILED! **" echo " ${msg}">>build.status # where do i put things ? # clean_tree done exit 0 } # Set build parameters interactively main_dialog() { local ans i l log "main_dialog()" while [ true ] ; do set_msgs rm ${c_reply} dialog --menu "PicoBSD build menu -- (29 sep 2001)" 19 70 12 \ N "--> READY, build it <---" \ T "${MSG1}" \ K "edit Kernel config file" \ E "Edit crunch.conf file" \ S "MFS Size: ${MFS_SIZE}kB" \ I "Init type: ${init_name}" \ F "Floppy size: ${fd_size}kB" \ M "MFS bytes per inode: ${mfs_inodes}" \ U "UFS bytes per inode: ${fd_inodes}" \ $ "Site-info: ${SITE}" \ Q "Quit" \ 2> ${c_reply} ans=`cat ${c_reply}` rm ${c_reply} case ${ans} in T) l="" for i in ${c_startdir} ${c_startdir}/* ${PICO_TREE}/* ; do if [ -d $i -a -f $i/PICOBSD -a -f $i/crunch.conf ]; then l="$l `basename $i` `basename $i`" fi done log $l { dialog --menu "Setup the type of configuration" 12 70 5 $l \ 2> ${c_reply} && set_type "`cat ${c_reply}`" ${SITE} ; } || true ;; I) { dialog --menu "Choose your init(8) program" \ 10 70 2 init "Standard init (requires getty)" \ oinit "small init from TinyWare" 2> ${c_reply} \ && init_name=`cat ${c_reply}` ; } || true ;; K) ${EDITOR} ${MY_TREE}/PICOBSD ;; E) ${EDITOR} ${MY_TREE}/crunch.conf ;; S) { dialog --title "MFS Size setup" --inputbox \ "MFS size depends on what you need to put on the MFS image. Typically \ ranges between 820kB (for very small bridge/router images) to \ as much as 2500kB kB for a densely packed image. \ Keep in mind that this memory is \ totally lost to other programs. Usually you want to keep \ this as small as possible. " 10 70 2> ${c_reply} \ && MFS_SIZE=`cat ${c_reply}` ; } || true ;; \$) { dialog --title "Site info setup" --inputbox \ "Please enter the full path to the directory \ containing site-specific setup. \ This directory tree must contain files that replace \ standard ones in floppy.tree/ and mfs.tree/ . " \ 10 70 2> ${c_reply} && SITE=`cat ${c_reply}` ; } || true ;; F) { dialog --menu "Set floppy size" 15 70 4 \ 1440 "1.44MB" 1720 "1.72MB" 2880 "2.88MB" 4096 "4MB" \ 2> ${c_reply} && fd_size=`cat ${c_reply}` ; } || true ;; M) { dialog --title "MFS bytes per inode:" --inputbox \ "Enter MFS bytes per inode (typically 4096..65536). \ A larger value means fewer inodes but more space on MFS" \ 10 70 2> ${c_reply} && mfs_inodes=`cat ${c_reply}` ; } || true ;; U) { dialog --title "Floppy bytes per inode:" --inputbox \ "Enter floppy bytes per inode (typically 3072..65536). \ A larger value means fewer inodes but more space on the floppy." \ 10 70 2> ${c_reply} && fd_inodes=`cat ${c_reply}` ; } || true ;; N) break 2 ;; Q) exit 0 ;; *) echo "Unknown option \"${ans}\". Try again." sleep 2 clear ;; esac done } # Call the build procedure # Install image do_install() { log "do_install()" if [ "${o_interactive}" = "NO" ] ; then echo "+++ Build completed +++" cat .build.reply return fi dialog --title "Build ${THETYPE} completed" --inputbox \ "\nThe build process was completed successfuly.\n\ `cat .build.reply` \n\n\ Now we are going to install the image on the floppy.\n\ Please insert a blank floppy in /dev/fd0.\\n WARNING: the contents of the floppy will be permanently erased!\n\ \n\ Your options:\n\ * ^C or [Cancel] to abort,\n\ * Enter to install ${c_img},\n\ " 20 80 2> ${c_reply} if [ "$?" = "0" ]; then echo "Writing ${c_img}..." dd if=${BUILDDIR}/${c_img} of=/dev/fd0.${fd_size} else echo "Ok, the image is in ${c_img}" fi echo "Done." } #------------------------------------------------------------------- # invoke the Makefile to compile the kernel. do_kernel() { # OK log "do_kernel() Preparing kernel \"$name\" in $MY_TREE" (cd $MY_TREE; export name SRC BUILDDIR # used in this makefile ; # export CONFIG if [ "${o_do_modules}" = "yes" ] ; then MODULES="" export MODULES fi make -m ${SRC}/share/mk -v -f ${PICO_TREE}/build/Makefile.conf ) || \ fail $? missing_kernel } # Populate the variable part of the floppy filesystem. Must be done before # the MFS because its content might need to be copied there as well. # # This involves fetching files from three subtrees, in this order: # # 1. a standard one, from which type-specific files are excluded; # 2. a type-specific one; # 3. a site-specific one. # # Files are first copied to a local tree and then compressed. populate_floppy_fs() { # OK local dst excl srcdir log "populate_floppy_fs()" dst=${BUILDDIR}/floppy.tree log "pwd=`pwd` Populating floppy filesystem..." # clean relics from old compilations. rm -rf ${dst} || true mkdir ${dst} excl=${MY_TREE}/floppy.tree.exclude if [ -f ${excl} ] ; then excl="--exclude-from ${excl}" log "Files excluded from generic tree: `echo;cat ${excl}`" else excl="" fi (cd ${PICO_TREE}/floppy.tree ; tar -cf - --exclude CVS ${excl} . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from generic floppy-tree `echo; ls -laR ${dst}`" srcdir=${MY_TREE}/floppy.tree if [ -d ${srcdir} ] ; then log "update with type-specific files:" (cd ${srcdir} ; tar -cf - --exclude CVS . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from type floppy-tree `echo; ls -laR ${dst}`" else log "No type-specific floppy-tree" fi if [ -d ${srcdir}.${SITE} ] ; then log "Update with site-specific (${SITE}) files:" (cd ${srcdir}.${SITE} ; tar -cf - --exclude CVS . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from site floppy-tree `echo; ls -laR ${dst}`" else log "No site-specific floppy-tree" fi # gzip returns an error if it fails to compress some file (cd $dst ; gzip -9 etc/* log "Compressed files in etc/ `echo; ls -l etc`" ) || true } create_mfs() { # OK log "create_mfs() Preparing MFS filesystem..." free_vnode # zero-fill the MFS image init_fs_image ${BUILDDIR}/${c_fs} ${MFS_SIZE} log "Labeling MFS image" # Disklabel "auto" behaves strangely for sizes < 1024K. Basically # it fails to install a label on the system. On the other hand, # if you provide a specific disk type, the boot code is not # installed so you have more space on the disk... # For small image sizes, use std disktypes if [ ${MFS_SIZE} -lt 1024 ] ; then disklabel -rw ${l_vndev} fd${MFS_SIZE} || fail $? mfs_disklabel else disklabel -rw ${l_vndev} auto || fail $? mfs_disklabel fi newfs -i ${mfs_inodes} ${l_newfs} /dev/${l_vndev}c > /dev/null mount /dev/${l_vndev}c ${c_mnt} || fail $? no_mount log "`df /dev/${l_vndev}c`" } # Populate the memory filesystem with binaries and non-variable # configuration files. # First do an mtree pass, then create directory links and device entries, # then run crunchgen etc. to build the binary and create links. # Then copy the specific/generic mfs_tree. # Finally, if required, make a copy of the floppy.tree onto /fd populate_mfs_tree() { local a dst log "populate_mfs_tree()" early_mfs_mount=0 if [ "${early_mfs_mount}" = "1" ] ; then create_mfs dst=${c_mnt} else dst=${BUILDDIR}/mfs.tree # clean relics from old compilations. rm -rf ${dst} || true mkdir ${dst} fi log "pwd=`pwd`, Populating MFS tree..." # use type-specific mfs.mtree, default to generic one. a=${MY_TREE}/mfs.mtree [ -f ${a} ] || a=${PICO_TREE}/build/mfs.mtree log "Running mtree using $a..." mtree -deU -f $a -p ${dst} > /dev/null || fail $? mtree # XXX create links for i in ${STAND_LINKS}; do ln -s /stand ${dst}/$i done ln -s /dev/null ${dst}/var/run/log ln -s /etc/termcap ${dst}/usr/share/misc/termcap ( cd ${BUILDDIR}/crunch log "Making and installing crunch1 from `pwd` src ${SRC}..." a=${BUILDDIR}/crunch1.conf ( export BUILDDIR SRC MY_TREE PICO_OBJ ; make -m ${SRC}/share/mk \ -v -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk ) log "Libs are ${LIBS} " export SRC # used by crunch.mk # export LIBS CFLAGS log "Now make -f crunch.mk" make -m ${SRC}/share/mk ${o_makeopts} -f ${BUILDDIR}/crunch.mk strip --remove-section=.note --remove-section=.comment crunch1 mv crunch1 ${dst}/stand/crunch chmod 555 ${dst}/stand/crunch log "Making links for binaries..." for i in `crunchgen -l $a` ; do ln ${dst}/stand/crunch ${dst}/stand/${i}; done # rm $a # do not remove! ) || fail $? crunch if [ -f ${dst}/stand/sshd ] ; then log "Setting up host key for sshd:" if [ -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key.gz ] ; then log "Using existing host key" else log "Generating new host key" ssh-keygen -t rsa1 -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key \ -N "" -C "root@picobsd" gzip -9 ${BUILDDIR}/floppy.tree/etc/ssh_host_key* || true fi fi log "Copy generic and site-specific MFS tree..." for MFS_TREE in ${PICO_TREE}/mfs_tree ${MY_TREE}/mfs_tree ; do if [ -d ${MFS_TREE} ] ; then log "Copy ${MFS_TREE} ..." (cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) fi done if [ "${o_all_in_mfs}" = "yes" ]; then log "Copy generic floppy_tree into MFS..." cp -Rp ${BUILDDIR}/floppy.tree/* ${dst}/fd fi [ "`id -u`" = "0" ] || cat <<__EOF ### ------------------------------------------------------------------- ### ### WARNING: You are not running with root permissions, so the next ### stages are likely to fail because they call commands such as ### chown, {vn|md}config, mount/umount which need adequate rights. ### ### The results of the compilation so far is in directory ### ${BUILDDIR} ### which has the following content: `ls -l ${BUILDDIR}` ### ### ------------------------------------------------------------------- __EOF if [ "${o_no_devfs}" != "" ] ; then # create device entries using MAKEDEV (cd ${dst}/dev ln -s ${l_makedev} ; chmod 555 MAKEDEV ./MAKEDEV ${MY_DEVS} rm MAKEDEV ) fi log "Fixing permissions" (cd ${dst}; chown -R root . ) if [ -n "${import_files}" ] ; then log "importing ${import_files} into mfs" # We do it in a chroot environment on the target so # symlinks are followed correctly. cp `which tar` ${dst}/my_copy_of_tar (cd ${l_usrtree}/.. ; tar cf - ${import_files} ) | \ (chroot ${dst} /my_copy_of_tar xf - ) rm ${dst}/my_copy_of_tar fi if [ "${early_mfs_mount}" != "1" ] ; then create_mfs log "Copy mfs tree into file" (cd ${dst} ; tar cf - . ) | ( cd ${c_mnt} ; tar xf - ) fi # now umount and fsck the filesystem. log "Status of mfs image" df -ik ${c_mnt} umount ${c_mnt} fsck -p /dev/${l_vndev}c free_vnode } final_cleanup() { log "final_cleanup()" free_vnode rm -rf ${c_mnt} ${c_reply} 2> /dev/null || true rm -f ${c_reply} } # fail errno errcode # This function is used to trap errors and print msgs # fail() { local errno errocode where errno=$1 errcode=$2 where=$3 echo "---> fail: Error <${errno}> error code <${errcode}> in <${where}>" case ${errcode} in no_vnconfig) echo "Error in vnconfig on /dev/${l_vndev}..." echo "Either you are not running as root or your running kernel" echo "does not have the ${l_vn}(4) device." ;; mfs_disklabel) echo "Error while labeling ${c_fs} size ${MFS_SIZE}" ;; no_mount) echo "Error while mounting ${c_fs} (/dev/${l_vndev}c) on ${c_mnt}" ;; mtree) echo "Error while making hierarchy in ${c_mnt}" ;; crunch) echo "Error while building ${name}." ;; floppy_disklabel) echo "Error while doing disklabel on of floppy.img size $fd_size" ;; missing_kernel) echo "Error: you must build PICOBSD${suffix} kernel first" ;; includes) echo "Error: failed while making includes" ;; libraries) echo "Error: failed while making libraries" ;; bad_type) echo "Error: unknown floppy type ${name}" ;; no_space) echo "Error: no space left on device (${where})" ;; no_mfs) echo "Error: while writing MFS into the kernel." ;; "") echo "User break" errcode="userbreak" ;; *) echo "unknown error, maybe user break: $errno $errcode" ;; esac echo "---> Aborting $0" # try to cleanup the vnode. final_cleanup exit 2 } # # Create a zero-filled disk image with a boot sector, and vnconfig it. # init_fs_image() { # filename size_in_kbytes local imgname imgsize log "init_fs_image() $1 $2" imgname=$1 ; imgsize=$2 dd if=/dev/zero of=${imgname} count=${imgsize} bs=1k 2> /dev/null dd if=${c_boot1} of=${imgname} conv=notrunc 2> /dev/null if [ "${l_vn}" = "vn" ] ; then vnconfig -c -s labels ${l_vndev} ${imgname} || fail $? no_vnconfig else mdconfig -a -t vnode -u ${l_vnum} -f ${imgname} || fail $? no_vnconfig fi } fill_floppy_image() { local blocks sectors dst log "fill_floppy_image()" dst=${c_mnt} # where to create the image log "Preparing ${fd_size}kB floppy filesystem..." # correct block and number of sectors according to size. blocks=${fd_size}; sectors=18 if [ "${blocks}" = "1720" ]; then blocks=1722 ; sectors=21 elif [ "${blocks}" = "1480" ]; then blocks=1476 ; fi init_fs_image ${BUILDDIR}/${c_img} ${blocks} log "Labeling floppy image" b2=${BUILDDIR}/boot2 # modified boot2 cp ${c_boot2} ${b2} chmod 0644 ${b2} set `strings -at d ${b2} | grep "/boot/loader"` echo -e "/kernel\0\0\0\0\0" | dd of=${b2} obs=$1 oseek=1 conv=notrunc chmod 0444 ${b2} # create a disklabel ... disklabel -Brw -b ${c_boot1} -s ${b2} ${l_vndev} auto || \ fail $? floppy_disklabel # and copy partition c: into partition a: using some sed magic disklabel ${l_vndev} | sed -e '/ c:/{p;s/c:/a:/;}' | \ disklabel -R ${l_vndev} /dev/stdin log "Newfs floppy image" newfs -i ${fd_inodes} ${l_newfs} /dev/${l_vndev}a > /dev/null log "Mounting floppy image" mount /dev/${l_vndev}a ${dst} ( cd ${BUILDDIR} # $1 takes the offset of the MFS filesystem set `strings -at d kernel | grep "MFS Filesystem goes here"` mfs_ofs=$(($1 + 8192)) log "Preload kernel with file ${c_fs} at ${mfs_ofs}" dd if=${c_fs} ibs=8192 iseek=1 of=kernel obs=${mfs_ofs} \ oseek=1 conv=notrunc log "Compress with kgzip and copy to floppy image" kgzip -o kernel.gz kernel cp -p kernel.gz ${dst}/kernel || fail $? no_space "copying kernel" log "now transfer floppy tree if needed" # now transfer the floppy tree. If it is already in mfs, dont bother. if [ "${o_all_in_mfs}" != "yes" ] ; then cp -Rp floppy.tree/* ${dst} || \ fail $? no_space "copying floppy tree" fi ) (log "Fixing permissions"; cd ${dst}; chown -R root *) # rm -rf ${BUILDDIR}/floppy.tree || true # cleanup df -ik ${dst} | colrm 70 > .build.reply free_vnode rm -rf ${dst} rm ${BUILDDIR}/kernel.gz ${BUILDDIR}/${c_fs} } # This function creates variables which depend on the source tree in use: # SRC, l_usrtree, l_objtree # Optionally creates libraries, includes and the like (for cross compiles, # needs to be done once). set_build_parameters() { log "set_build_parameters() SRC is ${SRC}" if [ "${SRC}" = "/usr/src" ] ; then l_usrtree=${USR:-/usr} else l_usrtree=${USR:-${SRC}/../usr} fi l_objtree=${l_usrtree}/obj-pico PICO_TREE=${PICO_TREE:-${SRC}/release/picobsd} set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h` OSVERSION=$3 log "OSVERSION is ${OSVERSION}" if [ "${o_init_src}" != "" ] ; then if [ ${OSVERSION} -lt 500035 ] ; then create_includes_and_libraries else create_includes_and_libraries2 fi fi if [ ${OSVERSION} -lt 500035 ] ; then # Create the right LIBS and CFLAGS for further builds. # and build the config program LIBS="-L${l_usrtree}/lib" CFLAGS="-nostdinc -I${l_usrtree}/include" export LIBS CFLAGS CONFIG=${l_usrtree}/sbin/config export CONFIG fi } #------------------------------------------------------------------- # Main entry of the script. Initialize variables, parse command line # arguments. set_defaults while [ true ]; do case $1 in --src) # set the source path instead of /usr/src SRC=`(cd $2; pwd)` shift ;; --init) o_init_src="YES" ;; --floppy_size) fd_size=$2 shift ;; --all_in_mfs) o_all_in_mfs="yes" ;; --no_all_in_mfs) o_all_in_mfs="" ;; --modules) # also build kernel modules o_do_modules="yes" ;; -n) o_interactive="NO" ;; -clear|-clean|-c) # clean o_clean="YES" o_interactive="NO" ;; -v) # need -v -v to wait for user input o_verbose=$((${o_verbose}+1)) # verbose level o_tarv="v" # tar verbose flag o_makeopts="-d l" # be verbose ;; *) break ; ;; esac shift done set_build_parameters # things that depend on ${SRC} set_type $1 $2 # type and site, respectively # If $1="package", it creates a neat set of floppies if [ "$1" = "package" ] ; then build_package fi if [ "${o_interactive}" != "NO" ] ; then main_dialog fi if [ "${o_clean}" = "YES" ] ; then clean_tree else build_image do_install fi final_cleanup exit 0 diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index f2394bfcc688..fef329e78ce2 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -1,832 +1,832 @@ .\" Copyright (c) 2000 .\" Mike W. Meyer .\" .\" 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. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. .\" .\" $FreeBSD$ .\" .Dd December 21, 2004 .Dt MAKE.CONF 5 .Os .Sh NAME .Nm make.conf .Nd system build information .Sh DESCRIPTION The file .Nm contains settings that control the compilation of the .Fx sources and ported applications. The file .Nm is generally created by the system administrator when the values need to be changed from their defaults. .Pp The purpose of .Nm is not to run commands or perform compilation actions directly. Instead, it is included by the various makefiles in .Pa /usr/src , .Pa /usr/ports and .Pa /usr/doc which conditionalize their internal actions according to the settings found there. .Pp The .Pa /etc/make.conf file is included from the appropriate .Pa Makefile which specifies the default settings for all the available options. Options need only be specified in .Pa /etc/make.conf when the system administrator wishes to override these defaults. .Pp The build procedures occur in four broad areas: the world, the kernel, documentations and ports. Variables set in .Nm may be applicable during builds in one, two, or all four of these areas. They may be specified for a particular build via the .Fl D option of .Xr make 1 . .Pp The following lists provide a name and short description for each variable you can use during the indicated builds. The values of variables flagged as .Vt bool are ignored; the variable being set at all (even to .Dq Li FALSE or .Dq Li NO ) causes it to be treated as if it were set. .Pp The following list provides a name and short description for variables that are used for all builds, or are used by the .Pa makefiles for things other than builds. .Bl -tag -width Ar .It Va ALWAYS_CHECK_MAKE .Pq Vt bool Instructs the top-level makefile in the source tree (normally .Pa /usr/src ) to always check if .Xr make 1 is up-to-date. Normally this is only done for the world and buildworld targets to handle upgrades from older versions of .Fx . .It Va CFLAGS .Pq Vt str Controls the compiler setting when compiling C code. Optimization levels other than .Fl O and .Fl O2 are not supported. .Va BDECFLAGS is provided as a set of .Xr gcc 1 settings suggested by .An "Bruce Evans" Aq bde@FreeBSD.org for developing and testing changes. They can be used, if set, by: .Pp .Bd -literal -offset indent CFLAGS+=${BDECFLAGS} .Ed .It Va CPUTYPE .Pq Vt str Controls which processor should be targeted for generated code. This controls processor-specific optimizations in certain code (currently only OpenSSL) as well as modifying the value of .Va CFLAGS and .Va COPTFLAGS to contain the appropriate optimization directive to .Xr gcc 1 . The automatic setting of .Va CFLAGS and .Va COPTFLAGS may be overridden using the .Va NO_CPU_CFLAGS and .Va NO_CPU_COPTFLAGS variables, respectively. Refer to .Pa /usr/share/examples/etc/make.conf for a list of recognized .Va CPUTYPE options. .It Va NO_CPU_CFLAGS .Pq Vt str Setting this variable will prevent CPU specific compiler flags from being automatically added to .Va CFLAGS during compile time. .It Va NO_CPU_COPTFLAGS .Pq Vt str Setting this variable will prevent CPU specific compiler flags from being automatically added to .Va COPTFLAGS during compile time. .It Va CVS_UPDATE .Pq Vt bool Set this to use .Xr cvs 1 to update your ports with .Dq Li "make update" . .It Va CXXFLAGS .Pq Vt str Controls the compiler settings when compiling C++ code. .Va CXXFLAGS is initially set to the value of .Va CFLAGS . If you want to add to the .Va CXXFLAGS value, use .Dq Li += instead of .Dq Li = . .It Va INSTALL .Pq Vt str the default install command. To install only files for which the target differs or does not exist, use .Bd -literal -offset indent INSTALL="install -C" .Ed Note that some makefiles (including those in .Pa /usr/share/mk ) may hardcode options for the supplied install command. .It Va LOCAL_DIRS .Pq Vt str List any directories that should be entered when doing make's in .Pa /usr/src in this variable. .It Va MAKE_SHELL .Pq Vt str Controls the shell used internally by .Xr make 1 to process the command scripts in makefiles. .Xr sh 1 , .Xr ksh 1 , and .Xr csh 1 all currently supported. .Pp .Dl "MAKE_SHELL?=sh" .It Va MTREE_FOLLOWS_SYMLINKS .Pq Vt str Set this to .Dq Fl L to cause .Xr mtree 8 to follow symlinks. .It Va NO_DOCUPDATE .Pq Vt bool Set this to not update the doc tree during .Dq Li "make update" . .It Va NO_PORTSUPDATE .Pq Vt bool Set this to not update the ports tree during .Dq Li "make update" . .It Va SUP_UPDATE .Pq Vt bool Set this to use .Xr cvsup 1 to update your ports with .Dq Li "make update" . .It Va SUP .Pq Vt str The location of the .Xr cvsup 1 command for .Dq Li "make update" . .It Va SUPFLAGS .Pq Vt str The flag for the .Xr sup 1 command when doing .Dq Li "make update" . This defaults to .Op Fl g L Ar 2 . .It Va SUPHOST .Pq Vt str The hostname of the sup server to use when doing .Dq Li "make update" . .It Va SUPFILE .Pq Vt str The first .Ar supfile to use when doing a .Dq Li "make update" . This defaults to .Pa /usr/share/examples/cvsup/standard\-supfile . .It Va SUPFILE1 .Pq Vt str The second .Ar supfile to use when doing a .Dq Li "make update" . This defaults to .Pa /usr/share/examples/cvsup/secure\-supfile . .It Va SUPFILE2 .Pq Vt str The third .Ar supfile to use when doing a .Dq Li "make update" . This defaults to .Pa /usr/share/examples/cvsup/secure\-supfile . .It Va PORTSSUPFILE .Pq Vt str The ports .Ar supfile to use when doing a .Dq Li "make update" . This defaults to .Pa /usr/share/examples/cvsup/ports\-supfile . .It Va DOCSUPFILE .Pq Vt str The documentation .Ar supfile to use when doing a .Dq Li "make update" . This defaults to .Pa /usr/share/examples/cvsup/doc\-supfile . .El .Pp The following list provides a name and short description for variables that are only used doing a kernel build: .Bl -tag -width Ar .It Va BOOT_COMCONSOLE_PORT .Pq Vt str The port address to use for the console if the boot blocks have been configured to use a serial console instead of the keyboard/video card. .It Va BOOT_COMCONSOLE_SPEED .Pq Vt int The baud rate to use for the console if the boot blocks have been configured to use a serial console instead of the keyboard/video card. .It Va BOOTWAIT .Pq Vt int Controls the amount of time the kernel waits for a console keypress before booting the default kernel. The value is approximately milliseconds. Keypresses are accepted by the BIOS before booting from disk, making it possible to give custom boot parameters even when this is set to 0. .It Va COPTFLAGS .Pq Vt str Controls the compiler settings when building the kernel. Optimization levels above .Oo Fl O ( O2 , No ...\& ) Oc are not guaranteed to work. .It Va KERNCONF .Pq Vt str Controls which kernel configurations will be built by .Dq Li "${MAKE} buildkernel" and installed by .Dq Li "${MAKE} installkernel" . For example, .Bd -literal -offset indent KERNCONF=MINE DEBUG GENERIC OTHERMACHINE .Ed .Pp will build the kernels specified by the config files .Pa MINE , DEBUG , GENERIC , and .Pa OTHERMACHINE , and install the kernel specified by the config file .Pa MINE . It defaults to .Pa GENERIC . .It Va LOADER_TFTP_SUPPORT .Pq Vt bool While not a buildkernel-affected option, there is no better place for this. By default the .Xr pxeboot 8 loader retrieves the kernel via NFS. Defining this and recompiling .Pa /usr/src/sys/boot will cause it to retrieve the kernel via TFTP. This allows .Xr pxeboot 8 to load a custom BOOTP diskless kernel yet still mount the server's .Pa / rather than load the server's kernel. .It Va MODULES_OVERRIDE .Pq Vt str Set to a list of modules to build instead of all of them. .It Va PORTS_MODULES Set this to the list of ports you wish to rebuild every time the kernel is built. .It Va NO_KERNELCONFIG .Pq Vt bool Set this to skip running .Xr config 8 during .Dq Li "${MAKE} buildkernel" . .It Va NO_KERNELDEPEND .Pq Vt bool Set this to skip running .Dq Li "${MAKE} depend" during .Dq Li "${MAKE} buildkernel" . .It Va NO_MODULES .Pq Vt bool Set to not build modules with the kernel. .El .Pp The following list provides a name and short description for variables that are used during the world build: .Bl -tag -width Ar .It Va MAKE_IDEA .Pq Vt bool Set to build the IDEA encryption code. This code is patented in the USA and many European countries. It is .Em "YOUR RESPONSIBILITY" to determine if you can legally use IDEA. .It Va NO_DYNAMICROOT .Pq Vt bool Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va NO_KERBEROS .Pq Vt bool Set this if you do not want to build Kerberos 5 (KTH Heimdal). .It Va ENABLE_SUID_K5SU .Pq Vt bool Set this if you wish to use the ksu utility. Otherwise, it will be installed without the set-user-ID bit set. .It Va ENABLE_SUID_NEWGRP .Pq Vt bool Set this to install .Xr newgrp 1 with the set-user-ID bit set. Otherwise, .Xr newgrp 1 will not be able to change users' groups. .It Va ENABLE_SUID_SSH .Pq Vt bool Set this to install .Xr ssh 1 with the set-user-ID bit turned on. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. .It Va NO_BLUETOOTH .Pq Vt bool Set to not build Bluetooth related kernel modules, programs and libraries. .It Va NO_BOOT .Pq Vt bool Set to not build the boot blocks and loader. .It Va NO_CVS .Pq Vt bool Set to not build CVS. .It Va NO_CXX .Pq Vt bool Set to not build .Xr g++ 1 and related libraries. .It Va NO_FORTRAN .Pq Vt bool Set to not build .Xr g77 1 and related libraries. .It Va NO_GDB .Pq Vt bool Set to not build .Xr gdb 1 . .It Va NO_I4B .Pq Vt bool Set to not build isdn4bsd package. .It Va NO_IPFILTER .Pq Vt bool Set to not build IP Filter package. .It Va NO_PF .Pq Vt bool Set to not build PF firewall package. .It Va NO_AUTHPF .Pq Vt bool Set to not build .Xr authpf 8 . .It Va NO_TOOLCHAIN .Pq Vt bool Set to not build programs used for program development, compilers, debuggers etc. .It Va NO_INET6 .Pq Vt bool Set to not build programs and libraries related to IPv6 networking. .It Va NO_ATM .Pq Vt bool Set to not build programs and libraries related to ATM networking. .It Va NO_USB .Pq Vt bool Set to not build .Xr usbd 8 and related programs. .It Va NO_LPR .Pq Vt bool Set to not build .Xr lpr 1 and related programs. .It Va NO_ACPI .Pq Vt bool Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va NO_MAILWRAPPER .Pq Vt bool Set to not build the .Xr mailwrapper 8 MTA selector. .It Va NO_MAN .Pq Vt bool Set to not build manual pages. .It Va NO_NIS .Pq Vt bool Set to not build .Xr NIS 8 support and related programs. .It Va NO_OBJC .Pq Vt bool Set to not build Objective C support. .It Va NO_OPENSSH .Pq Vt bool Set to not build OpenSSH. .It Va NO_OPENSSL .Pq Vt bool Set to not build OpenSSL (implies .Va NO_KERBEROS and .Va NO_OPENSSH ) . .It Va NO_SENDMAIL .Pq Vt bool Set to not build .Xr sendmail 8 and related programs. .It Va NO_SHAREDOCS .Pq Vt bool Set to not build the .Bx 4.4 legacy docs. .It Va NO_TCSH .Pq Vt bool Set to not build and install .Pa /bin/csh (which is .Xr tcsh 1 ) . -.It Va NOCLEAN +.It Va NO_CLEAN .Pq Vt bool Set this to disable cleaning during .Dq Li "make buildworld" . This should not be set unless you know what you are doing. -.It Va NOCLEANDIR +.It Va NO_CLEANDIR .Pq Vt bool Set this to run .Dq Li "${MAKE} clean" instead of .Dq Li "${MAKE} cleandir" . .It Va NO_CRYPT .Pq Vt bool Set to not build any crypto code. .It Va NO_GAMES .Pq Vt bool Set to not build games. .It Va NO_INFO .Pq Vt bool Set to not make or install .Xr info 5 files. .It Va NO_LIBC_R .Pq Vt bool Set to not build .Nm libc_r (reentrant version of .Nm libc ) . .It Va NO_LIBPTHREAD .Pq Vt bool Set to not build the .Nm libpthread (M:N threading) library. .It Va NO_LIBTHR .Pq Vt bool Set to not build the .Nm libthr (1:1 threading) library. .It Va NO_MANCOMPRESS .Pq Vt bool Set to install man pages uncompressed. .It Va NO_PROFILE .Pq Vt bool Set to avoid compiling profiled libraries. .It Va NO_SHARE .Pq Vt bool Set to not build in the .Pa share subdir. .It Va NO_SHARED .Pq Vt bool Set to not build .Pa /bin and .Pa /sbin dynamically linked, this can be bad. .It Va NO_BIND .Pq Vt bool Setting this variable will prevent any part of BIND from being built, regardless of the presence of any of the other *_BIND_* variables below. .It Va NO_BIND_DNSSEC .Pq Vt bool Set to avoid building or installing the DNSSEC related binaries, .Xr dnssec-keygen 8 and .Xr dnssec-signzone 8 . .It Va NO_BIND_ETC .Pq Vt bool Set to avoid installing the default files to .Pa /var/named/etc/namedb . .It Va NO_BIND_LIBS_LWRES .Pq Vt bool Set to avoid installing the lightweight resolver library in .Pa /usr/lib . The library that is private to the build system may still be built as needed. .It Va NO_BIND_MTREE .Pq Vt bool Set to avoid running .Xr mtree 8 to create the chroot directory structure under .Pa /var/named , and avoid creating an .Pa /etc/namedb symlink to the chroot directory. This option should typically be used together with .Vt NO_BIND_ETC . .It Va NO_BIND_NAMED .Pq Vt bool Set to avoid building or installing .Xr named 8 , .Xr named.reload 8 , .Xr named-checkconf 8 , .Xr named-checkzone 8 , .Xr rndc 8 , and .Xr rndc-confgen 8 . .It Va NO_BIND_UTILS .Pq Vt bool Set to avoid building or installing the BIND userland utilities, .Xr dig 1 , .Xr host 1 , .Xr nslookup 1 , and .Xr nsupdate 8 . .It Va WITH_BIND_LIBS .Pq Vt bool Set to install BIND libraries and include files. .It Va PPP_NO_NAT .Pq Vt bool Build .Xr ppp 8 without support for network address translation (NAT). .It Va PPP_NO_NETGRAPH .Pq Vt bool Set to build .Xr ppp 8 without support for Netgraph. .It Va PPP_NO_RADIUS .Pq Vt bool Set to build .Xr ppp 8 without support for RADIUS. .It Va PPP_NO_SUID .Pq Vt bool Set to disable the installation of .Xr ppp 8 as a set-user-ID root program. .It Va SENDMAIL_MC .Pq Vt str The default .Xr m4 1 configuration file to use at install time. The value should include the full path to the .Pa .mc file, e.g., .Pa /etc/mail/myconfig.mc . Use with caution as a make install will overwrite any existing .Pa /etc/mail/sendmail.cf . Note that .Va SENDMAIL_CF is now deprecated. .It Va SENDMAIL_SUBMIT_MC .Pq Vt str The default .Xr m4 1 configuration file for mail submission to use at install time. The value should include the full path to the .Pa .mc file, e.g., .Pa /etc/mail/mysubmit.mc . Use with caution as a make install will overwrite any existing .Pa /etc/mail/submit.cf . .It Va SENDMAIL_ADDITIONAL_MC .Pq Vt str Additional .Pa .mc files which should be built into .Pa .cf files at build time. The value should include the full path to the .Pa .mc file(s), e.g., .Pa /etc/mail/foo.mc .Pa /etc/mail/bar.mc . .It Va SENDMAIL_CF_DIR .Pq Vt str Override the default location for the .Xr m4 1 configuration files used to build a .Pa .cf file from a .Pa .mc file. .It Va SENDMAIL_M4_FLAGS .Pq Vt str Flags passed to .Xr m4 1 when building a .Pa .cf file from a .Pa .mc file. .It Va SENDMAIL_CFLAGS .Pq Vt str Flags to pass to the compile command when building .Xr sendmail 8 . The .Va SENDMAIL_* flags can be used to provide SASL support with setting such as: .Bd -literal -offset indent SENDMAIL_CFLAGS=-I/usr/local/include -DSASL SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl .Ed .It Va SENDMAIL_LDFLAGS .Pq Vt str Flags to pass to the .Xr ld 1 command when building .Xr sendmail 8 . .It Va SENDMAIL_LDADD .Pq Vt str Flags to add to the end of the .Xr ld 1 command when building .Xr sendmail 8 . .It Va SENDMAIL_DPADD .Pq Vt str Extra dependencies to add when building .Xr sendmail 8 . .It Va SENDMAIL_SET_USER_ID .Pq Vt bool If set, install .Xr sendmail 8 as a set-user-ID root binary instead of a set-group-ID binary and do not install .Pa /etc/mail/submit.{cf,mc} . Use of this flag is not recommended and the alternative advice in .Pa /etc/mail/README should be followed instead if at all possible. .It Va SENDMAIL_MAP_PERMS .Pq Vt str Mode to use when generating alias and map database files using .Pa /etc/mail/Makefile . The default value is 0640. .It Va TOP_TABLE_SIZE .Pq Vt int .Xr top 1 uses a hash table for the user names. The size of this hash can be tuned to match the number of local users. The table size should be a prime number approximately twice as large as the number of lines in .Pa /etc/passwd . The default number is 20011. .It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE .Pq Vt int Causes the system compiler to be built such that it forces high optimization levels to a lower one. .Xr gcc 1 .Fl O2 and above is known to trigger known optimizer bugs at various times \(em this is worse on the Alpha platform. The value assigned is the highest optimization value used. .El .Pp The following list provides a name and short description for variables that are used when building documentation. .Bl -tag -width Ar .It Va DISTDIR .Pq Vt str Where distfiles are kept. Normally, this is .Pa distfiles in .Va PORTSDIR . .It Va DOC_LANG .Pq Vt str The list of languages and encodings to build and install. .It Va PRINTERDEVICE .Pq Vt str The default format for system documentation, depends on your printer. This can be set to .Dq Li ascii for simple printers, or .Dq Li ps for postscript or graphics printers with a ghostscript filter, or both. .El .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact .It Pa /etc/make.conf .It Pa /usr/doc/Makefile .It Pa /usr/share/examples/etc/make.conf .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 .El .Sh SEE ALSO .Xr gcc 1 , .Xr install 1 , .Xr make 1 , .Xr ports 7 , .Xr lpd 8 , .Xr sendmail 8 .Sh HISTORY The .Nm file appeared sometime before .Fx 4.0 . .Sh AUTHORS This manual page was written by .An Mike W. Meyer Aq mwm@mired.org . .Sh BUGS This manual page may occasionally be out of date with respect to the options currently available for use in .Nm . Please check the .Pa /usr/share/examples/etc/make.conf file for the latest options which are available. .Sh CAVEATS Note, that .Ev MAKEOBJDIRPREFIX and .Ev MAKEOBJDIR are environment variables and should not be set in .Nm but in make's environment. diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index d8651ab5949b..03aa3346b2c1 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -1,38 +1,40 @@ # $FreeBSD$ .if !defined(BURN_BRIDGES) .for oldnew in \ NOATM:NO_ATM \ + NOCLEAN:NO_CLEAN \ + NOCLEANDIR:NO_CLEANDIR \ NOCRYPT:NO_CRYPT \ NODOCCOMPRESS:NO_DOCCOMPRESS \ NOEXTRADEPEND:NO_EXTRADEPEND \ NOFSCHG:NO_FSCHG \ NOGAMES:NO_GAMES \ NOHTML:NO_HTML \ NOINET6:NO_INET6 \ NOINFO:NO_INFO \ NOINFOCOMPRESS:NO_INFOCOMPRESS \ NOINSTALLLIB:NO_INSTALLLIB \ NOLIBC_R:NO_LIBC_R \ NOLIBPTHREAD:NO_LIBPTHREAD \ NOLIBTHR:NO_LIBTHR \ NOLINT:NO_LINT \ NOMAN:NO_MAN \ NOMANCOMPRESS:NO_MANCOMPRESS \ NOMLINKS:NO_MLINKS \ NOOBJ:NO_OBJ \ NOPIC:NO_PIC \ NOPROFILE:NO_PROFILE \ NOSHARE:NO_SHARE \ NOSHARED:NO_SHARED \ NOTAGS:NO_TAGS .for old in ${oldnew:C/:.*//} .for new in ${oldnew:C/.*://} .if defined(${old}) && !defined(${new}) .warning ${old} is deprecated in favor of ${new} ${new}= ${${old}} .endif .endfor .endfor .endfor .endif