Deleted Added
full compact
Makefile (95363) Makefile (95509)
1# $FreeBSD: head/release/Makefile 95363 2002-04-24 12:54:34Z ru $
1# $FreeBSD: head/release/Makefile 95509 2002-04-26 17:55:27Z ru $
2#
3# make release CHROOTDIR=/some/dir BUILDNAME=somename CVSROOT=/cvs/dir \
4# [ RELEASETAG=tag ]
5#
6# Where "/some/dir" is the pathname of a directory on a some filesystem with
7# at least 1000MB of free space, "somename" is what you want the release to
8# call itself, "/cvs/dir" is where our source repo resides and, optionally,
9# which CVS "tag" name should be used when checking out the sources to build

--- 31 unchanged lines hidden (view full) ---

41.if ${ISRELEASE} != 0
42# Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees.
43AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//'
44DOCRELEASETAG?= ${AUXRELEASETAG}
45PORTSRELEASETAG?= ${AUXRELEASETAG}
46.endif
47.endif
48
2#
3# make release CHROOTDIR=/some/dir BUILDNAME=somename CVSROOT=/cvs/dir \
4# [ RELEASETAG=tag ]
5#
6# Where "/some/dir" is the pathname of a directory on a some filesystem with
7# at least 1000MB of free space, "somename" is what you want the release to
8# call itself, "/cvs/dir" is where our source repo resides and, optionally,
9# which CVS "tag" name should be used when checking out the sources to build

--- 31 unchanged lines hidden (view full) ---

41.if ${ISRELEASE} != 0
42# Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees.
43AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//'
44DOCRELEASETAG?= ${AUXRELEASETAG}
45PORTSRELEASETAG?= ${AUXRELEASETAG}
46.endif
47.endif
48
49KERNCONF?=GENERIC
50
51# If you want to pass flags to the world build such as -j X, use
52# WORLD_FLAGS. Similarly, you can specify make flags for kernel
53# builds via KERNEL_FLAGS.
54#WORLD_FLAGS=-j4
55#KERNEL_FLAGS=-j4
56
57# If you are using a local CVS repository with components stored in
58# non-standard modules, override these on the make commandline or

--- 65 unchanged lines hidden (view full) ---

124# Things which without too much trouble can be considered variables
125# BASE_DISTS are special in that they get full /etc installation sets.
126#
127.if ${MACHINE_ARCH} == "i386"
128COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x
129.else
130COMPAT_DISTS?= compat4x
131.endif
49# If you want to pass flags to the world build such as -j X, use
50# WORLD_FLAGS. Similarly, you can specify make flags for kernel
51# builds via KERNEL_FLAGS.
52#WORLD_FLAGS=-j4
53#KERNEL_FLAGS=-j4
54
55# If you are using a local CVS repository with components stored in
56# non-standard modules, override these on the make commandline or

--- 65 unchanged lines hidden (view full) ---

122# Things which without too much trouble can be considered variables
123# BASE_DISTS are special in that they get full /etc installation sets.
124#
125.if ${MACHINE_ARCH} == "i386"
126COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x
127.else
128COMPAT_DISTS?= compat4x
129.endif
132OTHER_DISTS?= catpages manpages games proflibs dict info doc
130OTHER_DISTS?= games catpages manpages proflibs dict info doc
133CRYPTO_DISTS?= crypto krb4 krb5
134BASE_DISTS?= base
135DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS}
131CRYPTO_DISTS?= crypto krb4 krb5
132BASE_DISTS?= base
133DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS}
136KERNELS?= GENERIC
137
138BOOT1= etc/defaults/rc.conf
139
140# mountpoint for filesystems.
141MNT= /mnt
142
143# Various floppy image parameters.
144#

--- 35 unchanged lines hidden (view full) ---

180BOOTLABEL= fd1440
181FIXITLABEL= minimum2
182MFSLABEL= auto
183BIGBOOTLABEL= minimum2
184.endif
185
186ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -
187
134
135BOOT1= etc/defaults/rc.conf
136
137# mountpoint for filesystems.
138MNT= /mnt
139
140# Various floppy image parameters.
141#

