Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
117fa0038c

+ 1 - 1
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" ;

+ 36 - 18
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 ) ;

+ 1 - 1
dtool/src/attach/ctccase.pl

@@ -149,7 +149,7 @@ sub CTCcaseFormatComment {
     if ( $_[0] eq "" ) {
 	$ret = "-nc" ;
     } else {
-	$ret = "-c " . $_[0] ;
+        $ret = "-c \"" . $_[0] . "\"" ;
     }
     $ret ;
 }

+ 26 - 11
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" ;

+ 0 - 1
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
 }

+ 25 - 11
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" ;

+ 1 - 1
dtool/src/attach/ctcvs.pl

@@ -7,7 +7,7 @@
 sub CTCvsFormatComment {
     local( $ret ) = "" ;
     if ( $_[0] ne "" ) {
-	$ret = "-m " . $_[0] ;
+        $ret = "-m \"" . $_[0] . "\"" ;
     }
     $ret ;
 }

+ 26 - 1
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 ) ) {

+ 1 - 1
dtool/src/attach/ctntool.pl

@@ -9,7 +9,7 @@ sub CTNtoolFormatComment {
     if ( $_[0] eq "" ) {
 	$ret = "-nc" ;
     } else {
-	$ret = "-c " . $_[0] ;
+        $ret = "-c \"" . $_[0] . "\"" ;
     }
     $ret ;
 }

+ 7 - 7
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

+ 2 - 0
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`

+ 6 - 6
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

+ 1 - 1
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" ;
    }

+ 4 - 4
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] ;