From 117fa0038c035603d37cd9ce4bcd5a624cd14dc0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 4 Oct 2000 22:28:31 +0000 Subject: [PATCH] *** empty log message *** --- dtool/src/attach/ctattach.drv | 2 +- dtool/src/attach/ctattch.pl | 54 +++++++++++++++++++++++------------ dtool/src/attach/ctccase.pl | 2 +- dtool/src/attach/ctci | 37 +++++++++++++++++------- dtool/src/attach/ctcm.pl | 1 - dtool/src/attach/ctco | 36 ++++++++++++++++------- dtool/src/attach/ctcvs.pl | 2 +- dtool/src/attach/ctdelta | 27 +++++++++++++++++- dtool/src/attach/ctntool.pl | 2 +- dtool/src/attach/dtool.cshrc | 14 ++++----- dtool/src/attach/dtool.init | 2 ++ dtool/src/attach/dtool.sh | 12 ++++---- dtool/src/build/ctaddtgt | 2 +- dtool/src/build/ctproj.pl | 8 +++--- 14 files changed, 137 insertions(+), 64 deletions(-) diff --git a/dtool/src/attach/ctattach.drv b/dtool/src/attach/ctattach.drv index b3960ea9c7..0c7b9b7290 100755 --- a/dtool/src/attach/ctattach.drv +++ b/dtool/src/attach/ctattach.drv @@ -22,7 +22,7 @@ sub CTAttachUsage { $tool = $ENV{"DTOOL"} ; if ( $tool eq "" ) { - die "$DTOOL environment must be set to use CTtools\n" ; + die "\$" . "DTOOL environment must be set to use CTtools\n" ; } require "$tool/inc/ctattch.pl" ; diff --git a/dtool/src/attach/ctattch.pl b/dtool/src/attach/ctattch.pl index 4c6df5a9c8..8f4a8e8637 100644 --- a/dtool/src/attach/ctattch.pl +++ b/dtool/src/attach/ctattch.pl @@ -171,26 +171,34 @@ sub CTAttachCompute { $spec = &CTResolveSpec( $_[0], $flav ) ; &CTUDebug( "spec line = '$spec'\n" ) ; if ( $spec ne "" ) { - $root = &CTComputeRoot( $_[0], $flav, $spec ) ; - &CTCMSetup( $_[0], $spec, $flav ) ; - if ( -e $root ) { - $done = 1 ; - } + $root = &CTComputeRoot( $_[0], $flav, $spec ) ; + &CTCMSetup( $_[0], $spec, $flav ) ; + if ( -e $root ) { + $done = 1 ; + } + } else { + print STDERR "could not resolve '" . $flav . "'\n" ; + $done = 1 ; } if (( ! $done ) && $_[2] ) { - if ( $flav eq "install" ) { - # oh my! are we ever in trouble - # want some sort of default, but couldn't get to what we wanted - print STDERR "you are in a strange alien universe\n" ; - $spec = "" ; - $done = 1 ; - } elsif ( $flav eq "release" ) { - $flav = "install" ; - } elsif ( $flav eq "ship" ) { - $flav = "release" ; - } else { - $flav = "ship" ; - } + if ( $flav eq "install" ) { + # oh my! are we ever in trouble + # want some sort of default, but couldn't get to what we wanted + print STDERR "you are in a strange alien universe\n" ; + $spec = "" ; + $done = 1 ; + } elsif ( $flav eq "release" ) { + $flav = "install" ; + } elsif ( $flav eq "ship" ) { + $flav = "release" ; + } else { + $flav = "ship" ; + } + } elsif ( ! $done ) { + $spec = "" ; + print STDERR "resolved '" . $flav . "' but '" . $root . + "' does not exist\n" ; + $done = 1 ; } } @@ -450,6 +458,9 @@ sub CTAttachWriteScript { print OUTFILE "\n" ; } else { print OUTFILE "setenv $item \"$outval\"\n" ; + if ( $ctdebug ) { + print OUTFILE "echo setting " . $item . " to '" . $outval . "'\n" ; + } } } } @@ -457,14 +468,21 @@ sub CTAttachWriteScript { if ( $newenv{"CDPATH"} ne "" ) { if ( $shell_type ne "sh" ) { print OUTFILE "set cdpath = ( \$" . "CDPATH )\n" ; + if ( $ctdebug ) { + print OUTFILE "echo assigning cdpath\n" ; + } } } foreach $item ( keys %envdo ) { print OUTFILE $envdo{$item} . "\n" ; + if ( $ctdebug ) { + print OUTFILE "echo doing '" . $envdo{$item} . "'\n" ; + } } if (! $ctdebug) { print OUTFILE "rm -f $_[0]\n" ; } else { + print OUTFILE "echo end of script $_[0]\n" ; print STDERR "no self-destruct script '" . $_[0] . "'\n" ; } close( OUTFILE ) ; diff --git a/dtool/src/attach/ctccase.pl b/dtool/src/attach/ctccase.pl index 6e95c52b34..37fad1169a 100644 --- a/dtool/src/attach/ctccase.pl +++ b/dtool/src/attach/ctccase.pl @@ -149,7 +149,7 @@ sub CTCcaseFormatComment { if ( $_[0] eq "" ) { $ret = "-nc" ; } else { - $ret = "-c " . $_[0] ; + $ret = "-c \"" . $_[0] . "\"" ; } $ret ; } diff --git a/dtool/src/attach/ctci b/dtool/src/attach/ctci index f950e53a56..9637cf5c17 100644 --- a/dtool/src/attach/ctci +++ b/dtool/src/attach/ctci @@ -24,18 +24,33 @@ require "$tool/inc/ctproj.pl" ; require "$tool/inc/ctcm.pl" ; $comment = "" ; -if ( $ARGV[0] eq "-nc" ) { - shift( @ARGV ) ; - &CTUDebug( "-nc processed\n" ) ; -} -if ( $ARGV[0] eq "-c" ) { - shift( @ARGV ) ; - $comment = $ARGV[0] ; - shift( @ARGV ) ; - &CTUDebug( "setting comment to '" . $comment . "'\n" ) ; + +$skip = 0 ; + +@files = () ; + +foreach $item ( @ARGV ) { + if ( $skip == 0 ) { + if ( $item eq "-nc" ) { + &CTUDebug( "-nc processed\n" ) ; + } elsif ( $item eq "-c" ) { + $skip = 1 ; + } else { + push( @files, $item ) ; + &CTUDebug( "added '" . $item . "' to files to be processed\n" ) ; + } + } elsif ( $skip == 1 ) { + $comment = $item ; + &CTUDebug( "setting comment to '" . $comment . "'\n" ) ; + $skip = 0 ; + } else { + &CTUDebug( "got to unknown skip value! (" . $skip . ")\n" ) ; + $skip = 0 ; + } } -if ( $#ARGV < 0 ) { + +if ($#files < 0 ) { &CTCiUsage ; } @@ -44,7 +59,7 @@ $projname =~ tr/A-Z/a-z/ ; $flav = &CTQueryProj( $projname ) ; $spec = &CTResolveSpec( $projname, $flav ) ; -foreach $item ( @ARGV ) { +foreach $item ( @files ) { if ( -e $item ) { if ( ! &CTCMCheckin( $item, $projname, $spec, $comment ) ) { print STDERR "Could not checkin '$item'\n" ; diff --git a/dtool/src/attach/ctcm.pl b/dtool/src/attach/ctcm.pl index ea061a5ab7..39a2364a83 100644 --- a/dtool/src/attach/ctcm.pl +++ b/dtool/src/attach/ctcm.pl @@ -26,7 +26,6 @@ sub CTCMSetup { print STDERR "CVS login failed given server line '" . $serve . "'\n" ; } - print STDERR "I don't know how to setup CVS stuff yet!!\n" ; } # no other types have any work that needs to be done at this time } diff --git a/dtool/src/attach/ctco b/dtool/src/attach/ctco index 0bc9fb98cc..3b63eebdaa 100644 --- a/dtool/src/attach/ctco +++ b/dtool/src/attach/ctco @@ -24,18 +24,32 @@ require "$tool/inc/ctproj.pl" ; require "$tool/inc/ctcm.pl" ; $comment = "" ; -if ( $ARGV[0] eq "-nc" ) { - shift( @ARGV ) ; - &CTUDebug( "-nc processed\n" ) ; -} -if ( $ARGV[0] eq "-c" ) { - shift( @ARGV ) ; - $comment = $ARGV[0] ; - shift( @ARGV ) ; - &CTUDebug( "setting comment to '" . $comment . "'\n" ) ; + +$skip = 0 ; + +@files = () ; + +foreach $item ( @ARGV ) { + if ( $skip == 0 ) { + if ( $item eq "-nc" ) { + &CTUDebug( "-nc processed\n" ) ; + } elsif ( $item eq "-c" ) { + $skip = 1 ; + } else { + push( @files, $item ) ; + &CTUDebug( "added '" . $item . "' to files to be processed\n" ) ; + } + } elsif ( $skip == 1 ) { + $comment = $item ; + &CTUDebug( "setting comment to '" . $comment . "'\n" ) ; + $skip = 0 ; + } else { + &CTUDebug( "got to unknown skip value! (" . $skip . ")\n" ) ; + $skip = 0 ; + } } -if ( $#ARGV < 0 ) { +if ( $#files < 0 ) { &CTCoUsage ; } @@ -44,7 +58,7 @@ $projname =~ tr/A-Z/a-z/ ; $flav = &CTQueryProj( $projname ) ; $spec = &CTResolveSpec( $projname, $flav ) ; -foreach $item ( @ARGV ) { +foreach $item ( @files ) { if ( -e $item ) { if ( ! &CTCMCheckout( $item, $projname, $spec, $comment ) ) { print STDERR "Could not checkout '$item'\n" ; diff --git a/dtool/src/attach/ctcvs.pl b/dtool/src/attach/ctcvs.pl index 2099c70c1b..62d5a7d3cd 100644 --- a/dtool/src/attach/ctcvs.pl +++ b/dtool/src/attach/ctcvs.pl @@ -7,7 +7,7 @@ sub CTCvsFormatComment { local( $ret ) = "" ; if ( $_[0] ne "" ) { - $ret = "-m " . $_[0] ; + $ret = "-m \"" . $_[0] . "\"" ; } $ret ; } diff --git a/dtool/src/attach/ctdelta b/dtool/src/attach/ctdelta index c26193d149..b406e4a125 100755 --- a/dtool/src/attach/ctdelta +++ b/dtool/src/attach/ctdelta @@ -15,12 +15,37 @@ require "$tool/inc/ctquery.pl" ; require "$tool/inc/ctproj.pl" ; require "$tool/inc/ctcm.pl" ; +$comment = "" ; +$skip = 0 ; + +@files = () ; + +foreach $item ( @ARGV ) { + if ( $skip == 0 ) { + if ( $item eq "-nc" ) { + &CTUDebug( "-nc processed\n" ) ; + } elsif ( $item eq "-c" ) { + $skip = 1 ; + } else { + push( @files, $item ) ; + &CTUDebug( "added '" . $item . "' to files to be processed\n" ) ; + } + } elsif ( $skip == 1 ) { + $comment = $item ; + &CTUDebug( "setting comment to '" . $comment . "'\n" ) ; + $skip = 0 ; + } else { + &CTUDebug( "got to unknown skip value! (" . $skip . ")\n" ) ; + $skip = 0 ; + } +} + $projname = &CTProj ; $projname =~ tr/A-Z/a-z/ ; $flav = &CTQueryProj( $projname ) ; $spec = &CTResolveSpec( $projname, $flav ) ; -foreach $item ( @ARGV ) { +foreach $item ( @files ) { if ( -e $item ) { &CTCMCheckin( $item, $projname, $spec ) ; if ( ! &CTCMDelta( $item, $projname, $spec ) ) { diff --git a/dtool/src/attach/ctntool.pl b/dtool/src/attach/ctntool.pl index 597fde9524..6920a3ee23 100644 --- a/dtool/src/attach/ctntool.pl +++ b/dtool/src/attach/ctntool.pl @@ -9,7 +9,7 @@ sub CTNtoolFormatComment { if ( $_[0] eq "" ) { $ret = "-nc" ; } else { - $ret = "-c " . $_[0] ; + $ret = "-c \"" . $_[0] . "\"" ; } $ret ; } diff --git a/dtool/src/attach/dtool.cshrc b/dtool/src/attach/dtool.cshrc index 96fb268fc3..e55ed99d90 100644 --- a/dtool/src/attach/dtool.cshrc +++ b/dtool/src/attach/dtool.cshrc @@ -62,13 +62,6 @@ if ( ! $?CTEMACS_OPTS ) setenv CTEMACS_OPTS "" if ( -e /usr/atria/bin ) set path = ( /usr/atria/bin $path ) rehash -if ( ! $?DTOOL ) setenv DTOOL /beta/player/bootstrap/dtool -if ( $#argv == 0 ) then - source `$DTOOL/bin/ctattach.drv dtool default` -else - source `$DTOOL/bin/ctattach.drv dtool $argv[1]` -endif - if ( ! $?PENV ) then if ( $OS == "Linux" ) then setenv PENV "Linux" @@ -81,5 +74,12 @@ if ( ! $?PENV ) then endif endif +if ( ! $?DTOOL ) setenv DTOOL /beta/player/bootstrap/dtool +if ( $#argv == 0 ) then + source `$DTOOL/bin/ctattach.drv dtool default` +else + source `$DTOOL/bin/ctattach.drv dtool $argv[1]` +endif + setenv CTEMACS_FOREHIGHLIGHT white setenv CTEMACS_BACKHIGHLIGHT blue diff --git a/dtool/src/attach/dtool.init b/dtool/src/attach/dtool.init index fec335ebf6..3063026a43 100644 --- a/dtool/src/attach/dtool.init +++ b/dtool/src/attach/dtool.init @@ -1,4 +1,6 @@ MODREL ETC_PATH etc +SEP PYTHONPATH : +MODREL PYTHONPATH lib DOCSH source $DTOOL/etc/dtool.alias DOCSH unsetenv LASTLOGIN DOCSH setenv OS_VER `uname -r` diff --git a/dtool/src/attach/dtool.sh b/dtool/src/attach/dtool.sh index c4d5cf2a72..fe9ca8a479 100755 --- a/dtool/src/attach/dtool.sh +++ b/dtool/src/attach/dtool.sh @@ -59,12 +59,6 @@ if [ -z "$DTOOL" ]; then export DTOOL fi -if [ -z "$1" ]; then - source `$DTOOL/bin/ctattach.drv dtool default` -else - source `$DTOOL/bin/ctattach.drv dtool $1` -fi - if [ -z "$PENV" ]; then if [ $OS = "Linux" ]; then PENV="Linux" @@ -77,3 +71,9 @@ if [ -z "$PENV" ]; then fi fi export PENV + +if [ -z "$1" ]; then + source `$DTOOL/bin/ctattach.drv dtool default` +else + source `$DTOOL/bin/ctattach.drv dtool $1` +fi diff --git a/dtool/src/build/ctaddtgt b/dtool/src/build/ctaddtgt index 3ac36f8ae8..4212219c06 100755 --- a/dtool/src/build/ctaddtgt +++ b/dtool/src/build/ctaddtgt @@ -80,7 +80,7 @@ while ( @arglist != () ) { &CTInstallScanMake( "$curdir/Makefile" ) ; } - $item = "$curdir/Makefile.tgtname" ; + $item = "$curdir/Makefile.$tgtname" ; if ( ! &CTCMMkelem( $item, $projname, $spec ) ) { die "Could not make a verioned element of the target makefile\n" ; } diff --git a/dtool/src/build/ctproj.pl b/dtool/src/build/ctproj.pl index 301435bc78..0276d1a9a4 100644 --- a/dtool/src/build/ctproj.pl +++ b/dtool/src/build/ctproj.pl @@ -1,3 +1,5 @@ +require "$tool/inc/ctutils.pl" ; + # return the root of the given project. sub CTProjRoot { local( $CTPRtmp ) = $_[0] ; @@ -10,8 +12,7 @@ sub CTProjRoot { # input: # $_[0] = project sub CTProjPkg { - local( $CTPPret ) = `pwd`; - chop $CTPPret; + local( $CTPPret ) = &CTUCurrDir() ; local( $CTPPtmp ) = $_[0] ; $CTPPtmp =~ tr/a-z/A-Z/ ; $CTPPret =~ s/$ENV{ $CTPPtmp }// ; @@ -25,8 +26,7 @@ sub CTProjPkg { sub CTProj { local( $CTPdir ) ; if ($_[0] eq "") { - $CTPdir = `pwd`; - chop $CTPdir; + $CTPdir = &CTUCurrDir() ; } else { # provided directory $CTPdir = $_[0] ;