pull up r19304 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 30 Mar 2007 20:54:48 +0000 (20:54 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 30 Mar 2007 20:54:48 +0000 (20:54 +0000)
 r19304@cathode-dark-space:  kpkoch | 2007-03-29 10:16:16 -0400
 Target_Version: 1.6.1
 Ticket: 5490
 Tags: pullup

 Remove obsolete comment.

 Add -nolog switch; always pass build.pl --nolog.  Logging will be done in bkw.pl.log

 Create <src>/pismere/CVS if missing so checkout works.

ticket: 5490

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19358 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/build/BKWconfig.xml
src/windows/build/bkw.pl

index 28939444d85ef9afb3da7f7e731222a9b711003f..15c72f21bf7cd25ea8f2b4da07fe3a7c46af751b 100644 (file)
@@ -78,7 +78,6 @@
                                </Config>\r
                        <MSI></MSI>\r
                        <NSIS></NSIS> <!-- NB:  Most config is done in site-local.nsi.  -->\r
-                       <!-- Theoretically, writing site-local.nsi from xml settings could be done, but isn't.  -->\r
                </Package>\r
                <PostPackage>\r
                        <Config>                                                                                                        <!-- This config info will be copied into each CopyList in PostPackage. -->\r
index 1593f134ff9b186c8a971e45e8383fbb8ce278ce..674498b768db76b17666f72984a70ff96f27532a 100644 (file)
@@ -54,7 +54,8 @@ Usage: $0 (-f --config) config-file [options] NMAKE-options
     /clean          Build clean target.\r
     /nopackage      Skip packaging step.\r
     /verbose /v        Debug mode - verbose output.\r
-    /logfile /l path   Where to write output.  If omitted, ...\r
+    /logfile /l path   Where to write output.  Default is bkw.pl.log\r
+    /nolog     Don't save output\r
   Other:\r
     NMAKE-options    any options you want to pass to NMAKE, which can be:\r
                      (note: /nologo is always used)\r
@@ -90,6 +91,7 @@ sub main {
               'debug|d',\r
               'config|f:s',\r
               'logfile|l:s',\r
+              'nolog',\r
               'repository:s',\r
               'username|u:s',\r
               'verbose|v',\r
@@ -176,6 +178,9 @@ sub main {
                $switches[0]->{logfile}->{path} = $OPT->{logfile};\r
                $switches[0]->{logfile}->{value} = 1;\r
                }\r
+       if (exists $OPT->{nolog}) {\r
+               $switches[0]->{logfile}->{value} = 0;\r
+               }\r
     our $verbose               = $config->{CommandLine}->{Options}->{verbose}->{value};\r
     our $vverbose              = $config->{CommandLine}->{Options}->{vverbose}->{value};\r
     our $clean                         = $switches[0]->{clean}->{value};\r
@@ -221,7 +226,7 @@ sub main {
                        }\r
                }\r
 \r
-       if ($rverb =~ /checkout/) {\r
+       if ( ($rverb =~ /checkout/) && (-d $wd) ){\r
                print "\n\nHEADS UP!!\n\n";\r
                print "/REPOSITORY CHECKOUT will cause everything under $wd to be deleted.\n";\r
                print "If this is not what you intended, here's your chance to bail out!\n\n\n";\r
@@ -248,7 +253,13 @@ sub main {
        if ($rverb =~ /skip/) {print "Info -- *** Skipping repository access.\n"        if ($verbose);}\r
        else {\r
                if ($verbose) {print "Info -- *** Begin fetching sources.\n";}\r
-\r
+               if (! -d $wd) {                                         ## xcopy will create the entire path for us.\r
+                       !system("echo foo > a.tmp")                                                                                     or die "Fatal -- Couldn't create temporary file in ".`cd`;\r
+                       !system("echo F | xcopy a.tmp $wd\\CVS\\a.tmp") or die "Fatal -- Couldn't xcopy to $wd.";\r
+                       !system("rm a.tmp")                                                                                                             or die "Fatal -- Couldn't remove temporary file.";\r
+                       !system("rm $wd\\CVS\\a.tmp")                                                                   or die "Fatal -- Couldn't remove temporary file.";\r
+                       }\r
+               \r
                # Set up cvs environment variables:\r
                $ENV{CVSROOT} = $fetch[0]->{CVSROOT}->{name};\r
                chdir($src)                                                                                     or die "Fatal -- couldn't chdir to $src\n";\r
@@ -363,7 +374,8 @@ sub main {
                \r
                chdir("pismere/athena") or die "Fatal -- couldn't chdir to source directory $wd\\pismere\\athena\n";\r
                if ($verbose) {print "Info -- chdir to $wd\\pismere\\athena\n";}\r
-                       !system("perl ../scripts/build.pl --softdirs $buildtarget")     or die "Fatal -- build $buildtarget failed.";\r
+               local $log      = ($switches[0]->{logfile}->{value}) ? " " : " --nolog ";\r
+               !system("perl ../scripts/build.pl --softdirs --nolog $buildtarget")     or die "Fatal -- build $buildtarget failed.";\r
                        \r
                chdir("$wd\\pismere") or die "Fatal -- couldn't chdir to $wd\\pismere.";\r
                if ($clean) {\r