]> Cypherpunks repositories - gostls13.git/commitdiff
If Make.deps is not writable (e.g. in Perforce client and not opened for editing...
authorDavid Symonds <dsymonds@golang.org>
Sun, 24 May 2009 02:39:25 +0000 (19:39 -0700)
committerDavid Symonds <dsymonds@golang.org>
Sun, 24 May 2009 02:39:25 +0000 (19:39 -0700)
R=rsc,r
APPROVED=r
DELTA=7  (5 added, 1 deleted, 1 changed)
OCL=29319
CL=29319

src/lib/Makefile
src/lib/deps.bash

index 6539002366a1e25fd6e23bbb3a35876bffef18dc..8aa70cd476c3898798acab22766f166753c9abd5 100644 (file)
@@ -5,7 +5,7 @@
 # After editing the DIRS= list or adding imports to any Go files
 # in any of those directories, run:
 #
-#      p4 edit Make.deps; ./deps.bash
+#      ./deps.bash
 #
 # to rebuild the dependency information in Make.deps.
 
index d6796c940621c1a6a110d2955ba77df7a4e758a8..db05f2a1d9d0f260a82f6044d59c2340e209d7fe 100755 (executable)
@@ -6,6 +6,11 @@
 OUT="Make.deps"
 TMP="Make.deps.tmp"
 
+if [ -f $OUT ] && ! [ -w $OUT ]; then
+       echo "$0: $OUT is read-only; aborting." 1>&2
+       exit 1
+fi
+
 # Get list of directories from Makefile
 dirs=$(sed '1,/^DIRS=/d; /^$/,$d; s/\\//g' Makefile)
 dirpat=$(echo $dirs | sed 's/ /|/g; s/.*/^(&)$/')
@@ -28,5 +33,4 @@ for dir in $dirs; do (
        echo $dir.install: $deps
 ) done > $TMP
 
-p4 open $OUT
 mv $TMP $OUT