diff options
author | sommerfe <none@none> | 2006-04-28 15:45:12 -0700 |
---|---|---|
committer | sommerfe <none@none> | 2006-04-28 15:45:12 -0700 |
commit | 3420b242dcd546952ee939a5a378bba3d3080165 (patch) | |
tree | 0c196d285546a3e010ae5d12d5728a3178fb668b /usr/src | |
parent | 4d7b462cf6bf05be267609fc784fbfa86303954c (diff) | |
download | illumos-joyent-3420b242dcd546952ee939a5a378bba3d3080165.tar.gz |
6417313 *bringovercheck* needs better timestamp resolution
6418037 don't use sccscheck for tools build
6418599 absolute tools path for "sccscheck" breaks builds when you mix ws with nightly -t
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/Makefile.noget | 22 | ||||
-rw-r--r-- | usr/src/tools/Makefile.tools | 10 | ||||
-rw-r--r-- | usr/src/tools/scripts/bringovercheck.sh | 19 |
3 files changed, 42 insertions, 9 deletions
diff --git a/usr/src/Makefile.noget b/usr/src/Makefile.noget index 4189338de4..7e6ef778b2 100644 --- a/usr/src/Makefile.noget +++ b/usr/src/Makefile.noget @@ -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", diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools index 9652b0455d..285f90c561 100644 --- a/usr/src/tools/Makefile.tools +++ b/usr/src/tools/Makefile.tools @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -66,6 +65,9 @@ ROOTONBLDPERLFILES= $(PERLFILES:%=$(ROOTONBLDBIN)/%) ROOTONBLDMAN1FILES= $(MAN1FILES:%=$(ROOTONBLDMAN1)/%) ROOTONBLDABIAUDITFILES= $(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%) +# Break a chicken-and-egg dependency cycle for the tools build +SCCSCHECK=@echo would sccscheck + $(ROOTONBLDETCABI)/%: % $(INS.file) diff --git a/usr/src/tools/scripts/bringovercheck.sh b/usr/src/tools/scripts/bringovercheck.sh index 95736133be..f2ecd918aa 100644 --- a/usr/src/tools/scripts/bringovercheck.sh +++ b/usr/src/tools/scripts/bringovercheck.sh @@ -35,6 +35,20 @@ unset CDPATH PATH=/usr/bin:/usr/ccs/bin +# yield an exit status and no other output +# /dev/null redirection guards against noise in the event that neither $1 +# nor $2 exist +isnewer() { + [ "$1" -nt "$2" ] && return 0 + [ "$1" -ot "$2" ] && return 1 + left=$(/bin/ls -E "$1" 2>/dev/null | awk '{print $7}') + left=${left##*.} + right=$(/bin/ls -E "$2" 2>/dev/null | awk '{print $7}') + right=${right##*.} + [ -z "$left" -o -z "$right" -o "$left" -gt "$right" ] && return 0 + return 1 +} + if [ $# -ne 1 ]; then echo "Usage: $0 workspace" 1>&2 exit 1 @@ -55,14 +69,15 @@ if [ ! -f "${CODEMGR_WS}"/Codemgr_wsdata/nametable ]; then fi cd ${CODEMGR_WS} && +tail +2 Codemgr_wsdata/nametable | while read file etc; do file="./$file" sfile="${file%/*}/SCCS/s.${file##*/}" - if [ "$sfile" -nt "$file" ]; then + if isnewer "$sfile" "$file"; then ls -E "$sfile" ls -E "$file" echo "reget $file:" # -G needed so file doesn't land in working dir. sccs get -G "$file" "$file" fi -done < Codemgr_wsdata/nametable +done |