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