1999-08-28 01:35:59 +00:00
|
|
|
# $FreeBSD$
|
1994-09-23 08:28:25 +00:00
|
|
|
#
|
2011-03-14 13:47:17 +00:00
|
|
|
# Makefile for building releases and release media.
|
|
|
|
#
|
|
|
|
# User-driven targets:
|
|
|
|
# cdrom: Builds release CD-ROM media (release.iso)
|
2011-04-18 13:20:54 +00:00
|
|
|
# memstick: Builds memory stick image (memstick)
|
2011-03-14 13:47:17 +00:00
|
|
|
# ftp: Sets up FTP distribution area (ftp)
|
|
|
|
# release: Build all media and FTP distribution area
|
2011-04-11 14:30:45 +00:00
|
|
|
# install: Copies all release media into ${DESTDIR}
|
2011-03-14 13:47:17 +00:00
|
|
|
#
|
|
|
|
# Variables affecting the build process:
|
|
|
|
# WORLDDIR: location of src tree -- must have built world and default kernel
|
|
|
|
# (by default, the directory above this one)
|
|
|
|
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
|
|
|
|
# DOCDIR: location of doc tree (default: /usr/doc)
|
|
|
|
# NOPORTS: if set, do not distribute ports tree
|
|
|
|
# NOSRC: if set, do not distribute source tree
|
|
|
|
# NODOC: if set, do not generate release documentation
|
|
|
|
# TARGET/TARGET_ARCH: architecture of built release
|
2001-02-19 14:23:49 +00:00
|
|
|
#
|
2009-08-14 20:35:42 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
WORLDDIR?= ${.CURDIR}/..
|
|
|
|
PORTSDIR?= /usr/ports
|
|
|
|
DOCDIR?= /usr/doc
|
|
|
|
RELNOTES_LANG?= en_US.ISO8859-1
|
2000-07-20 03:07:29 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
TARGET?= ${MACHINE}
|
2011-05-18 17:39:28 +00:00
|
|
|
.if ${TARGET} == ${MACHINE}
|
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
2002-02-03 07:00:37 +00:00
|
|
|
.else
|
2011-05-18 17:39:28 +00:00
|
|
|
TARGET_ARCH?= ${TARGET}
|
2002-02-03 07:00:37 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
|
2012-03-08 01:47:12 +00:00
|
|
|
DISTDIR= dist
|
2000-06-04 04:41:41 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
.if !exists(${DOCDIR})
|
|
|
|
NODOC= true
|
2005-06-16 18:16:14 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
.if !exists(${PORTSDIR})
|
|
|
|
NOPORTS= true
|
2010-07-13 21:19:59 +00:00
|
|
|
.endif
|
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES=
|
2003-08-02 18:21:02 +00:00
|
|
|
.if !defined(NOPORTS)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= ports.txz
|
2003-08-02 18:21:02 +00:00
|
|
|
.endif
|
1997-06-24 23:08:18 +00:00
|
|
|
.if !defined(NOSRC)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= src.txz
|
1997-06-24 23:08:18 +00:00
|
|
|
.endif
|
2001-05-30 17:05:15 +00:00
|
|
|
.if !defined(NODOC)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= reldoc
|
2002-11-04 00:50:01 +00:00
|
|
|
.endif
|
2003-07-25 08:54:41 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
RELEASE_TARGETS= ftp
|
2012-03-08 01:47:12 +00:00
|
|
|
IMAGES=
|
2011-03-14 13:47:17 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
|
|
|
|
RELEASE_TARGETS+= cdrom
|
2012-03-08 01:47:12 +00:00
|
|
|
IMAGES+= release.iso bootonly.iso
|
2002-10-21 14:21:08 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
|
|
|
|
RELEASE_TARGETS+= memstick
|
2012-03-08 01:47:12 +00:00
|
|
|
IMAGES+= memstick
|
2002-11-01 20:53:50 +00:00
|
|
|
.endif
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
.include <bsd.obj.mk>
|
2005-03-02 22:46:07 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
base.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}
|
|
|
|
cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
|
2011-03-14 13:47:17 +00:00
|
|
|
# Set up mergemaster root database
|
2011-08-18 16:54:04 +00:00
|
|
|
sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
|
2012-03-08 01:47:12 +00:00
|
|
|
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base"
|
2011-07-09 23:01:54 +00:00
|
|
|
# Package all components
|
2012-03-08 01:47:12 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
|
|
|
|
mv ${DISTDIR}/*.txz .
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
kernel.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}
|
|
|
|
cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR}
|
|
|
|
mv ${DISTDIR}/kernel*.txz .
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
src.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}/usr
|
2011-03-14 13:47:17 +00:00
|
|
|
ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
|
|
|
|
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \
|
|
|
|
--exclude CVS usr/src
|
|
|
|
|
|
|
|
ports.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}/usr
|
2011-03-14 13:47:17 +00:00
|
|
|
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
|
|
|
|
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \
|
2012-03-09 02:23:03 +00:00
|
|
|
--exclude CVS --exclude .svn \
|
2011-03-14 13:47:17 +00:00
|
|
|
--exclude usr/ports/distfiles --exclude usr/ports/packages \
|
|
|
|
--exclude 'usr/ports/INDEX*' --exclude work usr/ports
|
|
|
|
|
|
|
|
reldoc:
|
|
|
|
cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
|
|
|
|
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p reldoc
|
2011-03-14 13:47:17 +00:00
|
|
|
.for i in hardware readme relnotes errata
|
2012-03-08 01:47:12 +00:00
|
|
|
ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:U}.TXT
|
|
|
|
ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:U}.HTM
|
2011-03-14 13:47:17 +00:00
|
|
|
.endfor
|
2012-03-08 01:47:12 +00:00
|
|
|
cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
system: packagesystem
|
|
|
|
# Install system
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p release
|
2011-06-15 23:38:15 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
|
2011-06-15 23:56:40 +00:00
|
|
|
DESTDIR=${.OBJDIR}/release WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1
|
2011-03-14 13:47:17 +00:00
|
|
|
# Copy distfiles
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p release/usr/freebsd-dist
|
|
|
|
cp *.txz MANIFEST release/usr/freebsd-dist
|
2011-03-14 13:47:17 +00:00
|
|
|
# Copy documentation, if generated
|
2006-11-16 23:09:35 +00:00
|
|
|
.if !defined(NODOC)
|
2012-03-08 01:47:12 +00:00
|
|
|
cp reldoc/* release
|
2003-03-17 05:46:10 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
# Set up installation environment
|
2012-03-08 01:47:12 +00:00
|
|
|
ln -s /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf
|
|
|
|
echo sendmail_enable=\"NONE\" > release/etc/rc.conf
|
|
|
|
echo hostid_enable=\"NO\" >> release/etc/rc.conf
|
|
|
|
cp ${.CURDIR}/rc.local release/etc
|
|
|
|
touch ${.TARGET}
|
2001-07-23 09:01:46 +00:00
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
bootonly: packagesystem
|
|
|
|
# Install system
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p bootonly
|
2011-03-27 23:46:12 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
|
|
|
|
DESTDIR=${.OBJDIR}/bootonly WITHOUT_AMD=1 WITHOUT_AT=1 \
|
|
|
|
WITHOUT_BIND_DNSSEC=1 WITHOUT_BIND_ETC=1 WITHOUT_BIND_MTREE=1 \
|
|
|
|
WITHOUT_BIND_NAMED=1 WITHOUT_GAMES=1 WITHOUT_GROFF=1 \
|
|
|
|
WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \
|
2011-06-15 23:56:40 +00:00
|
|
|
WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \
|
|
|
|
WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \
|
|
|
|
WITHOUT_KERNEL_SYMBOLS=1
|
2011-03-27 23:46:12 +00:00
|
|
|
# Copy manifest only (no distfiles) to get checksums
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p bootonly/usr/freebsd-dist
|
|
|
|
cp MANIFEST bootonly/usr/freebsd-dist
|
2011-03-27 23:46:12 +00:00
|
|
|
# Copy documentation, if generated
|
|
|
|
.if !defined(NODOC)
|
2012-03-08 01:47:12 +00:00
|
|
|
cp reldoc/* bootonly
|
2011-03-27 23:46:12 +00:00
|
|
|
.endif
|
|
|
|
# Set up installation environment
|
2012-03-08 01:47:12 +00:00
|
|
|
ln -s /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf
|
|
|
|
echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf
|
|
|
|
echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf
|
|
|
|
cp ${.CURDIR}/rc.local bootonly/etc
|
2011-03-27 23:46:12 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
release.iso: system
|
2012-03-08 01:47:12 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release
|
1997-06-22 17:21:59 +00:00
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
bootonly.iso: bootonly
|
2012-03-08 01:47:12 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly
|
2011-03-27 23:46:12 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
memstick: system
|
2012-03-08 01:47:12 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET}
|
2001-04-27 21:28:02 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
|
2012-03-08 01:47:12 +00:00
|
|
|
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
|
2011-04-11 14:30:45 +00:00
|
|
|
touch ${.TARGET}
|
1995-02-26 01:35:32 +00:00
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
cdrom: release.iso bootonly.iso
|
2011-03-14 13:47:17 +00:00
|
|
|
ftp: packagesystem
|
2011-04-11 14:30:45 +00:00
|
|
|
rm -rf ftp
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ftp
|
2011-04-11 14:30:45 +00:00
|
|
|
cp *.txz MANIFEST ftp
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
2011-05-18 17:39:28 +00:00
|
|
|
release:
|
|
|
|
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
|
|
|
|
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
clean:
|
2012-03-08 01:47:12 +00:00
|
|
|
chflags -R noschg .
|
2011-04-11 14:30:45 +00:00
|
|
|
rm -rf dist ftp
|
2011-03-14 13:47:17 +00:00
|
|
|
rm -f packagesystem
|
2011-04-11 14:30:45 +00:00
|
|
|
rm -f *.txz MANIFEST
|
2011-03-14 13:47:17 +00:00
|
|
|
rm -f system
|
2011-04-11 14:30:45 +00:00
|
|
|
rm -rf release bootonly
|
|
|
|
rm -f release.iso bootonly.iso memstick
|
|
|
|
|
|
|
|
install:
|
2012-03-08 01:47:12 +00:00
|
|
|
.if defined(DESTDIR) && !empty(DESTDIR)
|
|
|
|
mkdir -p ${DESTDIR}
|
|
|
|
.endif
|
|
|
|
cp -a ${IMAGES} ftp ${DESTDIR}/
|