summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2009-06-14 15:16:24 +0000
committermarkm <markm@FreeBSD.org>2009-06-14 15:16:24 +0000
commit90ad5bd1d703073250f0e36d5ddc13c9560359b0 (patch)
tree4f1b6e1f439e7acd2d4f47171eafac31d4f3757e /Makefile.inc1
parent2146cf6028a13023ca9156989c4a82cee2a546d6 (diff)
downloadFreeBSD-src-90ad5bd1d703073250f0e36d5ddc13c9560359b0.zip
FreeBSD-src-90ad5bd1d703073250f0e36d5ddc13c9560359b0.tar.gz
Allow "make update" work with SVN, if you take the time to set up your
/etc/make.conf properly. Only one SCM? I do not think this is right. Now I have fixed it.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc124
1 files changed, 20 insertions, 4 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 9f411f3..0f8d28e 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -94,6 +94,8 @@ CLEANDIR= cleandir
CVS?= cvs
CVSFLAGS?= -A -P -d -I!
+SVN?= svn
+SVNFLAGS?= -r HEAD
SUP?= /usr/bin/csup
SUPFLAGS?= -g -L 2
.if defined(SUPHOST)
@@ -854,10 +856,24 @@ update:
.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
#
OpenPOWER on IntegriCloud