--- 35 unchanged lines hidden (view full) ---

177BOOTLABEL= fd1440
178FIXITLABEL= minimum2
179MFSLABEL= auto
180BIGBOOTLABEL= minimum2
181.endif
182
183ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -
184
185# Things that need to be recompiled with Kerberos support.
186K4PROGS!= cd ${.CURDIR}/../kerberosIV; ${MAKE} -V KPROGS
187K5PROGS!= cd ${.CURDIR}/../kerberos5; ${MAKE} -V KPROGS
188
188# Things that need to be compiled without crypto support in releases
189.if !defined(FIXCRYPTO)
190FIXCRYPTO= bin/ed usr.sbin/ppp usr.sbin/pppd usr.sbin/tcpdump/tcpdump
191.if !defined(NO_SENDMAIL)
192FIXCRYPTO+= usr.sbin/sendmail
193.endif
194.endif
195

--- 43 unchanged lines hidden (view full) ---

239.endif
240
241.if !defined(NOPORTREADMES)
242MAKEREADMES= make readmes PORTSDIR=${CHROOTDIR}/usr/ports
243.else
244MAKEREADMES= true
245.endif
246
189# Things that need to be compiled without crypto support in releases
190.if !defined(FIXCRYPTO)
191FIXCRYPTO= bin/ed usr.sbin/ppp usr.sbin/pppd usr.sbin/tcpdump/tcpdump
192.if !defined(NO_SENDMAIL)
193FIXCRYPTO+= usr.sbin/sendmail
194.endif
195.endif
196

--- 43 unchanged lines hidden (view full) ---

240.endif
241
242.if !defined(NOPORTREADMES)
243MAKEREADMES= make readmes PORTSDIR=${CHROOTDIR}/usr/ports
244.else
245MAKEREADMES= true
246.endif
247
248WMAKEENV!= cd ${.CURDIR}/..; ${MAKE} -f Makefile.inc1 -V WMAKEENV
249WMAKE= ${WMAKEENV} ${MAKE}
250
247rerelease release:
248.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
249 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
250.endif
251.if defined(NOPORTSATALL) && !defined(NODOC)
252 @echo "Ports are required for building the docs. Either set NODOC or"
253 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
254 @exit 1
255.endif
256.if make(release)
257.if exists(${CHROOTDIR})
258# The first command will fail on a handful of files that have their schg
259# flags set. But it greatly speeds up the next two commands.
260 -rm -rf ${CHROOTDIR} 2>/dev/null
261 -chflags -R noschg ${CHROOTDIR}/.
262 -rm -rf ${CHROOTDIR}
263.endif
264 mkdir -p ${CHROOTDIR}
265 @echo ">>> make release started on `LC_ALL=C TZ=GMT date`"
251rerelease release:
252.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
253 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
254.endif
255.if defined(NOPORTSATALL) && !defined(NODOC)
256 @echo "Ports are required for building the docs. Either set NODOC or"
257 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
258 @exit 1
259.endif
260.if make(release)
261.if exists(${CHROOTDIR})
262# The first command will fail on a handful of files that have their schg
263# flags set. But it greatly speeds up the next two commands.
264 -rm -rf ${CHROOTDIR} 2>/dev/null
265 -chflags -R noschg ${CHROOTDIR}/.
266 -rm -rf ${CHROOTDIR}
267.endif
268 mkdir -p ${CHROOTDIR}
269 @echo ">>> make release started on `LC_ALL=C TZ=GMT date`"
266 cd ${.CURDIR}/../etc && ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR}
270 cd ${.CURDIR}/.. && ${MAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \
271 -DNOPROFILE installworld DESTDIR=${CHROOTDIR}
267 cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR}
268 if [ -f /etc/resolv.conf ]; then \
269 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
270 fi
272 cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR}
273 if [ -f /etc/resolv.conf ]; then \
274 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
275 fi
271 cd ${.CURDIR}/.. && ${MAKE} -DNOHTML -DNOINFO -DNOMAN installworld \
272 DESTDIR=${CHROOTDIR}
273 mkdir ${CHROOTDIR}/${BOOTSTRAPDIR}
274 for i in ${BOOTSTRAPUTILS} ; do \
275 cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \
276 done
277.if !defined(RELEASETAG)
278 cd ${CHROOTDIR}/usr && rm -rf src && \
279 cvs -R -d ${CVSROOT} co -P ${RELEASESRCMODULE}
280.else

--- 30 unchanged lines hidden (view full) ---

311 else \
312 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \
313 fi
314.endif
315.endif
316.if make(rerelease)
317.if !defined(RELEASENOUPDATE)
318.if !defined(RELEASETAG)
276 mkdir ${CHROOTDIR}/${BOOTSTRAPDIR}
277 for i in ${BOOTSTRAPUTILS} ; do \
278 cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \
279 done
280.if !defined(RELEASETAG)
281 cd ${CHROOTDIR}/usr && rm -rf src && \
282 cvs -R -d ${CVSROOT} co -P ${RELEASESRCMODULE}
283.else

--- 30 unchanged lines hidden (view full) ---

314 else \
315 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \
316 fi
317.endif
318.endif
319.if make(rerelease)
320.if !defined(RELEASENOUPDATE)
321.if !defined(RELEASETAG)
319 cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d
322 cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -A
320.else
321 cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG}
322.endif
323.if !defined(NOPORTS)
324 cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d
325.endif
326.if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
327 for i in ${MINIMALDOCPORTS}; do \

--- 48 unchanged lines hidden (view full) ---

376 echo "export RELNOTES_LANG=en_US.ISO8859-1" >> ${CHROOTDIR}/mk
377.endif
378.if defined(NOSHARED)
379 echo "export NOSHARED=${NOSHARED}" >> ${CHROOTDIR}/mk
380.endif
381.if defined(BOOT_CONFIG)
382 echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk
383.endif
323.else
324 cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG}
325.endif
326.if !defined(NOPORTS)
327 cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d
328.endif
329.if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
330 for i in ${MINIMALDOCPORTS}; do \

--- 48 unchanged lines hidden (view full) ---

379 echo "export RELNOTES_LANG=en_US.ISO8859-1" >> ${CHROOTDIR}/mk
380.endif
381.if defined(NOSHARED)
382 echo "export NOSHARED=${NOSHARED}" >> ${CHROOTDIR}/mk
383.endif
384.if defined(BOOT_CONFIG)
385 echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk
386.endif
387.if defined(WORLD_FLAGS)
388 echo "export WORLD_FLAGS=\"${WORLD_FLAGS}\"" >> ${CHROOTDIR}/mk
389.endif
384.if defined(KERNEL_FLAGS)
385 echo "export KERNEL_FLAGS=\"${KERNEL_FLAGS}\"" >> ${CHROOTDIR}/mk
386.endif
387 # Don't remove this, or the build will fall over!
388 echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk
389 echo "export PATH=${BOOTSTRAPDIR}:$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk
390 echo "export TMPDIR=/tmp" >> ${CHROOTDIR}/mk
391 echo "export MAKEOBJDIRPREFIX=/usr/obj" >> ${CHROOTDIR}/mk
392 echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk
393 echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk
394 echo " cd /usr/src" >> ${CHROOTDIR}/mk
395.if make(release)
390.if defined(KERNEL_FLAGS)
391 echo "export KERNEL_FLAGS=\"${KERNEL_FLAGS}\"" >> ${CHROOTDIR}/mk
392.endif
393 # Don't remove this, or the build will fall over!
394 echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk
395 echo "export PATH=${BOOTSTRAPDIR}:$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk
396 echo "export TMPDIR=/tmp" >> ${CHROOTDIR}/mk
397 echo "export MAKEOBJDIRPREFIX=/usr/obj" >> ${CHROOTDIR}/mk
398 echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk
399 echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk
400 echo " cd /usr/src" >> ${CHROOTDIR}/mk
401.if make(release)
396 echo " (cd etc; make distrib-dirs distribution)" >> ${CHROOTDIR}/mk
397 echo " make ${WORLD_FLAGS} world && \\" >> ${CHROOTDIR}/mk
402 echo " make ${WORLD_FLAGS} buildworld && \\" >> ${CHROOTDIR}/mk
398.endif
399.if make(rerelease)
403.endif
404.if make(rerelease)
400 echo " make ${WORLD_FLAGS} -DNOCLEAN world && \\" >> ${CHROOTDIR}/mk
405 echo " make ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${CHROOTDIR}/mk
401.endif
402 echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk
403 echo "fi" >> ${CHROOTDIR}/mk
404 echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
405 echo "make obj" >> ${CHROOTDIR}/mk
406 echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk
407 echo "echo \">>> make ${.TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
408 chmod 755 ${CHROOTDIR}/mk

