- check if CVS/Root is even accessible; if not, use defaults
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 28 Jul 2006 04:53:14 +0000 (04:53 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 28 Jul 2006 04:53:14 +0000 (04:53 +0000)
planetlab.mk

index b2f0e6a..a50d14a 100644 (file)
 # Default values
 #
 
+CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+TAG := HEAD
+
+# Check if a tag has been checked out
 ifneq ($(wildcard CVS/Root),)
+# Check if we are able to access CVS
+CVSTAG := $(shell cvs status planetlab.mk 2>/dev/null | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
+ifneq ($(CVSTAG),)
 CVSROOT := $(shell cat CVS/Root)
-TAG := $(shell cvs status planetlab.mk | sed -ne 's/[[:space:]]*Sticky Tag:[[:space:]]*\([^[:space:]]*\).*/\1/p')
-ifeq ($(TAG),(none))
+ifeq ($(CVSTAG),(none))
 TAG := HEAD
-endif
 else
-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
-TAG := HEAD
+TAG := $(CVSTAG)
+endif
+endif
 endif
 
 #