usr/src/Makefile.noget
changeset 1905 5c7b771e6ed0
parent 1810 da7eacf55e82
--- a/usr/src/Makefile.noget	Fri Apr 28 15:41:51 2006 -0700
+++ b/usr/src/Makefile.noget	Fri Apr 28 15:45:12 2006 -0700
@@ -29,9 +29,25 @@
 #
 # Makefile.noget: disable automated "sccs get" which causes us no end
 # of trouble in as many different ways as possible.
-#
-SCCSCHECK=$(ONBLD_TOOLS)/bin/sccscheck
-GET=$(ONBLD_TOOLS)/bin/sccscheck
+# 
+# Ordinarily, we'd say "$(ONBLD_TOOLS)/bin/sccscheck" here, but make
+# has special knowledge of SCCS and will refuse to run an SCCS rule if
+# the target is a writeable file, for fear that it will be destroying
+# your edits in progress.  But with .KEEP_STATE enabled, any change to
+# the command which would have been used to "build" the source file
+# forces the command to be re-run.  So if your effective ONBLD_TOOLS
+# changes (for instance, if you do a nightly -t to populate a
+# workspace, and then "ws" into it to check out a file and then do
+# some selective builds, make will notice the change in the full path
+# of the "sccscheck" command, will seek to re-run it, and abort the
+# build because the checked-out file is writeable.  So instead, by
+# default, we just use whichever sccscheck happens to be first in
+# $PATH and hope for the best.  Those who don't entirely trust this
+# are of course welcome to consistently set SCCSCHECK in their
+# environment to override this.
+# 
+SCCSCHECK=sccscheck
+GET=sccscheck
 
 # Deliberately sabotage other attempts to use "sccs get" from makefiles,
 # with flags known not to be accepted by "sccs get" or "get",