Knobs for src/Make* for SVN "make update" (patch attached)

From: Mark Murray <markm_at_FreeBSD.org>
Date: Sun, 14 Jun 2009 11:08:19 +0100
Hi

Any comments on the attached patch to allow "make update" to work with
SVN? This time the actual patch is enclosed. :-]

Any brave soul prepared to officially review it? :-)

M
-- 
Mark R V Murray
Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open)

Index: Makefile.inc1
===================================================================
--- Makefile.inc1	(revision 194177)
+++ Makefile.inc1	(working copy)
_at__at_ -94,6 +94,8 _at__at_
 
 CVS?=		cvs
 CVSFLAGS?=	-A -P -d -I!
+SVN?=		svn
+SVNFLAGS?=	-r HEAD
 SUP?=		/usr/bin/csup
 SUPFLAGS?=	-g -L 2
 .if defined(SUPHOST)
_at__at_ -854,11 +867,25 _at__at_
 .endif
 .endif
 .if defined(CVS_UPDATE)
-	_at_echo "--------------------------------------------------------------"
-	_at_echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
-	_at_echo "--------------------------------------------------------------"
-	cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
+	_at_cd ${.CURDIR} ; \
+	if [ -d CVS ] ; then \
+		echo "--------------------------------------------------------------" ; \
+		echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} ; \
+		echo "--------------------------------------------------------------" ; \
+		echo ${CVS} -R -q update ${CVSFLAGS} ; \
+		${CVS} -R -q update ${CVSFLAGS} ; \
+	fi
 .endif
+.if defined(SVN_UPDATE)
+	_at_cd ${.CURDIR} ; \
+	if [ -d .svn ] ; then \
+		echo "--------------------------------------------------------------" ; \
+		echo ">>> Updating ${.CURDIR} using Subversion" ; \
+		echo "--------------------------------------------------------------" ; \
+		echo ${SVN} update ${SVNFLAGS} ; \
+		${SVN} update ${SVNFLAGS} ; \
+	fi
+.endif
 
 #
 # ------------------------------------------------------------------------
Received on Sun Jun 14 2009 - 08:10:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC