Add an install target to release/Makefile instead of grubbing around

(and requesting that users grub around) in /usr/obj. Also make sure that
make clean removes the bootonly media and clean up that target a little.
This commit is contained in:
Nathan Whitehorn 2011-04-11 14:30:45 +00:00
parent a03467b1ba
commit 299a8b95ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220540
3 changed files with 28 additions and 23 deletions

View File

@ -6,6 +6,7 @@
# cdrom: Builds release CD-ROM media (release.iso) # cdrom: Builds release CD-ROM media (release.iso)
# ftp: Sets up FTP distribution area (ftp) # ftp: Sets up FTP distribution area (ftp)
# release: Build all media and FTP distribution area # release: Build all media and FTP distribution area
# install: Copies all release media into ${DESTDIR}
# #
# Variables affecting the build process: # Variables affecting the build process:
# WORLDDIR: location of src tree -- must have built world and default kernel # WORLDDIR: location of src tree -- must have built world and default kernel
@ -159,22 +160,26 @@ memstick: system
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz > ${.OBJDIR}/MANIFEST sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz > ${.OBJDIR}/MANIFEST
touch ${.OBJDIR}/${.TARGET} touch ${.TARGET}
cdrom: release.iso bootonly.iso cdrom: release.iso bootonly.iso
ftp: packagesystem ftp: packagesystem
rm -rf ${.OBJDIR}/ftp rm -rf ftp
mkdir ${.OBJDIR}/ftp mkdir ftp
cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST ${.OBJDIR}/ftp cp *.txz MANIFEST ftp
release: obj ${RELEASE_TARGETS} release: obj ${RELEASE_TARGETS}
clean: clean:
chflags -R noschg ${.OBJDIR} chflags -R noschg ${.OBJDIR}
rm -rf ${.OBJDIR}/dist ${.OBJDIR}/ftp rm -rf dist ftp
rm -f packagesystem rm -f packagesystem
rm -f ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST rm -f *.txz MANIFEST
rm -f system rm -f system
rm -rf ${.OBJDIR}/release rm -rf release bootonly
rm -f ${.OBJDIR}/release.iso ${.OBJDIR}/memstick rm -f release.iso bootonly.iso memstick
install:
-mkdir ${DESTDIR}
cp -a *.iso memstick ftp ${DESTDIR}/

View File

@ -60,7 +60,5 @@ if [ -d $2/usr/doc ]; then
fi fi
chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1
chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 chroot $2 /bin/sh -c "cd /usr/src/release && make release install DESTDIR=/R" || exit 1
mkdir $2/R
cp -pRP $2/usr/obj/usr/src/release/*.iso $2/usr/obj/usr/src/release/memstick $2/usr/obj/usr/src/release/ftp $2/R

View File

@ -153,17 +153,17 @@ The release makefile
is fairly abstruse. is fairly abstruse.
Most developers will only be concerned with the Most developers will only be concerned with the
.Cm release .Cm release
target. and
.Cm install
targets.
.\" XXX: Some sort of introduction to this list? All the others have one. .\" XXX: Some sort of introduction to this list? All the others have one.
.Bl -tag -width ".Cm packagesystem" .Bl -tag -width ".Cm packagesystem"
.It Cm release .It Cm release
Meta-target to build all release media and distributions applicable to this Meta-target to build all release media and distributions applicable to this
platform. All output goes to platform.
.Pa ${.OBJDIR} , .It Cm install
which will likely be either Copy all produced release media to
.Pa src/release .Pa ${DESTDIR} .
or the equivalent path in
.Pa /usr/obj .
.It Cm cdrom .It Cm cdrom
Builds installation CD-ROM images. On some systems, this may require that Builds installation CD-ROM images. On some systems, this may require that
.Xr mkisofs 8 .Xr mkisofs 8
@ -173,8 +173,10 @@ and possibly that the
.Xr md 4 .Xr md 4
(memory disk) device driver be present in the kernel (memory disk) device driver be present in the kernel
(either by being compiled in or available as a module). This target (either by being compiled in or available as a module). This target
produces a file called produces files called
.Pa release.iso .Pa release.iso
and
.Pa bootonly.iso
as its output. as its output.
.It Cm memstick .It Cm memstick
Builds an installation memory stick image named Builds an installation memory stick image named
@ -293,12 +295,12 @@ svn co svn://svn.freebsd.org/base/head src
cd src cd src
make buildworld make buildworld
cd release cd release
make obj release make release install DESTDIR=/var/freebsd-snapshot
.Ed .Ed
.Pp .Pp
After running these commands, a complete system suitable for FTP or After running these commands, all produced distribution files (tarballs
CD-ROM distribution is available in the for FTP, CD-ROM images, etc.) are available in the
.Pa /usr/obj/usr/src/release .Pa /var/freebsd-snapshot
directory. directory.
.Pp .Pp
The following sequence of commands can be used to build a The following sequence of commands can be used to build a