summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-11-15 22:03:25 +0000
committerjhb <jhb@FreeBSD.org>2002-11-15 22:03:25 +0000
commitdc6f79131dbc744f18d1c2acd2566bf6ac93f6c0 (patch)
tree2da168f19096bcecc3a77f2d7a8fe30aeb57565a /release
parent21238e0b0ab4a6ee3861c57b590d8c5a89ee203c (diff)
downloadFreeBSD-src-dc6f79131dbc744f18d1c2acd2566bf6ac93f6c0.zip
FreeBSD-src-dc6f79131dbc744f18d1c2acd2566bf6ac93f6c0.tar.gz
Rework the checking out of the doc, src, and ports trees a bit to make it
more manageable. - Add some helper variables (CVS_{SRC,DOC,PORTS}ARGS) to be used when using CVS to checkout files. We stick release tags in these helper variables if they are defined and then use only one cvs command instead of two cvs commands with an .ifdef to choose between them. - rm the old src/doc/ports directories as separate commands from the CVS comands so that the rm commands don't need to be duplicated. - Simplify the DOMINIMALDOCPORTS case by overriding RELEASEPORTSMODULE to be ${MINIMALDOCPORTS} thus removing yet another nearly-duplicate cvs command in an .ifdef. - Add support for grabbing src/ and doc/ from external directories specified via EXTSRCDIR and EXTDOCDIR instead of from CVS. The same is not done for ports/ quite yet as the DOMINIMALDOCPORTS case is a bit tricky. The rerelease target scripts have not been changed to use the helper variables yet, so there is still some room for improvement. Submitted by: kuriyama (4)
Diffstat (limited to 'release')
-rw-r--r--release/Makefile50
1 files changed, 31 insertions, 19 deletions
diff --git a/release/Makefile b/release/Makefile
index 1cf01aa..44e971c 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -104,6 +104,7 @@ RELNOTES_LANG?= en_US.ISO8859-1
.if defined(NOPORTS) && !defined(NODOC)
DOMINIMALDOCPORTS= YES
.include "Makefile.inc.docports"
+RELEASEPORTSMODULE= ${MINIMALDOCPORTS}
.endif
# Helper variable
@@ -300,6 +301,21 @@ WMAKEENV!= echo MAKEFLAGS=\"-m ${.CURDIR}/../share/mk\"; \
cd ${.CURDIR}/..; ${CROSSMAKE} -f Makefile.inc1 -V WMAKEENV
WMAKE= ${WMAKEENV} ${MAKE}
+CVS_SRCARGS= -P
+.if defined(RELEASETAG)
+CVS_SRCARGS+= -r ${RELEASETAG}
+.endif
+
+CVS_DOCARGS= -P
+.if defined(DOCRELEASETAG)
+CVS_DOCARGS+= -r ${DOCRELEASETAG}
+.endif
+
+CVS_PORTSARGS= -P
+.if defined(PORTSRELEASETAG)
+CVS_PORTSARGS+= -r ${PORTSRELEASETAG}
+.endif
+
rerelease release:
.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
@echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
@@ -327,12 +343,13 @@ rerelease release:
if [ -f /etc/resolv.conf ]; then \
cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
fi
-.if !defined(RELEASETAG)
- cd ${CHROOTDIR}/usr && rm -rf src && \
- ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P ${RELEASESRCMODULE}
+ rm -rf ${CHROOTDIR}/usr/src
+.if defined(EXTSRCDIR)
+ cd ${CHROOTDIR}/usr && \
+ cp -R ${EXTSRCDIR} src
.else
- cd ${CHROOTDIR}/usr && rm -rf src && \
- ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P -r ${RELEASETAG} ${RELEASESRCMODULE}
+ cd ${CHROOTDIR}/usr && \
+ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE}
.endif
.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES})
cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES}
@@ -340,24 +357,19 @@ rerelease release:
.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT})
cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT}
.endif
-.if !defined(NOPORTS)
-.if defined(PORTSRELEASETAG)
- cd ${CHROOTDIR}/usr && rm -rf ports && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P -r ${PORTSRELEASETAG} ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES}
-.else
- cd ${CHROOTDIR}/usr && rm -rf ports && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P ${RELEASEPORTSMODULE} && cd ports && ${MAKEREADMES}
-.endif
-.elif defined(DOMINIMALDOCPORTS) && ${DOMINIMALDOCPORTS} == "YES"
-.if defined(PORTSRELEASETAG)
- cd ${CHROOTDIR}/usr && rm -rf ports && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P -r ${PORTSRELEASETAG} ${MINIMALDOCPORTS}
-.else
- cd ${CHROOTDIR}/usr && rm -rf ports && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P ${MINIMALDOCPORTS}
+ rm -rf ${CHROOTDIR}/usr/ports
+.if !defined(NOPORTSATALL)
+ cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_PORTSARGS} ${RELEASEPORTSMODULE}
.endif
+.if !defined(NOPORTS)
+ cd ${CHROOTDIR}/usr/ports && ${MAKEREADMES}
.endif
.if !defined(NODOC)
-.if defined(DOCRELEASETAG)
- cd ${CHROOTDIR}/usr && rm -rf doc && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P -r ${DOCRELEASETAG} ${RELEASEDOCMODULE}
+ rm -rf ${CHROOTDIR}/usr/doc
+.if defined(EXTDOCDIR)
+ cd ${CHROOTDIR}/usr && cp -R ${EXTDOCDIR} doc
.else
- cd ${CHROOTDIR}/usr && rm -rf doc && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} -P ${RELEASEDOCMODULE}
+ cd ${CHROOTDIR}/usr && ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_DOCARGS} ${RELEASEDOCMODULE}
.endif
if [ -d ${RELEASEDISTFILES}/ ]; then \
cp -rp ${RELEASEDISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \
OpenPOWER on IntegriCloud