Add infrastructure that allows to build docs and RELNOTESng without
the need to also create the entire ports tree during a `make release'. The main motivation behind this is that handling the ports tree still takes a huge amount of time due to the large number of directories involved, even on modern disks. The solution is to establish a list of dependent ports that are minimally required. This list needs to be manually maintained in case the doc ports toolchain changes, and has thus been broken out into a separate file Makefile.inc.docports. (release/Makefile has gotten overly lengthy already anyway.) Discussed with: bmah, nik Reviewed by: bmah
This commit is contained in:
parent
e1387e5d19
commit
dd1a1b3d6e
@ -57,8 +57,17 @@ RELEASEPORTSMODULE?= ports
|
||||
# Unless set elsewhere, indicate the object format we'll be using.
|
||||
OBJFORMAT?= elf
|
||||
|
||||
# Uncomment this to disable the doc.1 target. It is also an ERROR
|
||||
# to set NOPORTS and not set NODOC since docs depend on ports.
|
||||
# Uncomment this to disable the doc.1 target. Docs normally require
|
||||
# the ports tree, so NOPORTS can be set together with NODOC in order
|
||||
# to have neither ports or docs. If only NOPORTS is set to YES, but
|
||||
# docs are still desired, the DOMINIMALDOCPORTS logic below will only
|
||||
# install the ports that are minimally required for the docs. This is
|
||||
# intended as a compromise, less disk space is required than for using
|
||||
# the entire ports collection (und much less time due to the huge number
|
||||
# of directories it would create), but still quite a bit as well as some
|
||||
# CPU cycles (some of the programs are C++, and things like ghostscript
|
||||
# belong to the required ports nevertheless).
|
||||
#
|
||||
# Setting this also disables doc.2 (RELNOTESng).
|
||||
#NODOC= YES
|
||||
#NOPORTS= YES
|
||||
@ -69,6 +78,22 @@ OBJFORMAT?= elf
|
||||
#RELNOTESNG= YES
|
||||
#RELNOTESNG_LANG= en_US.ISO_8859-1
|
||||
|
||||
# As an alternative to installing the entire ports collection (which
|
||||
# can take a huge amount of time, in particular on slower disks),
|
||||
# setting ${MINIMALDOCPORTS} allows to install and build just those
|
||||
# ports that are really required for getting the docs up & running.
|
||||
.if defined(NOPORTS) && !defined(NODOC)
|
||||
DOMINIMALDOCPORTS= YES
|
||||
.include "Makefile.inc.docports"
|
||||
.endif
|
||||
|
||||
# Helper variable
|
||||
.if defined(NOPORTS)
|
||||
.if !defined(DOMINIMALDOCPORTS) || ${DOMINIMALDOCPORTS} != "YES"
|
||||
NOPORTSATALL= YES
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# Set ALLLANG=no if you want the release documentation to be
|
||||
# in English only.
|
||||
ALLLANG?= yes
|
||||
@ -208,9 +233,9 @@ rerelease release:
|
||||
.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
|
||||
@echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
|
||||
.endif
|
||||
.if defined(NOPORTS) && !defined(NODOC)
|
||||
.if defined(NOPORTSATALL) && !defined(NODOC)
|
||||
@echo "Ports are required for building the docs. Either set NODOC or"
|
||||
@echo "unset NOPORTS!"
|
||||
@echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
|
||||
@exit 1
|
||||
.endif
|
||||
.if defined(RELNOTESNG) && ${RELNOTESNG} == "YES" && defined(NODOC)
|
||||
@ -257,6 +282,12 @@ rerelease release:
|
||||
.else
|
||||
cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES}
|
||||
.endif
|
||||
.elif defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
|
||||
.if defined(PORTSRELEASETAG)
|
||||
cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P -r ${PORTSRELEASETAG} ${MINIMALDOCPORTS}
|
||||
.else
|
||||
cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${MINIMALDOCPORTS}
|
||||
.endif
|
||||
.endif
|
||||
.if !defined(NODOC)
|
||||
.if defined(DOCRELEASETAG)
|
||||
@ -279,6 +310,11 @@ rerelease release:
|
||||
.if !defined(NOPORTS)
|
||||
cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d
|
||||
.endif
|
||||
.if defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
|
||||
for i in ${MINIMALDOCPORTS}; do \
|
||||
( cd ${CHROOTDIR}/usr/$$i && cvs -R -q update -P -d ) ; \
|
||||
done
|
||||
.endif
|
||||
.if !defined(NODOC)
|
||||
cd ${CHROOTDIR}/usr/doc && cvs -R -q update -P -d
|
||||
.endif
|
||||
@ -305,6 +341,9 @@ rerelease release:
|
||||
.if defined(NOPORTS)
|
||||
echo "export NOPORTS=${NOPORTS}" >> ${CHROOTDIR}/mk
|
||||
.endif
|
||||
.if defined(DOMINIMALDOCPORTS)
|
||||
echo "export DOMINIMALDOCPORTS=${DOMINIMALDOCPORTS}" >> ${CHROOTDIR}/mk
|
||||
.endif
|
||||
.if defined(NODOC)
|
||||
echo "export NODOC=${NODOC}" >> ${CHROOTDIR}/mk
|
||||
.endif
|
||||
|
38
release/Makefile.inc.docports
Normal file
38
release/Makefile.inc.docports
Normal file
@ -0,0 +1,38 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# List of (dependent) ports that are minimally required to be
|
||||
# checked out from CVS in order to get ${DOCPORTS} built and
|
||||
# installed.
|
||||
#
|
||||
# Note that these names are /not/ CVS module names but path
|
||||
# names, so the required part of the ports infrastructure will
|
||||
# be cvs co'ed accordingly.
|
||||
#
|
||||
MINIMALDOCPORTS= \
|
||||
ports/Mk \
|
||||
ports/archivers/unzip \
|
||||
ports/devel/gettext \
|
||||
ports/devel/gmake \
|
||||
ports/devel/libtool \
|
||||
ports/graphics/eps2png \
|
||||
ports/graphics/jpeg \
|
||||
ports/graphics/netpbm \
|
||||
ports/graphics/png \
|
||||
ports/graphics/tiff \
|
||||
ports/print/ghostscript6 \
|
||||
ports/textproc/docbook \
|
||||
ports/textproc/docbook-241 \
|
||||
ports/textproc/docbook-300 \
|
||||
ports/textproc/docbook-310 \
|
||||
ports/textproc/docbook-400 \
|
||||
ports/textproc/docbook-410 \
|
||||
ports/textproc/docproj \
|
||||
ports/textproc/dsssl-docbook-modular \
|
||||
ports/textproc/html \
|
||||
ports/textproc/iso8879 \
|
||||
ports/textproc/jade \
|
||||
ports/textproc/linuxdoc \
|
||||
ports/textproc/mkcatalog \
|
||||
ports/textproc/sgmlformat \
|
||||
ports/www/links \
|
||||
ports/www/tidy
|
Loading…
x
Reference in New Issue
Block a user