summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-05-04 19:50:34 +0000
committerjoerg <joerg@FreeBSD.org>2001-05-04 19:50:34 +0000
commit32a17f0271394436337eae2d3ad01e0515b5fbf4 (patch)
tree07d97b2067db6a9b777d2ca54eec0d7f560c4963 /release
parent814b5baeb7dc8c25c9cdaed60143c2d40939131a (diff)
downloadFreeBSD-src-32a17f0271394436337eae2d3ad01e0515b5fbf4.zip
FreeBSD-src-32a17f0271394436337eae2d3ad01e0515b5fbf4.tar.gz
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
Diffstat (limited to 'release')
-rw-r--r--release/Makefile47
-rw-r--r--release/Makefile.inc.docports38
2 files changed, 81 insertions, 4 deletions
diff --git a/release/Makefile b/release/Makefile
index ad80c4c..f217aa1 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -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
diff --git a/release/Makefile.inc.docports b/release/Makefile.inc.docports
new file mode 100644
index 0000000..06172b1
--- /dev/null
+++ b/release/Makefile.inc.docports
@@ -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
OpenPOWER on IntegriCloud