Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2009 11:08:19 +0100
From:      Mark Murray <markm@FreeBSD.org>
To:        current@freebsd.org
Subject:   Knobs for src/Make* for SVN "make update" (patch attached)
Message-ID:  <E1MFmdP-000Ieu-F2@greatest.grondar.org>

next in thread | raw e-mail | index | archive | help
------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <71725.1244974071.1@greatest.grondar.org>

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)

------- =_aaaaaaaaaa0
Content-Type: text/plain; file="src_makefile.diff"; charset="us-ascii"
Content-ID: <71725.1244974071.2@greatest.grondar.org>
Content-Description: src_makefile.diff

Index: Makefile.inc1
===================================================================
--- Makefile.inc1	(revision 194177)
+++ Makefile.inc1	(working copy)
@@ -94,6 +94,8 @@
 
 CVS?=		cvs
 CVSFLAGS?=	-A -P -d -I!
+SVN?=		svn
+SVNFLAGS?=	-r HEAD
 SUP?=		/usr/bin/csup
 SUPFLAGS?=	-g -L 2
 .if defined(SUPHOST)
@@ -854,11 +867,25 @@
 .endif
 .endif
 .if defined(CVS_UPDATE)
-	@echo "--------------------------------------------------------------"
-	@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
-	@echo "--------------------------------------------------------------"
-	cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
+	@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)
+	@cd ${.CURDIR} ; \
+	if [ -d .svn ] ; then \
+		echo "--------------------------------------------------------------" ; \
+		echo ">>> Updating ${.CURDIR} using Subversion" ; \
+		echo "--------------------------------------------------------------" ; \
+		echo ${SVN} update ${SVNFLAGS} ; \
+		${SVN} update ${SVNFLAGS} ; \
+	fi
+.endif
 
 #
 # ------------------------------------------------------------------------

------- =_aaaaaaaaaa0--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1MFmdP-000Ieu-F2>