--- 6 unchanged lines hidden (view full) ---

415release.1:
416 mkdir -p ${_R}
417 -rm -rf ${_R}/* 2> /dev/null
418 -chflags -R noschg ${_R}/.
419 rm -rf ${_R}/*
420 mkdir ${RD}
421 mkdir ${RD}/floppies
422 mkdir ${RD}/trees
406.endif
407 echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk
408 echo "fi" >> ${CHROOTDIR}/mk
409 echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
410 echo "make obj" >> ${CHROOTDIR}/mk
411 echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk
412 echo "echo \">>> make ${.TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk
413 chmod 755 ${CHROOTDIR}/mk

--- 6 unchanged lines hidden (view full) ---

420release.1:
421 mkdir -p ${_R}
422 -rm -rf ${_R}/* 2> /dev/null
423 -chflags -R noschg ${_R}/.
424 rm -rf ${_R}/*
425 mkdir ${RD}
426 mkdir ${RD}/floppies
427 mkdir ${RD}/trees
423 mkdir ${RD}/dists
424 mkdir ${RD}/kernels
425 for i in ${DISTRIBUTIONS} ; do \
426 mkdir ${RD}/trees/$$i && \
428 mkdir ${RD}/kernels
429 for i in ${DISTRIBUTIONS} ; do \
430 mkdir ${RD}/trees/$$i && \
427 mkdir ${RD}/dists/$$i && \
428 mtree -deU -f ${MTREEFILES}/BSD.root.dist \
429 -p ${RD}/trees/$$i > /dev/null && \
430 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \
431 -p ${RD}/trees/$$i/usr > /dev/null && \
432 mtree -deU -f ${MTREEFILES}/BSD.include.dist \
433 -p ${RD}/trees/$$i/usr/include > /dev/null && \
434 mtree -deU -f ${MTREEFILES}/BSD.var.dist \
435 -p ${RD}/trees/$$i/var > /dev/null ; \
436 done
437 touch release.1
438
439# Install the system into the various distributions.
440release.2:
441 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
442 cd ${.CURDIR}/.. && make distribworld DISTDIR=${RD}/trees
431 mtree -deU -f ${MTREEFILES}/BSD.root.dist \
432 -p ${RD}/trees/$$i > /dev/null && \
433 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \
434 -p ${RD}/trees/$$i/usr > /dev/null && \
435 mtree -deU -f ${MTREEFILES}/BSD.include.dist \
436 -p ${RD}/trees/$$i/usr/include > /dev/null && \
437 mtree -deU -f ${MTREEFILES}/BSD.var.dist \
438 -p ${RD}/trees/$$i/var > /dev/null ; \
439 done
440 touch release.1
441
442# Install the system into the various distributions.
443release.2:
444 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base
445 cd ${.CURDIR}/.. && make distribworld DISTDIR=${RD}/trees
446 # Handle some grief caused by the munition braindeadness.
447 cd ${.CURDIR}/..; \
448 ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DNOCRYPT \
449 SUBDIR_OVERRIDE="${FIXCRYPTO}" \
450 buildworld distribworld DISTDIR=${RD}/trees
443.if exists(${.CURDIR}/../kerberosIV) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS)
451.if exists(${.CURDIR}/../kerberosIV) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS)
444 cd ${.CURDIR}/../kerberosIV && ( \
445 make bootstrap &&\
446 make obj all help-distribute DISTDIR=${RD}/trees &&\
447 make kprog \
448 )
452 cd ${.CURDIR}/..; \
453 ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DMAKE_KERBEROS4 \
454 SUBDIR_OVERRIDE="kerberosIV ${K4PROGS}" \
455 buildworld distribworld DISTDIR=${RD}/trees
449.endif
450.if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS)
456.endif
457.if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS)
451 cd ${.CURDIR}/../kerberos5 && ( \
452 make bootstrap &&\
453 make obj all help-distribute DISTDIR=${RD}/trees &&\
454 make kprog \
455 )
458 cd ${.CURDIR}/..; \
459 ${MAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DMAKE_KERBEROS5 \
460 SUBDIR_OVERRIDE="kerberos5 ${K5PROGS}" \
461 buildworld distribworld DISTDIR=${RD}/trees
456.endif
457 -chflags -R noschg ${RD}/trees
458 touch release.2
459
460# Make and install the generic kernel(s).
461release.3:
462.for kernel in ${KERNELS}
462.endif
463 -chflags -R noschg ${RD}/trees
464 touch release.2
465
466# Make and install the generic kernel(s).
467release.3:
468.for kernel in ${KERNELS}
463 -chflags -R noschg ${RD}/kernels/${kernel}
464 rm -rf ${RD}/kernels/${kernel}
465 rm -rf ${.CURDIR}/../sys/${MACHINE}/compile/${kernel}
466 cd ${.CURDIR} && ${MAKE} doSTDKERNEL KERNEL=${kernel} KODIR=/${kernel}
467 rm -rf ${.CURDIR}/../sys/${MACHINE}/compile/${kernel}
468 -mkdir ${RD}/trees/base/boot/${kernel}
469 cp -p ${RD}/kernels/${kernel}/kernel ${RD}/trees/base/boot/${kernel}
469 cd ${.CURDIR}/..; \
470 ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR -DNO_MODULES \
471 KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \
472 DESTDIR=${RD}/trees/base
470.endfor
473.endfor
471 # Install a standard boot kernel+modules
472 mkdir -p ${RD}/trees/base/boot/kernel
473 cp -Rp ${RD}/kernels/GENERIC/* ${RD}/trees/base/boot/kernel
474 # Install a standard boot kernel+modules.
475 cd ${.CURDIR}/..; \
476 ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR \
477 kernel \
478 DESTDIR=${RD}/trees/base; \
479 cd ${.CURDIR}/..; \
480 ${MAKE} ${KERNEL_FLAGS} -DNO_MODULES \
481 reinstallkernel -DINSTALL_DEBUG \
482 DESTDIR=${RD}/trees/base
474 touch release.3
475
476# Make and install the three crunched binaries which live on the floppies.
477# You are not supposed to like this :-)
478release.4:
483 touch release.3
484
485# Make and install the three crunched binaries which live on the floppies.
486# You are not supposed to like this :-)
487release.4:
479 @mkdir -p /stand
480 rm -rf ${RD}/crunch
481 mkdir -p ${RD}/crunch
482 for j in ${CRUNCH_TARGETS} ; do \
483 rm -rf $${j}_crunch && \
484 mkdir $${j}_crunch && \
485 ( cd $${j}_crunch && \
486 ( ( [ -f ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ] && \
487 crunchgen ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ) || \
488 ( crunchgen ${.CURDIR}/$${j}_crunch.conf ) ) && \
488 rm -rf ${RD}/crunch
489 mkdir -p ${RD}/crunch
490 for j in ${CRUNCH_TARGETS} ; do \
491 rm -rf $${j}_crunch && \
492 mkdir $${j}_crunch && \
493 ( cd $${j}_crunch && \
494 ( ( [ -f ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ] && \
495 crunchgen ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ) || \
496 ( crunchgen ${.CURDIR}/$${j}_crunch.conf ) ) && \
489 ${MAKE} -f $${j}_crunch.mk subclean all ) && \
497 ${WMAKE} -f $${j}_crunch.mk subclean all ) && \
490 mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \
491 true || { rm -rf $${j}_crunch ; false ; } ; \
492 done
493 touch release.4
494
495#
496# --==## Fix up the distributions. ##==--
497#
498release.5:
498 mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \
499 true || { rm -rf $${j}_crunch ; false ; } ; \
500 done
501 touch release.4
502
503#
504# --==## Fix up the distributions. ##==--
505#
506release.5:
499 # Handle some grief caused by the munition braindeadness.
500 for i in ${FIXCRYPTO}; do \
501 ( cd ${.CURDIR}/../$$i; \
502 make -DNOCRYPT clean all distribute DISTDIR=${RD}/trees ) ; \
503 done
504
505 # Create any "synthetic dists" now.
506 @for i in ${DISTRIBUTIONS}; do \
507 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \
508 echo -n "Running $$i dist creation script... "; \
509 env OBJFORMAT=${OBJFORMAT} RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \
510 echo "Done."; \
511 fi \
512 done \

--- 106 unchanged lines hidden (view full) ---

619.endif
620 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf
621 cd ${RD}/trees/base && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand
622 ( for F in netconfig protocols ; do \
623 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
624 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \
625 done )
626 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \
507 # Create any "synthetic dists" now.
508 @for i in ${DISTRIBUTIONS}; do \
509 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \
510 echo -n "Running $$i dist creation script... "; \
511 env OBJFORMAT=${OBJFORMAT} RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \
512 echo "Done."; \
513 fi \
514 done \

--- 106 unchanged lines hidden (view full) ---

621.endif
622 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf
623 cd ${RD}/trees/base && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand
624 ( for F in netconfig protocols ; do \
625 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
626 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \
627 done )
628 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \
627 ${.CURDIR}/../etc/services | \
629 ${RD}/trees/base/etc/services | \
628 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
629 > ${RD}/mfsfd/stand/etc/services
630 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services
631 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig
630 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \
631 > ${RD}/mfsfd/stand/etc/services
632 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services
633 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig
632 gzip -9c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz
634 gzip -9c ${RD}/trees/base/COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz
633.if !defined(NODOC)
634 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
635 gzip -9c ${RND}/${RELNOTES_LANG}/$$i/article.txt > ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT.gz; \
636 done
637 @for i in ${DIST_DOCS_ARCH_DEP}; do \
638 gzip -9c ${RND}/${RELNOTES_LANG}/$$i/${MACHINE_ARCH}/article.txt > ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT.gz; \
639 done
640 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT.gz ${RD}/mfsfd/stand/help/INSTALL.TXT.gz
641.endif
642 -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
643 @mkdir -p ${RD}/mfsfd/boot
635.if !defined(NODOC)
636 @for i in ${DIST_DOCS_ARCH_INDEP}; do \
637 gzip -9c ${RND}/${RELNOTES_LANG}/$$i/article.txt > ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT.gz; \
638 done
639 @for i in ${DIST_DOCS_ARCH_DEP}; do \
640 gzip -9c ${RND}/${RELNOTES_LANG}/$$i/${MACHINE_ARCH}/article.txt > ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT.gz; \
641 done
642 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT.gz ${RD}/mfsfd/stand/help/INSTALL.TXT.gz
643.endif
644 -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd
645 @mkdir -p ${RD}/mfsfd/boot
644 @cp /boot/boot* ${RD}/mfsfd/boot
646 @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot
645.if ${MACHINE} == "i386"
647.if ${MACHINE} == "i386"
646 @cp /boot/mbr ${RD}/mfsfd/boot
648 @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
647.endif
649.endif
648 @cp /boot/loader.help ${RD}/mfsfd/boot
649 @cd ${.CURDIR} && ${MAKE} createBOOTMFS
650 @cp ${RD}/trees/base/boot/loader.help ${RD}/mfsfd/boot
651 @cd ${.CURDIR}/../sys/${MACHINE}/conf && \
652 sh ${.CURDIR}/${MACHINE_ARCH}/dokern.sh ${FDSIZE} < GENERIC > BOOTMFS && \
653 [ -r GENERIC.hints ] && cp GENERIC.hints BOOTMFS.hints
650.if exists(${.CURDIR}/${MACHINE}/drivers.conf)
654.if exists(${.CURDIR}/${MACHINE}/drivers.conf)
651 @cd ${.CURDIR} && ${MAKE} doMODULES KERNEL=BOOTMFS KERNEL_KO=BOOTMFS KODIR=""
655 @perl ${.CURDIR}/scripts/driver-remove.pl \
656 ${.CURDIR}/${MACHINE}/drivers.conf \
657 ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS
658 @mkdir -p ${RD}/mfsfd/stand/modules
659 @perl ${.CURDIR}/scripts/driver-copy2.pl \
660 ${.CURDIR}/${MACHINE}/drivers.conf \
661 ${RD}/trees/base/boot/kernel ${RD}/mfsfd/stand/modules
652.endif
653 @echo "Making the regular boot floppy."
662.endif
663 @echo "Making the regular boot floppy."
654 @tar --exclude CVS -cf - -C /usr/src/usr.sbin/sysinstall help | \
664 @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \
655 tar xf - -C ${RD}/mfsfd/stand
656 @echo "Compressing doc files..."
657 @gzip -9 ${RD}/mfsfd/stand/help/*.hlp
658.if ${MACHINE_ARCH} == "alpha"
659 rm -rf ${RD}/mfsfd/stand/help/*
660.endif
665 tar xf - -C ${RD}/mfsfd/stand
666 @echo "Compressing doc files..."
667 @gzip -9 ${RD}/mfsfd/stand/help/*.hlp
668.if ${MACHINE_ARCH} == "alpha"
669 rm -rf ${RD}/mfsfd/stand/help/*
670.endif
661.if exists(${.CURDIR}/${MACHINE}/drivers.conf)
662 @mkdir -p ${RD}/mfsfd/stand/modules
663 @perl ${.CURDIR}/scripts/driver-copy2.pl \
664 ${.CURDIR}/${MACHINE}/drivers.conf \
665 ${RD}/kernels ${RD}/mfsfd/stand/modules
666.endif
667 sh -e ${.CURDIR}/scripts/doFS.sh -s mfsroot ${RD} ${MNT} \
668 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
669 @gzip -9vc mfsroot > mfsroot.gz
670.if ${MACHINE} == "pc98"
671 @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/mfsroot.flp \
672 ${RD} ${MNT} ${SMALLBOOTSIZE} mfsroot.gz \
673 ${BOOTINODE} ${SMALLBOOTLABEL}
674 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern-small FDSIZE=SMALL

--- 243 unchanged lines hidden (view full) ---

918 done \
919 else \
920 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \
921 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
922 done \
923 fi
924
925#
671 sh -e ${.CURDIR}/scripts/doFS.sh -s mfsroot ${RD} ${MNT} \
672 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
673 @gzip -9vc mfsroot > mfsroot.gz
674.if ${MACHINE} == "pc98"
675 @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/mfsroot.flp \
676 ${RD} ${MNT} ${SMALLBOOTSIZE} mfsroot.gz \
677 ${BOOTINODE} ${SMALLBOOTLABEL}
678 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern-small FDSIZE=SMALL

--- 243 unchanged lines hidden (view full) ---

922 done \
923 else \
924 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \
925 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \
926 done \
927 fi
928
929#
926# --==## BOOTMFS config file ##==--
927#
928
929createBOOTMFS:
930 @cd ${.CURDIR}/../sys/${MACHINE}/conf && \
931 sh ${.CURDIR}/${MACHINE_ARCH}/dokern.sh ${FDSIZE} < ${KERNCONF} > BOOTMFS && \
932 [ -r ${KERNCONF}.hints ] && cp ${KERNCONF}.hints BOOTMFS.hints
933.if 0 && ${MACHINE_ARCH} == "i386"
934 @echo "options INTRO_USERCONFIG" >> \
935 ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS
936.endif
937.if exists(${.CURDIR}/${MACHINE}/drivers.conf)
938 @perl ${.CURDIR}/scripts/driver-remove.pl \
939 ${.CURDIR}/${MACHINE}/drivers.conf \
940 ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS
941.endif
942
943#
944# --==## Compile a kernel by name ${KERNEL} ##==--
945#
946# We don't erase the sys/${MACHINE}/compile/${KERNEL} directory, since somebody
947# may want to reuse it (release.8 presently)
948#
949doKERNEL:
950 @rm -f ${RD}/kernels/${KERNEL}
951 @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL}
952 @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \
953 make kernel-depend && \
954 make -DNO_WERROR ${KERNEL_FLAGS} ${KERNEL_KO} && \
955 make kernel-reinstall DESTDIR=${RD}/kernels && \
956 [ -r ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ] && \
957 cp ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ${RD}/kernels
958
959doMODULES:
960 @rm -f ${RD}/kernels/*.ko
961 @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL}
962 @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \
963 make modules-depend && \
964 make -DNO_WERROR ${KERNEL_FLAGS} modules && \
965 make modules-reinstall DESTDIR=${RD}/kernels && \
966
967doSTDKERNEL:
968 @rm -f ${RD}/kernels/${KERNEL}
969 @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL}
970 @cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \
971 make depend && \
972 make -DNO_WERROR ${KERNEL_FLAGS} KERNEL=${KERNEL} && \
973 make KERNEL=${KERNEL} DESTDIR=${RD}/kernels install && \
974 [ -r ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ] && \
975 cp ${.CURDIR}/../sys/${MACHINE}/conf/${KERNEL}.hints ${RD}/kernels
976 @-cd ${.CURDIR}/../sys/${MACHINE}/compile/${KERNEL} && \
977 make KERNEL=${KERNEL} DESTDIR=${RD}/kernels \
978 kernel-reinstall.debug
979
980#
981# --==## Put a filesystem into a BOOTMFS kernel ##==--
982#
983doMFSKERN:
930# --==## Put a filesystem into a BOOTMFS kernel ##==--
931#
932doMFSKERN:
984 @echo "Running doMFSKERN for ${FSIMAGE}"
985 @rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE}
986 @cd ${.CURDIR} && ${MAKE} createBOOTMFS
987 @cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS KERNEL_KO=BOOTMFS KODIR=""
933 @echo "Running ${.TARGET} for ${FSIMAGE}"
934 @rm -f ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE}
935 cd ${.CURDIR}/..; \
936 KERNEL_KO=BOOTMFS KODIR= \
937 ${MAKE} ${KERNEL_FLAGS} -DNO_WERROR -DNO_MODULES -DNO_KERNELCLEAN \
938 KERNCONF=BOOTMFS buildkernel reinstallkernel \
939 DESTDIR=${RD}/kernels
940.if exists(${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS.hints)
941 cp ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS.hints ${RD}/kernels
942.endif
988 @rm -rf ${RD}/image.${FSIMAGE}
943 @rm -rf ${RD}/image.${FSIMAGE}
989 @mkdir ${RD}/image.${FSIMAGE}
944 @mkdir ${RD}/image.${FSIMAGE}
990 @cd ${RD}/kernels && \
991 (chflags noschg BOOTMFS || true) && \
992 strip BOOTMFS && \
993 cp BOOTMFS BOOTMFS.${FSIMAGE} && \
994 [ -r BOOTMFS.hints ] && mv BOOTMFS.hints BOOTMFS.${FSIMAGE}.hints
995 mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel
996 @echo "Setting up /boot directory for ${FSIMAGE} floppy"
997 @mkdir -p ${RD}/image.${FSIMAGE}/boot

--- 42 unchanged lines hidden ---
945 @cd ${RD}/kernels && \
946 (chflags noschg BOOTMFS || true) && \
947 strip BOOTMFS && \
948 cp BOOTMFS BOOTMFS.${FSIMAGE} && \
949 [ -r BOOTMFS.hints ] && mv BOOTMFS.hints BOOTMFS.${FSIMAGE}.hints
950 mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel
951 @echo "Setting up /boot directory for ${FSIMAGE} floppy"
952 @mkdir -p ${RD}/image.${FSIMAGE}/boot

--- 42 unchanged lines hidden ---