PERFORCE change 31518 for review
David E. O'Brien
obrien at FreeBSD.org
Tue May 20 09:49:22 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31518
Change 31518 by obrien at obrien_trang on 2003/05/20 09:49:05
Replace the 75 uses of ${CHROOT}/mk with ${_MK} so that one may
easly change the script name when experimenting.
Affected files ...
.. //depot/projects/hammer/release/Makefile#20 edit
Differences ...
==== //depot/projects/hammer/release/Makefile#20 (text+ko) ====
@@ -244,6 +244,7 @@
CD= ${_R}/cdrom
CD_DISC1= ${CD}/disc1
CD_DISC2= ${CD}/disc2
+_MK= ${CHROOT}/mk
# Where the bootstrap ports (see DOCPORTS) get installed.
LOCALDIR= /usr/local/bin
@@ -402,10 +403,10 @@
rm foo; \
fi
-test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release
- echo "#!/bin/sh" > ${CHROOTDIR}/mk
- echo "set -ex" >> ${CHROOTDIR}/mk
- echo "trap 'umount /dev || true' 0" >> ${CHROOTDIR}/mk
- echo "_RELTARGET=\$${1:-doRELEASE}" >> ${CHROOTDIR}/mk
+ 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 \
BOOT_CONFIG \
@@ -437,40 +438,42 @@
TARGET_ARCH \
WORLD_FLAGS
.if defined(${var})
- echo "export ${var}=\"${${var}}\"" >> ${CHROOTDIR}/mk
+ echo "export ${var}=\"${${var}}\"" >> ${_MK}
.endif
.endfor
# Don't remove this, or the build will fall over!
- echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk
- echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${CHROOTDIR}/mk
- echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk
+ 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" >> ${CHROOTDIR}/mk
+ echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" \
- >> ${CHROOTDIR}/mk
- echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk
- echo " cd /usr/src" >> ${CHROOTDIR}/mk
- echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${CHROOTDIR}/mk
- echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk
- echo "fi" >> ${CHROOTDIR}/mk
+ >> ${_MK}
+ echo "if [ ! -f /tmp/.world_done ]; then" >> ${_MK}
+ echo " cd /usr/src" >> ${_MK}
+ echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${_MK}
+ echo " touch /tmp/.world_done" >> ${_MK}
+ echo " ${CROSSMAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \\" >> ${_MK}
+ echo " -DNOPROFILE installworld" >> ${_MK}
+ echo "fi" >> ${_MK}
.if defined(NOPORTS) || defined(NOPORTREADMES)
- echo "if false; then" >> ${CHROOTDIR}/mk
+ echo "if false; then" >> ${_MK}
.else
- echo "if true; then" >> ${CHROOTDIR}/mk
+ echo "if true; then" >> ${_MK}
.endif
- echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
- echo " cd /usr/ports" >> ${CHROOTDIR}/mk
- echo " make ${PORTREADMES_FLAGS} readmes" >> ${CHROOTDIR}/mk
- echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
- echo "fi" >> ${CHROOTDIR}/mk
- echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
- echo "make obj" >> ${CHROOTDIR}/mk
- echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk
- echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
- chmod 755 ${CHROOTDIR}/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 " 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}
# Ensure md.ko is loaded if md(4) is not statically compiled into the kernel
-mdconfig 2>/dev/null
- env -i /usr/sbin/chroot ${CHROOTDIR} /mk
+ env -i /usr/sbin/chroot ${_MK:S/\// /g}
clean:
rm -rf boot_crunch release.[0-9]
More information about the p4-projects
mailing list