Makefile revision 112453
1# $FreeBSD: head/release/Makefile 112453 2003-03-20 23:46:22Z ru $ 2# 3# make release [BUILDNAME=somename] CHROOTDIR=/some/dir 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 10# the release (default is HEAD). 11# 12# Please note: the md(4) driver must be present in the kernel 13# (either by being compiled in or loaded as a kld(4) module), 14# otherwise the target 'release.9' and possibly others will fail. 15# 16# Note: "/some/dir" cannot reside on a filesystem mounted with 17# the "nodev" option, otherwise the chrooted "buildworld" will likely 18# fail. 19# 20# Note: If you add options to this file, please keep release(7) updated! 21# 22# Set these, release builder! 23# 24# Fixed version: 25#BUILDNAME=5.0-RELEASE 26# 27# Automatic SNAP versioning: 28DATE != date +%Y%m%d 29BASE = 5.0 30BUILDNAME?=${BASE}-${DATE}-SNAP 31# 32#CHROOTDIR=/junk/release 33# If this is a -stable snapshot, then set 34#RELEASETAG=RELENG_4 35# 36# To add other options to the CVS subcommands (co,up), set 37#CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'" 38# 39# To add other options to the CVS command, set 40#CVSARGS="-lfq" 41# 42# To prefix the cvs command 43#CVSPREFIX="/usr/bin/time" 44# 45# Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we 46# are building an official release. Otherwise, we are building for 47# a branch. 48.if defined(RELEASETAG) 49ISRELEASE!= expr "${RELEASETAG}" : '^RELENG_.*_RELEASE$$' || true 50.if ${ISRELEASE} != 0 51# Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees. 52AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//' 53DOCRELEASETAG?= ${AUXRELEASETAG} 54PORTSRELEASETAG?= ${AUXRELEASETAG} 55.endif 56.endif 57 58# If you want to pass flags to the world build such as -j X, use 59# WORLD_FLAGS. Similarly, you can specify make flags for kernel 60# builds via KERNEL_FLAGS. 61# Similarly, you can specify make flags for make readmes via PORTREADMES_FLAGS. 62#WORLD_FLAGS=-j4 63#KERNEL_FLAGS=-j4 64#PORTREADMES_FLAGS=-j4 65 66TARGET_ARCH?= ${MACHINE_ARCH} 67.if ${TARGET_ARCH} == ${MACHINE_ARCH} 68TARGET?= ${MACHINE} 69.else 70TARGET?= ${TARGET_ARCH} 71.endif 72CROSSMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} 73NATIVEMAKE= ${MAKE} TARGET_ARCH=${MACHINE_ARCH} TARGET=${MACHINE} 74 75# If you are using a local CVS repository with components stored in 76# non-standard modules, override these on the make commandline or 77# in the environment. 78RELEASESRCMODULE?= src 79RELEASEDOCMODULE?= doc 80RELEASEPORTSMODULE?= ports 81 82# Uncomment this to disable the doc.1 target. Docs normally require 83# the ports tree, so NOPORTS can be set together with NODOC in order 84# to have neither ports or docs. If only NOPORTS is set to YES, but 85# docs are still desired, the DOMINIMALDOCPORTS logic below will only 86# install the ports that are minimally required for the docs. This is 87# intended as a compromise, less disk space is required than for using 88# the entire ports collection (and much less time due to the huge number 89# of directories it would create), but still quite a bit as well as some 90# CPU cycles (some of the programs are C++, and things like ghostscript 91# belong to the required ports nevertheless). 92# 93# Setting this also disables building of release note documentation 94# (RELNOTESng). 95#NODOC= YES 96#NOPORTS= YES 97 98# Modify this definition if you want the release notes 99# and other release documentation in a language other than English. 100RELNOTES_LANG?= en_US.ISO8859-1 101 102# As an alternative to installing the entire ports collection (which 103# can take a huge amount of time, in particular on slower disks), 104# setting ${MINIMALDOCPORTS} allows to install and build just those 105# ports that are really required for getting the docs up & running. 106.if defined(NOPORTS) && !defined(NODOC) 107DOMINIMALDOCPORTS= YES 108.include "Makefile.inc.docports" 109RELEASEPORTSMODULE= ${MINIMALDOCPORTS} 110.endif 111 112# Helper variable 113.if defined(NOPORTS) 114.if !defined(DOMINIMALDOCPORTS) || ${DOMINIMALDOCPORTS} != "YES" 115NOPORTSATALL= YES 116.endif 117.endif 118 119# By default, documentation (Handbook, FAQ, etc.) is built for all 120# the languages. To speed up building, set the DOC_LANG to just 121# the languages you need. (The language for the release notes is 122# controlled by the RELNOTES_LANG variable above.) 123#DOC_LANG= en_US.ISO8859-1 124DOCPORTS= textproc/docproj 125# Set this to wherever the distfiles required by release procedures. 126.if defined(DOCDISTFILES) 127# Respect DOCDISTFILES which is used before. 128RELEASEDISTFILES?= ${DOCDISTFILES} 129.else 130RELEASEDISTFILES?= ${.CURDIR}/../../ports/distfiles 131.endif 132# Set this to 1 if you want -P to be used for automatic keyboard detection 133# on the boot floppy. WARNING: Breaks on some Athlon (K7) motherboards. 134AUTO_KEYBOARD_DETECT?= 0 135 136.if !defined(NODOC) 137DIST_DOCS_ARCH_INDEP= readme errata early-adopter 138DIST_DOCS_ARCH_DEP= installation relnotes hardware 139.endif 140 141# Things which without too much trouble can be considered variables 142# BASE_DISTS are special in that they get full /etc installation sets. 143# 144.if ${TARGET_ARCH} == "i386" 145COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x 146.elif ${TARGET_ARCH} != "ia64" 147COMPAT_DISTS?= compat4x 148.endif 149OTHER_DISTS?= catpages manpages games proflibs dict info doc 150CRYPTO_DISTS?= crypto krb5 151BASE_DISTS?= base 152DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} 153 154# mountpoint for filesystems. 155MNT= /mnt 156 157# Various floppy image parameters. 158# 159 160.if ${TARGET_ARCH} == "i386" 161.if ${TARGET} == "pc98" 162SMALLBOOTSIZE= 1200 163BOOTSIZE= 1440 164SMALLFIXITSIZE= 1200 165FIXITSIZE= 1440 166MFSSIZE= 4320 167BOOTINODE= 80000 168FIXITINODE= 40000 169MFSINODE= 8000 170SMALLBOOTLABEL= fd1200 171BOOTLABEL= fd1440 172SMALLFIXITLABEL= fd1200 173FIXITLABEL= fd1440 174MFSLABEL= minimum3 175.else 176DRIVERSIZE= 1440 177BOOTSIZE= 1440 178FIXITSIZE= 1440 179MFSSIZE= 4320 180BIGBOOTSIZE= 2880 181DRIVERINODE= 40000 182BOOTINODE= 80000 183FIXITINODE= 40000 184MFSINODE= 8000 185DRIVERLABEL= fd1440 186BOOTLABEL= fd1440 187FIXITLABEL= fd1440 188MFSLABEL= minimum3 189BIGBOOTLABEL= minimum2 190.endif 191.elif ${TARGET_ARCH} == "alpha" 192DRIVERSIZE= 1440 193BOOTSIZE= 1440 194FIXITSIZE= 2880 195MFSSIZE= 4320 196BIGBOOTSIZE= 2880 197DRIVERINODE= 80000 198BOOTINODE= 80000 199FIXITINODE= 40000 200MFSINODE= 8000 201DRIVERLABEL= fd1440 202BOOTLABEL= fd1440 203FIXITLABEL= minimum2 204MFSLABEL= auto 205BIGBOOTLABEL= minimum2 206.elif ${TARGET_ARCH} == "sparc64" 207BIGBOOTSIZE= 4096 208MFSSIZE= 4096 209BOOTINODE= 8192 210MFSINODE= 8192 211BIGBOOTLABEL= auto 212MFSLABEL= auto 213.elif ${TARGET_ARCH} == "ia64" 214BIGBOOTLABEL= efi 215BIGBOOTSIZE= 5154 216BOOTINODE= 15872 217MFSINODE= 8192 218MFSLABEL= auto 219MFSSIZE= 8192 220.endif 221 222ZIPNSPLIT= gzip --no-name -9 -c | split -b 1423k - 223 224# Things that need to be recompiled with Kerberos support. 225.if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) 226K5PROGS!= cd ${.CURDIR}/../kerberos5; ${MAKE} -V KPROGS 227.endif 228 229# Things that need to be compiled without crypto support in releases 230.if !defined(FIXCRYPTO) 231FIXCRYPTO= bin/ed usr.sbin/ppp usr.sbin/pppd usr.sbin/tcpdump/tcpdump \ 232 lib/libfetch usr.bin/fetch 233.if !defined(NO_SENDMAIL) 234FIXCRYPTO+= usr.sbin/sendmail 235.endif 236.endif 237 238 239# Things which may get you into trouble if you change them 240MTREEFILES= ${.CURDIR}/../etc/mtree 241_R?= /R 242RD= ${_R}/stage 243RND= ${RD}/release.doc 244FD= ${_R}/ftp 245CD= ${_R}/cdrom 246CD_DISC1= ${CD}/disc1 247CD_DISC2= ${CD}/disc2 248 249# Where the bootstrap ports (see DOCPORTS) get installed. 250LOCALDIR= /usr/local/bin 251 252# ia64 is different enough that we want our own doFS.sh. 253.if ${TARGET_ARCH} == "ia64" 254DOFS_SH= ${.CURDIR}/ia64/doFS.sh 255.elif ${TARGET} != ${MACHINE} 256DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${TARGET} 257.else 258DOFS_SH= ${.CURDIR}/scripts/doFS.sh "" 259.endif 260 261.if ${TARGET_ARCH} == "sparc64" 262CRUNCH_TARGETS= boot 263FIXIT_TARGET= 264.elif ${TARGET_ARCH} == "ia64" 265CRUNCH_TARGETS= boot 266FIXIT_TARGET= 267.elif ${TARGET} == "pc98" 268CRUNCH_TARGETS= boot fixit fixit-small 269.endif 270 271.if !defined(CRUNCH_TARGETS) 272CRUNCH_TARGETS= boot fixit 273.endif 274 275.if !defined(FIXIT_TARGET) 276FIXIT_TARGET= release.10 277.endif 278 279EXTRAS= ftp.1 280.if !defined(NOCDROM) 281EXTRAS+= cdrom.1 282.if defined(MAKE_ISOS) 283EXTRAS+= iso.1 284.if ${TARGET} != "pc98" 285BOOTABLE="-b" 286.endif 287.endif 288.endif 289 290.if !defined(NODOC) 291DOCREL= doc.1 doc.2 292.endif 293 294TMAKE!= echo MAKEFLAGS=\"-m ${.CURDIR}/../share/mk\"; \ 295 cd ${.CURDIR}/..; ${MAKE} -f Makefile.inc1 -V TMAKE 296WMAKEENV!= echo MAKEFLAGS=\"-m ${.CURDIR}/../share/mk\"; \ 297 cd ${.CURDIR}/..; ${CROSSMAKE} -f Makefile.inc1 -V WMAKEENV 298WMAKE= ${WMAKEENV} ${MAKE} 299 300CVS_SRCARGS= -P 301.if defined(RELEASETAG) 302CVS_SRCARGS+= -r ${RELEASETAG} 303.endif 304 305CVS_DOCARGS= -P 306.if defined(DOCRELEASETAG) 307CVS_DOCARGS+= -r ${DOCRELEASETAG} 308.endif 309 310CVS_PORTSARGS= -P 311.if defined(PORTSRELEASETAG) 312CVS_PORTSARGS+= -r ${PORTSRELEASETAG} 313.endif 314 315release rerelease: 316.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) 317 @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false 318.endif 319.if defined(NOPORTSATALL) && !defined(NODOC) 320 @echo "Ports are required for building the docs. Either set NODOC or" 321 @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!" 322 @exit 1 323.endif 324.if make(release) 325.if exists(${CHROOTDIR}) 326# The first command will fail on a handful of files that have their schg 327# flags set. But it greatly speeds up the next two commands. 328 # NB: clear any vestigal devfs mount, just in case 329 -umount ${CHROOTDIR}/dev > /dev/null 2>&1 330 -rm -rf ${CHROOTDIR} 2>/dev/null 331 -chflags -R noschg ${CHROOTDIR}/. 332 -rm -rf ${CHROOTDIR} 333.endif 334 mkdir -p ${CHROOTDIR} 335 @echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`" 336 cd ${.CURDIR}/.. && ${NATIVEMAKE} -DNOGAMES -DNOHTML -DNOINFO -DNOMAN \ 337 -DNOPROFILE installworld DESTDIR=${CHROOTDIR} 338 cd ${.CURDIR}/../etc && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR} 339 if [ -f /etc/resolv.conf ]; then \ 340 cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \ 341 fi 342.if defined(EXTLOCALDIR) 343 rm -rf ${CHROOTDIR}/usr/local 344 cd ${CHROOTDIR}/usr && cp -R ${EXTLOCALDIR} local 345.endif 346 rm -rf ${CHROOTDIR}/usr/src 347.if defined(EXTSRCDIR) 348 cd ${CHROOTDIR}/usr && \ 349 cp -R ${EXTSRCDIR} src 350.else 351 cd ${CHROOTDIR}/usr && \ 352 ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE} 353.endif 354.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) 355 cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} 356.endif 357.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) 358 cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} 359.endif 360 rm -rf ${CHROOTDIR}/usr/ports 361.if !defined(NOPORTSATALL) 362 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE} 363.endif 364.if !defined(NODOC) 365 rm -rf ${CHROOTDIR}/usr/doc 366.if defined(EXTDOCDIR) 367 cd ${CHROOTDIR}/usr && cp -R ${EXTDOCDIR} doc 368.else 369 cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE} 370.endif 371 if [ -d ${RELEASEDISTFILES}/ ]; then \ 372 cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \ 373 else \ 374 mkdir -p ${CHROOTDIR}/usr/ports/distfiles; \ 375 fi 376.if !defined(NO_PREFETCHDISTFILES) 377 @cd ${.CURDIR} && ${MAKE} fetch-distfiles 378.endif 379.endif 380.endif 381.if make(rerelease) 382.if !defined(RELEASENOUPDATE) 383.if !defined(RELEASETAG) 384 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d -A 385.else 386 cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d -r ${RELEASETAG} 387.endif 388 rm -f ${CHROOTDIR}/tmp/.world_done 389.if !defined(NOPORTS) 390 cd ${CHROOTDIR}/usr/ports && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d 391.endif 392.if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES" 393 for i in ${MINIMALDOCPORTS}; do \ 394 ( cd ${CHROOTDIR}/usr/$$i && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d ) ; \ 395 done 396.endif 397.if !defined(NODOC) 398 cd ${CHROOTDIR}/usr/doc && ${CVSPREFIX} cvs -R ${CVSARGS} -q update ${CVSCMDARGS} -P -d 399.endif 400.endif 401.endif 402 # Add version information to those things that need it. 403 if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \ 404 cd ${CHROOTDIR}/usr/src/sys/conf && \ 405 mv newvers.sh foo && \ 406 sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && \ 407 rm foo; \ 408 fi 409 -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release 410 echo "#!/bin/sh" > ${CHROOTDIR}/mk 411 echo "set -ex" >> ${CHROOTDIR}/mk 412 echo "trap 'umount /dev || true' 0" >> ${CHROOTDIR}/mk 413 echo "_RELTARGET=\$${1:-doRELEASE}" >> ${CHROOTDIR}/mk 414.for var in \ 415 AUTO_KEYBOARD_DETECT \ 416 BOOT_CONFIG \ 417 BUILDNAME \ 418 CD_EXTRA_BITS \ 419 DISTRIBUTIONS \ 420 DOC_LANG \ 421 DOMINIMALDOCPORTS \ 422 EXTRA_SRC \ 423 FIXCRYPTO \ 424 FTP_PASSIVE_MODE \ 425 FTP_PROXY \ 426 HTTP_PROXY \ 427 KERNELS \ 428 KERNEL_FLAGS \ 429 MAKE_ISOS \ 430 NOCDROM \ 431 NODOC \ 432 NOKERBEROS \ 433 NOPORTS \ 434 NOSHARED \ 435 NOSRC \ 436 NO_CPU_CFLAGS \ 437 NO_CPU_COPTFLAGS \ 438 NO_FLOPPIES \ 439 NO_SENDMAIL \ 440 RELEASETAG \ 441 RELNOTES_LANG \ 442 TARGET \ 443 TARGET_ARCH \ 444 WORLD_FLAGS 445.if defined(${var}) 446 echo "export ${var}=\"${${var}}\"" >> ${CHROOTDIR}/mk 447.endif 448.endfor 449 # Don't remove this, or the build will fall over! 450 echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk 451 echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:${LOCALDIR}" >> ${CHROOTDIR}/mk 452 echo "export MANBUILDCAT=YES" >> ${CHROOTDIR}/mk 453 # NB: these may fail if the host is running w/o devfs 454 echo "umount /dev >/dev/null 2>&1 || true" >> ${CHROOTDIR}/mk 455 echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" \ 456 >> ${CHROOTDIR}/mk 457 echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk 458 echo " cd /usr/src" >> ${CHROOTDIR}/mk 459 echo " ${CROSSMAKE} ${WORLD_FLAGS} -DNOCLEAN buildworld && \\" >> ${CHROOTDIR}/mk 460 echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk 461 echo "fi" >> ${CHROOTDIR}/mk 462.if defined(NOPORTS) || defined(NOPORTREADMES) 463 echo "if false; then" >> ${CHROOTDIR}/mk 464.else 465 echo "if true; then" >> ${CHROOTDIR}/mk 466.endif 467 echo " echo \">>> make readmes started on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk 468 echo " cd /usr/ports" >> ${CHROOTDIR}/mk 469 echo " make ${PORTREADMES_FLAGS} readmes" >> ${CHROOTDIR}/mk 470 echo " echo \">>> make readmes finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk 471 echo "fi" >> ${CHROOTDIR}/mk 472 echo "cd /usr/src/release" >> ${CHROOTDIR}/mk 473 echo "make obj" >> ${CHROOTDIR}/mk 474 echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk 475 echo "echo \">>> make ${.TARGET} for ${TARGET} finished on \`LC_ALL=C TZ=GMT date\`\"" >> ${CHROOTDIR}/mk 476 chmod 755 ${CHROOTDIR}/mk 477 # Ensure md.ko is loaded if md(4) is not statically compiled into the kernel 478 -mdconfig 2>/dev/null 479 env -i /usr/sbin/chroot ${CHROOTDIR} /mk 480 481clean: 482 rm -rf boot_crunch release.[0-9] 483 484fetch-distfiles: 485 @for i in ${DOCPORTS}; do \ 486 cd ${CHROOTDIR}/usr/ports/$$i && \ 487 make PORTSDIR=${CHROOTDIR}/usr/ports BATCH=yes \ 488 WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes \ 489 checksum-recursive ; \ 490 done 491 492# Clean out ${_R} and make the directory structure. 493release.1: 494 mkdir -p ${_R} 495 -rm -rf ${_R}/* 2> /dev/null 496 -chflags -R noschg ${_R}/. 497 rm -rf ${_R}/* 498 mkdir ${RD} 499 mkdir ${RD}/floppies 500 mkdir ${RD}/trees 501 mkdir ${RD}/kernels 502 for i in ${DISTRIBUTIONS} ; do \ 503 mkdir ${RD}/trees/$$i && \ 504 mtree -deU -f ${MTREEFILES}/BSD.root.dist \ 505 -p ${RD}/trees/$$i > /dev/null && \ 506 mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ 507 -p ${RD}/trees/$$i/usr > /dev/null && \ 508 mtree -deU -f ${MTREEFILES}/BSD.include.dist \ 509 -p ${RD}/trees/$$i/usr/include > /dev/null && \ 510 mtree -deU -f ${MTREEFILES}/BSD.var.dist \ 511 -p ${RD}/trees/$$i/var > /dev/null ; \ 512 done 513 touch release.1 514 515# Install the system into the various distributions. 516release.2: 517 cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/base 518 cd ${.CURDIR}/.. && ${CROSSMAKE} distributeworld DISTDIR=${RD}/trees 519 touch release.2 520 521# Build and install crypto and krb5 distributions. 522release.3: 523 # Handle some grief caused by the munition braindeadness. 524 cd ${.CURDIR}/..; \ 525 ${CROSSMAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DNOCRYPT \ 526 SUBDIR_OVERRIDE="${FIXCRYPTO}" \ 527 buildworld distributeworld DISTDIR=${RD}/trees 528.if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) 529 cd ${.CURDIR}/..; \ 530 ${CROSSMAKE} ${WORLD_FLAGS} -DNO_MAKEDB_RUN -DMAKE_KERBEROS5 \ 531 SUBDIR_OVERRIDE="kerberos5 ${K5PROGS}" \ 532 buildworld distributeworld DISTDIR=${RD}/trees 533 rm -f ${RD}/trees/krb5/usr/share/info/dir 534.endif 535 -chflags -R noschg ${RD}/trees 536 touch release.3 537 538# Make and install the generic kernel(s). 539release.4: 540.for kernel in ${KERNELS} 541 cd ${.CURDIR}/..; \ 542 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \ 543 KERNCONF=${kernel} INSTKERNNAME=${kernel} kernel \ 544 DESTDIR=${RD}/trees/base 545.endfor 546 # Install a standard boot kernel+modules. 547 cd ${.CURDIR}/..; \ 548 ${CROSSMAKE} ${KERNEL_FLAGS} \ 549 kernel \ 550 DESTDIR=${RD}/trees/base; \ 551 cd ${.CURDIR}/..; \ 552 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES \ 553 reinstallkernel -DINSTALL_DEBUG \ 554 DESTDIR=${RD}/trees/base 555 touch release.4 556 557# Make and install the three crunched binaries which live on the floppies. 558# You are not supposed to like this :-) 559release.5: 560 rm -rf ${RD}/crunch 561 mkdir -p ${RD}/crunch 562.for j in ${CRUNCH_TARGETS} 563 rm -rf ${j}_crunch 564 mkdir ${j}_crunch 565.if exists(${.CURDIR}/${TARGET}/${j}_crunch.conf) 566 cd ${j}_crunch; ${WMAKEENV} crunchgen -o ${.CURDIR}/${TARGET}/${j}_crunch.conf 567.else 568 cd ${j}_crunch; ${WMAKEENV} crunchgen -o ${.CURDIR}/${j}_crunch.conf 569.endif 570 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean 571 cd ${.CURDIR}/..; ${TMAKE} build-tools 572 cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk \ 573 CFLAGS="-Os -pipe" -DNO_CPU_CFLAGS all 574 ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch 575 mv ${j}_crunch/${j}_crunch ${RD}/crunch/${j} 576.endfor 577 touch release.5 578 579# 580# --==## Fix up the distributions. ##==-- 581# 582release.6: 583 # Create any "synthetic dists" now. 584 @for i in ${DISTRIBUTIONS}; do \ 585 if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ 586 echo -n "Running $$i dist creation script... "; \ 587 env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \ 588 echo "Done."; \ 589 fi \ 590 done \ 591 592 # Remove all the directories we don't need. 593 -cd ${RD}/trees && \ 594 find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir 595 touch release.6 596 597# 598# --==## Package up the tarballs from assembled trees ##==-- 599# 600release.7: 601 rm -rf ${RD}/dists 602 mkdir -p ${RD}/dists 603 @for i in ${DISTRIBUTIONS} ; \ 604 do \ 605 if [ -d ${RD}/trees/$${i} ] ; then \ 606 cd ${.CURDIR} && $(MAKE) doTARBALL \ 607 SD=${RD}/trees/$${i} \ 608 TN=$$i TD=$$i ARG="." && \ 609 echo "$${i} distribution is finished."; \ 610 fi ; \ 611 done 612 # More munition braindeadness. 613 ( cd ${RD}/dists && \ 614 if [ -f krb5/krb5.aa ] ; then \ 615 mv krb5/krb5.* crypto && \ 616 cat krb5/CHECKSUM.MD5 >> crypto/CHECKSUM.MD5 && \ 617 rm -r krb5; \ 618 fi ) 619 touch release.7 620 621 622# 623# --==## Make source dists ##==-- 624# 625release.8: 626.if !defined(NOSRC) 627 @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \ 628 TD=src TN=sbase ARG="[A-Z]*" 629 @for i in `cd /usr/src && echo [a-z]*` ; do \ 630 if [ -d /usr/src/$$i ] ; then \ 631 cd ${.CURDIR} && $(MAKE) doTARBALL \ 632 TN=`echo s$$i | tr -d '.' | \ 633 sed -e 's/usr/u/' \ 634 -e 's/kerberos5/krb5/'` \ 635 SD=/usr/src TD=src ARG="$$i" ; \ 636 fi ; \ 637 done 638.if defined(EXTRA_SRC) 639 @set ${EXTRA_SRC} && \ 640 while [ $$# -ge 2 ] ; do \ 641 if [ -d /usr/src/$$1 ] ; then \ 642 cd ${.CURDIR} && $(MAKE) doTARBALL \ 643 SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \ 644 fi && shift && shift ; \ 645 done 646.endif 647 if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \ 648 if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \ 649 if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \ 650 if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; \ 651 cd ${RD}/dists/crypto; rm -f CHECKSUM.MD5; \ 652 md5 * > CHECKSUM.MD5 ) ; fi 653 (cd ${RD}/dists/src; rm -f CHECKSUM.MD5; md5 * > CHECKSUM.MD5) 654 @echo "src distribution is finished." 655.endif 656 touch release.8 657 658# Complete the bootfd 659# 660# Now, just to get this picture down once and for all: 661# 662# +------------------------------------------------------------------------+ 663# |boot.flp | 664# +-----+-----+------------------------------------------------------------+ 665# |boot1|boot2|floppy filesystem "bootfd" | 666# +-----+-----+-+----------------------+---------------------------------+-+ 667# |kernel.gz |mfsroot.gz | 668# +----------------------+---------------------------------+ 669# 670 671release.9: 672.if ${TARGET_ARCH} != "ia64" || ${TARGET_ARCH} == ${MACHINE_ARCH} 673 rm -rf ${RD}/mfsfd 674 mkdir ${RD}/mfsfd 675 cd ${RD}/mfsfd && \ 676 mkdir -p etc/defaults dev mnt stand/etc/defaults stand/help 677 @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ 678 DIR=${RD}/mfsfd/stand ZIP=false 679 ( cd ${RD}/mfsfd && \ 680 for dir in bin sbin ; do \ 681 ln -sf /stand $$dir; \ 682 done ) 683 cp ${RD}/trees/base/sbin/dhclient-script ${RD}/mfsfd/stand 684.if ${TARGET} == "pc98" 685 cp ${.CURDIR}/../etc/defaults/pccard.conf ${RD}/mfsfd/etc/defaults/pccard.conf 686.endif 687 cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf 688 ( for F in defaults/rc.conf netconfig protocols ; do \ 689 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \ 690 ${RD}/trees/base/etc/$$F > ${RD}/mfsfd/stand/etc/$$F ; \ 691 done ) 692 grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]' \ 693 ${RD}/trees/base/etc/services | \ 694 sed -e '/^#.*$$/d' -e 's/[:space:]*#.*$$//g' \ 695 > ${RD}/mfsfd/stand/etc/services 696 ln ${RD}/mfsfd/stand/etc/services ${RD}/mfsfd/etc/services 697 ln ${RD}/mfsfd/stand/etc/netconfig ${RD}/mfsfd/etc/netconfig 698 cp ${RD}/trees/base/COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp 699.if !defined(NODOC) 700 @for i in ${DIST_DOCS_ARCH_INDEP}; do \ 701 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 702 done 703 @for i in ${DIST_DOCS_ARCH_DEP}; do \ 704 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt ${RD}/mfsfd/stand/help/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 705 done 706 @mv ${RD}/mfsfd/stand/help/INSTALLATION.TXT ${RD}/mfsfd/stand/help/INSTALL.TXT 707 @mv ${RD}/mfsfd/stand/help/EARLY-ADOPTER.TXT ${RD}/mfsfd/stand/help/EARLY.TXT 708.endif 709 -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd 710 @mkdir -p ${RD}/mfsfd/boot 711.if ${TARGET_ARCH} != "ia64" 712 @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot 713.endif 714.if ${TARGET} == "i386" 715 @cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot 716.endif 717 @echo "Making the regular boot floppy." 718 @tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \ 719 tar xf - -C ${RD}/mfsfd/stand 720.if ${TARGET_ARCH} == "alpha" && !defined(NO_FLOPPIES) 721 rm -rf ${RD}/mfsfd/stand/help/* 722.endif 723.if defined(SMALLBOOTSIZE) 724.if exists(${.CURDIR}/${TARGET}/drivers-small.conf) 725 @rm -rf ${RD}/mfsfd/modules 726 @mkdir -p ${RD}/mfsfd/modules 727 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 2 \ 728 ${.CURDIR}/${TARGET}/drivers-small.conf \ 729 ${RD}/trees/base/boot/kernel ${RD}/mfsfd/modules 730.endif 731 sh -e ${DOFS_SH} mfsroot ${RD} ${MNT} \ 732 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} 733 @gzip -9vc mfsroot > mfsroot.gz 734 @sh -e ${DOFS_SH} ${RD}/floppies/mfsroot-small.flp \ 735 ${RD} ${MNT} ${SMALLBOOTSIZE} mfsroot.gz \ 736 ${BOOTINODE} ${SMALLBOOTLABEL} 737.endif 738.if exists(${.CURDIR}/${TARGET}/drivers.conf) 739 @rm -rf ${RD}/mfsfd/modules 740 @mkdir -p ${RD}/mfsfd/modules 741 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 2 \ 742 ${.CURDIR}/${TARGET}/drivers.conf \ 743 ${RD}/trees/base/boot/kernel ${RD}/mfsfd/modules 744 @rm -rf ${RD}/driversfd 745 @mkdir ${RD}/driversfd 746 @awk -f ${.CURDIR}/scripts/driver-copy2.awk 3 \ 747 ${.CURDIR}/${TARGET}/drivers.conf \ 748 ${RD}/trees/base/boot/kernel ${RD}/driversfd 749 -@rmdir ${RD}/driversfd 750 if [ -d ${RD}/driversfd ]; then \ 751 sh -e ${DOFS_SH} \ 752 ${RD}/floppies/drivers.flp ${RD} ${MNT} ${DRIVERSIZE} \ 753 ${RD}/driversfd ${DRIVERINODE} ${DRIVERLABEL}; \ 754 cd ${RD}/driversfd && awk -f ${.CURDIR}/scripts/driver-desc.awk \ 755 *.dsc >> ${RD}/floppies/DRIVERS.TXT; \ 756 fi 757.endif 758 sh -e ${DOFS_SH} mfsroot ${RD} ${MNT} \ 759 ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} 760 @gzip -9vc mfsroot > mfsroot.gz 761 @mkdir -p ${RD}/mfsroot 762 @cp mfsroot.gz ${RD}/mfsroot 763.if !defined(NO_FLOPPIES) 764.if defined(BOOTSIZE) 765 @sh -e ${DOFS_SH} ${RD}/floppies/mfsroot.flp \ 766 ${RD} ${MNT} ${BOOTSIZE} mfsroot.gz ${BOOTINODE} ${BOOTLABEL} 767 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern 768.endif 769.if defined(SMALLBOOTSIZE) 770 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern-small FDSIZE=SMALL 771.endif 772.if defined(BIGBOOTSIZE) 773 @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=boot FDSIZE=BIG 774.endif 775.endif 776 @rm mfsroot mfsroot.gz 777 @echo "Regular and MFS boot floppies made." 778.endif 779 touch release.9 780 781# 782# --==## Create a fixit floppy ##==-- 783# 784release.10: 785.if !defined(NO_FLOPPIES) 786 @echo "Making fixit floppy." 787 @rm -rf ${RD}/fixitfd 788 @mkdir ${RD}/fixitfd 789 @cd ${RD}/fixitfd && \ 790 mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \ 791 usr/share/misc 792 @cp ${RD}/trees/base/etc/spwd.db ${RD}/trees/base/etc/group \ 793 ${RD}/trees/base/etc/protocols ${RD}/fixitfd/etc 794 @cp ${RD}/trees/base/usr/share/misc/scsi_modes \ 795 ${RD}/fixitfd/usr/share/misc 796 @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile 797 @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services 798 @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar 799 @chmod 555 ${RD}/fixitfd/stand/tar 800.if defined(SMALLFIXITSIZE) 801 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit-small \ 802 DIR=${RD}/fixitfd/stand ZIP=false 803 @sh -e ${DOFS_SH} ${RD}/floppies/fixit-small.flp \ 804 ${RD} ${MNT} ${SMALLFIXITSIZE} ${RD}/fixitfd ${FIXITINODE} \ 805 ${SMALLFIXITLABEL} 806 @rm -rf ${RD}/fixitfd/stand 807 @mkdir ${RD}/fixitfd/stand 808.endif 809 @cd ${.CURDIR} && ${MAKE} installCRUNCH CRUNCH=fixit \ 810 DIR=${RD}/fixitfd/stand ZIP=false 811 @sh -e ${DOFS_SH} ${RD}/floppies/fixit.flp ${RD} \ 812 ${MNT} ${FIXITSIZE} ${RD}/fixitfd ${FIXITINODE} ${FIXITLABEL} 813# Do our last minute floppies directory setup in a convenient place. 814.if !defined(NODOC) 815 @cp ${RND}/${RELNOTES_LANG}/installation/${TARGET}/article.txt \ 816 ${RD}/floppies/README.TXT 817 @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5) 818.else 819 @(cd ${RD}/floppies; md5 *.flp > CHECKSUM.MD5) 820.endif 821.endif 822 touch release.10 823 824# 825# --==## Setup a suitable ftp-area ##==-- 826# 827ftp.1: 828 @echo "Setting up FTP distribution area" 829 @mkdir -p ${FD} 830 -@ln -s . ${FD}/${BUILDNAME} 831 @cd ${RD} && find floppies -print | cpio -dumpl ${FD} 832 @cd ${RD}/dists && find . -print | cpio -dumpl ${FD} 833.if !defined(NODOC) 834 @for i in ${DIST_DOCS_ARCH_INDEP}; do \ 835 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 836 cp ${RND}/${RELNOTES_LANG}/$$i/article.html ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ 837 done 838 @for i in ${DIST_DOCS_ARCH_DEP}; do \ 839 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 840 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html ${FD}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ 841 done 842 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${FD} 843 @mv ${FD}/INSTALLATION.TXT ${FD}/INSTALL.TXT 844 @mv ${FD}/INSTALLATION.HTM ${FD}/INSTALL.HTM 845 @mv ${FD}/EARLY-ADOPTER.TXT ${FD}/EARLY.TXT 846 @mv ${FD}/EARLY-ADOPTER.HTM ${FD}/EARLY.HTM 847.endif 848 @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf 849.if !defined(NOPORTS) 850 @tar --exclude CVS -cBf - -C ${CD_DISC1} ports | tar -xBf - -C ${FD} 851.endif 852 touch ftp.1 853 854# 855# --==## Setup a suitable cdrom-area ##==-- 856# 857cdrom.1: 858 @echo "Setting up CDROM distribution area" 859 @mkdir -p ${CD_DISC1} ${CD_DISC2} 860 -@ln -s . ${CD_DISC1}/${BUILDNAME} 861 @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1} 862 @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1} 863 @for i in ${DISTRIBUTIONS} ; \ 864 do \ 865 if [ -d ${RD}/trees/$${i} ] ; then \ 866 chflags -R noschg ${RD}/trees/$${i} || true ; \ 867 ( cd ${RD}/trees/$${i} && \ 868 find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \ 869 fi \ 870 done 871 @rm -f ${CD_DISC2}/.profile 872 @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile 873 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf 874 @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf 875.if !defined(NODOC) 876 @for i in ${DIST_DOCS_ARCH_INDEP}; do \ 877 cp ${RND}/${RELNOTES_LANG}/$$i/article.txt ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 878 cp ${RND}/${RELNOTES_LANG}/$$i/article.html ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ 879 done 880 @for i in ${DIST_DOCS_ARCH_DEP}; do \ 881 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \ 882 cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html ${CD_DISC1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \ 883 done 884 @cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DISC1} 885 @mv ${CD_DISC1}/INSTALLATION.TXT ${CD_DISC1}/INSTALL.TXT 886 @mv ${CD_DISC1}/INSTALLATION.HTM ${CD_DISC1}/INSTALL.HTM 887 @mv ${CD_DISC1}/EARLY-ADOPTER.TXT ${CD_DISC1}/EARLY.TXT 888 @mv ${CD_DISC1}/EARLY-ADOPTER.HTM ${CD_DISC1}/EARLY.HTM 889.endif 890.if ${TARGET} != "pc98" 891 @echo "Setting up /boot" 892 @rm -f ${CD_DISC2}/boot/loader.conf 893 @cp ${RD}/mfsroot/mfsroot.gz ${CD_DISC2}/boot/mfsroot.gz 894 @echo 'mfsroot_load="YES"' > ${CD_DISC2}/boot/loader.conf 895 @echo 'mfsroot_type="mfs_root"' >> ${CD_DISC2}/boot/loader.conf 896 @echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DISC2}/boot/loader.conf 897 @cp -Rp ${CD_DISC2}/boot ${CD_DISC1} 898.endif 899.if ${TARGET} == "i386" 900 @mkdir -p ${CD_DISC2}/floppies 901 @cp ${CD_DISC1}/floppies/boot.flp ${CD_DISC2}/floppies 902.endif 903.if !defined(NOPORTS) 904 @mkdir -p ${CD_DISC1}/ports && \ 905 tar --exclude CVS --exclude 'ports/distfiles/*' -czf \ 906 ${CD_DISC1}/ports/ports.tgz -C /usr ports && \ 907 cp ${.CURDIR}/scripts/ports-install.sh ${CD_DISC1}/ports/install.sh \ 908 && (cd ${CD_DISC1}/ports; md5 * > CHECKSUM.MD5) 909.endif 910 touch cdrom.1 911 912iso.1: 913.if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh) 914 @echo "Creating ISO images..." 915 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ 916 fbsd_miniinst \ 917 ${CD}/${BUILDNAME}-${TARGET}-miniinst.iso ${CD_DISC1}; \ 918 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ 919 fbsd_livefs \ 920 ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} 921.if defined(CD_EXTRA_BITS) 922 @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ 923 ${BOOTABLE} fbsd_boot \ 924 ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ 925 ${CD_EXTRA_BITS} \ 926 && false 927.endif 928 touch iso.1 929.else 930 @echo "Do not know how to create an ISO for ${TARGET_ARCH}." 931.endif 932 933# 934# --==## Documentation Project files such as the Handbook and FAQ ##==-- 935# 936doc.1: 937 @echo "Making docs..." 938 @for i in ${DOCPORTS}; do \ 939 cd /usr/ports/$$i && \ 940 env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \ 941 make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \ 942 WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \ 943 done 944 @cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc 945 touch doc.1 946 947# 948# --==## RELNOTESng: Next-generation replacements for *.TXT files ##==-- 949# 950doc.2: 951 @echo "Making release documentation..." 952 @cd ${.CURDIR}/doc && make all install clean 'FORMATS=html txt' INSTALL_COMPRESSED='' DOCDIR=${RND} 953 touch doc.2 954 955# Various "subroutine" and other supporting targets. 956 957# RD= 958# SD= 959# TD= 960# ARG= 961doTARBALL: 962.if !defined(SD) 963 @echo "SD undefined in doTARBALL" && exit 1 964.endif 965.if !defined(TD) 966 @echo "TD undefined in doTARBALL" && exit 1 967.endif 968.if !defined(ARG) 969 @echo "ARG undefined in doTARBALL" && exit 1 970.endif 971 @rm -rf ${RD}/dists/${TD}/${TN}* 972 @mkdir -p ${RD}/dists/${TD} 973 @( cd ${SD} && \ 974 tn=`echo ${TN} | tr '[A-Z]' '[a-z]' | cut -c1-8` && \ 975 echo rolling ${TD}/$$tn tarball &&\ 976 tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ 977 ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \ 978 sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn > \ 979 ${RD}/dists/${TD}/$$tn.inf && \ 980 if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \ 981 cp -p ${.CURDIR}/scripts/$${TD}-install.sh ${RD}/dists/${TD}/install.sh; \ 982 fi && \ 983 if [ "${SD}" != "/usr/src" ]; then \ 984 mtree -c -i -p ${SD}/${ARG} \ 985 -k gname,md5digest,mode,nlink,uname,size,link,type \ 986 > ${RD}/dists/${TD}/$$tn.mtree ; \ 987 else \ 988 true; \ 989 fi; \ 990 (cd ${RD}/dists/${TD}; \ 991 rm -f CHECKSUM.MD5; \ 992 md5 * > CHECKSUM.MD5) \ 993 ) 994 995doRELEASE: release.1 release.2 release.3 ${DOCREL} release.4 release.5 \ 996 release.6 release.7 release.8 release.9 ${FIXIT_TARGET} 997 @cd ${.CURDIR} && ${MAKE} ${EXTRAS} 998 @echo "Release done" 999 1000floppies: 1001 @cd ${.CURDIR} && ${MAKE} boot.flp 1002 @cd ${.CURDIR} && ${MAKE} fixit.flp 1003 @cd ${RD} && find floppies -print | cpio -dumpl ${FD} 1004 1005boot.flp: 1006 @rm -f release.5 release.9 1007 @cd ${.CURDIR} && ${MAKE} release.5 release.9 CRUNCH_TARGETS=boot 1008 1009fixit.flp: 1010 @rm -f release.5 release.10 1011 @cd ${.CURDIR} && ${MAKE} release.5 release.10 CRUNCH_TARGETS=fixit 1012 1013installCRUNCH: 1014.if !defined(CRUNCH) 1015 @echo "CRUNCH undefined in installCRUNCH" && exit 1 1016.endif 1017.if !defined(DIR) 1018 @echo "DIR undefined in installCRUNCH" && exit 1 1019.endif 1020.if !defined(ZIP) 1021 @echo "ZIP undefined in installCRUNCH" && exit 1 1022.endif 1023 @if ${ZIP} ; then \ 1024 gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \ 1025 else \ 1026 ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \ 1027 fi 1028 @chmod 555 ${DIR}/${CRUNCH}_crunch 1029 @if [ -f ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf ] ; then \ 1030 for i in `crunchgen -l ${.CURDIR}/${TARGET}/${CRUNCH}_crunch.conf` ; do \ 1031 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ 1032 done \ 1033 else \ 1034 for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \ 1035 ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ 1036 done \ 1037 fi 1038 1039# 1040# --==## Put a filesystem into a BOOTMFS kernel ##==-- 1041# 1042doMFSKERN: 1043 @echo "Running ${.TARGET} for ${FSIMAGE}" 1044 @rm -f ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE} 1045 @cd ${.CURDIR}/../sys/${TARGET}/conf && \ 1046 sh ${.CURDIR}/${TARGET}/dokern.sh ${FDSIZE} < GENERIC > BOOTMFS && \ 1047 [ -r GENERIC.hints ] && cp GENERIC.hints BOOTMFS.hints 1048.if defined(FDSIZE) && ${FDSIZE} == "SMALL" && \ 1049 exists(${.CURDIR}/${TARGET}/drivers-small.conf) 1050 @awk -f ${.CURDIR}/scripts/driver-remove.awk \ 1051 ${.CURDIR}/${TARGET}/drivers-small.conf \ 1052 ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS 1053.elif exists(${.CURDIR}/${TARGET}/drivers.conf) 1054 @awk -f ${.CURDIR}/scripts/driver-remove.awk \ 1055 ${.CURDIR}/${TARGET}/drivers.conf \ 1056 ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS 1057.endif 1058 cd ${.CURDIR}/..; \ 1059 KERNEL_KO=BOOTMFS KODIR= \ 1060 ${CROSSMAKE} ${KERNEL_FLAGS} -DNO_MODULES -DNO_KERNELCLEAN \ 1061 KERNCONF=BOOTMFS COPTFLAGS="-Os -pipe" -DNO_CPU_COPTFLAGS \ 1062 buildkernel reinstallkernel \ 1063 DESTDIR=${RD}/kernels 1064 [ -r ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS.hints ] && \ 1065 cp ${.CURDIR}/../sys/${TARGET}/conf/BOOTMFS.hints ${RD}/kernels 1066 @rm -rf ${RD}/image.${FSIMAGE} 1067 @mkdir ${RD}/image.${FSIMAGE} 1068 @cd ${RD}/kernels && \ 1069 (chflags noschg BOOTMFS || true) && \ 1070 ${WMAKEENV} strip BOOTMFS && \ 1071 cp BOOTMFS BOOTMFS.${FSIMAGE} && \ 1072 [ -r BOOTMFS.hints ] && mv BOOTMFS.hints BOOTMFS.${FSIMAGE}.hints 1073 mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel 1074 @echo "Setting up /boot directory for ${FSIMAGE} floppy" 1075 @mkdir -p ${RD}/image.${FSIMAGE}/boot 1076.if ${TARGET} == "i386" 1077 @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o \ 1078 -o ${RD}/image.${FSIMAGE}/boot/loader ${RD}/trees/base/boot/loader 1079.elif ${TARGET_ARCH} == "ia64" 1080 @cp ${RD}/trees/base/boot/loader.efi ${RD}/image.${FSIMAGE}/boot 1081.else 1082 @cp ${RD}/trees/base/boot/loader ${RD}/image.${FSIMAGE}/boot 1083.endif 1084 @[ -r ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints ] && \ 1085 sed -e '/^hint/s/^/set /' -e '/^#/d' \ 1086 ${RD}/kernels/BOOTMFS.${FSIMAGE}.hints > \ 1087 ${RD}/image.${FSIMAGE}/boot/device.hints && \ 1088 echo "include /boot/device.hints" > ${RD}/image.${FSIMAGE}/boot/loader.rc 1089 @echo "load /kernel" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1090.if !defined(FDSIZE) || ${FDSIZE} != "BIG" 1091 @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1092 @echo "echo Please insert MFS root floppy and press enter:" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1093 @echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1094.endif 1095 @echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1096.if ${TARGET_ARCH} != "ia64" 1097 @echo "set hint.acpi.0.disabled=1" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1098.endif 1099 @if [ -r ${RD}/floppies/drivers.flp ]; then \ 1100 echo "set driver_floppy=YES" >> ${RD}/image.${FSIMAGE}/boot/loader.rc; \ 1101 fi 1102 @echo "set module_path=\"/modules;/dist\"" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1103 @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1104 @echo "autoboot 10" >> ${RD}/image.${FSIMAGE}/boot/loader.rc 1105.if ${TARGET_ARCH} == "i386" && ${AUTO_KEYBOARD_DETECT} 1106 @echo "-P" >> ${RD}/image.${FSIMAGE}/boot.config 1107.endif 1108 @gzip -9v ${RD}/image.${FSIMAGE}/kernel 1109 @rm -f ${RD}/floppies/${FSIMAGE}.flp 1110.if defined(FDSIZE) && ${FDSIZE} == "BIG" 1111 @cp mfsroot.gz ${RD}/image.${FSIMAGE} 1112 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \ 1113 ${RD} ${MNT} ${BIGBOOTSIZE} ${RD}/image.${FSIMAGE} \ 1114 ${BOOTINODE} ${BIGBOOTLABEL} 1115.elif defined(FDSIZE) && ${FDSIZE} == "SMALL" 1116 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \ 1117 ${RD} ${MNT} ${SMALLBOOTSIZE} ${RD}/image.${FSIMAGE} \ 1118 ${BOOTINODE} ${SMALLBOOTLABEL} 1119.else 1120 sh -e ${DOFS_SH} ${RD}/floppies/${FSIMAGE}.flp \ 1121 ${RD} ${MNT} ${BOOTSIZE} ${RD}/image.${FSIMAGE} \ 1122 ${BOOTINODE} ${BOOTLABEL} 1123.endif 1124 @echo "Created ${RD}/floppies/${FSIMAGE}.flp" 1125 1126.include <bsd.obj.mk> 1127