Make /OUTDIR absolute instead of relative
authorKevin Koch <kpkoch@mit.edu>
Sat, 31 Mar 2007 22:09:23 +0000 (22:09 +0000)
committerKevin Koch <kpkoch@mit.edu>
Sat, 31 Mar 2007 22:09:23 +0000 (22:09 +0000)
Target_Version: 1.6.1
Ticket: 5490
Tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19367 dc483132-0cff-0310-8789-dd5450dbe970

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

index d6d89bb8d8b1c33c8ed41c6576af98cbd91dddf0..111aaa60134cae0348656fb7b4cbd7e642382c2c 100644 (file)
@@ -11,7 +11,7 @@
             <!--    Sources will be checked out of repositories into <src>.  The structure\r
                     of the repositories will cause pismere/athena to be created under <src>.    -->\r
             <src        path    ="C:\projects\Autobuild" />\r
-            <out        path    ="public" /> <!-- Relative to src. -->\r
+            <out        path    ="C:\projects\Autobuild\public" /> <!-- Must be absolute path. -->\r
             <unixfind   path    ="c:\cygwin\bin" />\r
             </Directories>\r
         <Options>\r
index 20d219e0150a4129499880611698fb83247cea9f..5a2f7230cc06dd4f29731cb4da2035ce09939b00 100644 (file)
@@ -197,7 +197,7 @@ sub main {
     our $vverbose   = $config->{CommandLine}->{Options}->{vverbose}->{value};\r
     our $clean      = $switches[0]->{clean}->{value};\r
     local $src      = $paths[0]->{src}->{path};\r
-    local $toPath   = $paths[0]->{out}->{path};\r
+    local $out      = $paths[0]->{out}->{path};\r
 \r
     if ($clean && !$switches[0]->{nopackage}->{value}) {\r
         print "Info -- /clean forces /nopackage.\n";\r
@@ -352,6 +352,7 @@ sub main {
             my $prunes = $config->{Stages}->{Make}->{Prunes};\r
             my $j=0;\r
             print "Info -- Processing prunes in ".`cd`."\n"     if ($verbose);\r
+print Dumper($prunes);\r
             while ($prunes->{Prune}->[$j]) {\r
                 if (exists $prunes->{Prune}->[$j]->{name}) {    ## Don't process dummy entry!\r
                     my $prune    = $prunes->{Prune}->[$j]->{name};\r
@@ -541,10 +542,10 @@ sub main {
 \r
 # Begin packaging extra items:\r
         chdir($src);        # Now in <src>.\r
-        print "Info -- chdir to ".`cd`."\n"             if ($verbose);\r
-        system("rm -rf $toPath")                        if (-d $toPath);\r
-        die "Fatal -- Couldn't remove $src\\$toPath."   if (-d $toPath);\r
-        mkdir($toPath);\r
+        print "Info -- chdir to ".`cd`."\n"         if ($verbose);\r
+        system("rm -rf $out")                       if (-d $out);\r
+        die "Fatal -- Couldn't remove $out."        if (-d $out);\r
+        mkdir($out);\r
         my $zipsXML = $config->{Stages}->{PostPackage}->{Zips};\r
 \r
         local $i = 0;\r
@@ -554,17 +555,17 @@ sub main {
                 $i++;                    \r
             }                                   ## End zip in xml.\r
                 \r
-        $ziptemp    = "$src\\$toPath\\ziptemp"; ## Clean up any temp directory.\r
-        chdir("$src\\$toPath");\r
+        $ziptemp    = "$out\\ziptemp";          ## Clean up any temp directory.\r
+        chdir("$out");\r
         print "Info -- chdir to ".`cd`."\n"     if ($verbose);\r
         system("rm -rf $ziptemp")               if (-d $ziptemp);\r
                 \r
-        my $out     = $config->{CommandLine}->{Directories}->{out}->{path};\r
         $config->{Stages}->{PostPackage}->{CopyList}->{Config} = $config->{Stages}->{PostPackage}->{Config};    ## Use the post package config.\r
         $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{From}->{root}  = "$src\\pismere";\r
-        $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{To}->{root}    = "$src\\$out";\r
+        $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{To}->{root}    = "$out";\r
         copyFiles($config->{Stages}->{PostPackage}->{CopyList}, $config);       ## Copy any files\r
 \r
+        print "Info -- chdir to ".`cd`."\n"     if ($verbose);\r
         if ($switches[0]->{sign}->{value}) {\r
             signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config);\r
             }\r
@@ -574,7 +575,8 @@ sub main {
 ##-- Package action.\r
 \r
     system("rm -rf $src/a.tmp");                ## Clean up junk.\r
-    system("rm -rf $src/$toPath/ziptemp");    ## Clean up junk.\r
+    system("rm -rf $out/a.tmp");                ## Clean up junk.\r
+    system("rm -rf $out/ziptemp");              ## Clean up junk.\r
                 \r
 # End logging:\r
     if ($switches[0]->{logfile}->{value})   {$l->stop;}\r
index ab1100554a52f66a5182f5b44c975f2f7032036f..e54f5a83168f92d8e555ee4aaef50afec2791177 100644 (file)
@@ -9,7 +9,7 @@ sub makeZip {
     local ($zip, $config)   = @_;\r
 \r
     local $src          = $config->{CommandLine}->{Directories}->{src}->{path};\r
-    local $toPath       = $config->{CommandLine}->{Directories}->{out}->{path};\r
+    local $out          = $config->{CommandLine}->{Directories}->{out}->{path};\r
     local @switches     = $config->{CommandLine}->{Options};\r
     local $zipname      = $zip->{filename};\r
     local $filestem     = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name};\r
@@ -45,8 +45,8 @@ sub makeZip {
             }\r
         }\r
         \r
-    local $ziptemp    = "$src\\$toPath\\ziptemp";\r
-    chdir "$src\\$toPath";\r
+    local $ziptemp    = "$out\\ziptemp";\r
+    chdir "$out";\r
     print "Info -- chdir to ".`cd`."\n"         if ($verbose);\r
     system("rm -rf $ziptemp")                 if (-d $ziptemp);\r
     die "Fatal -- Couldn't remove $ziptemp"   if (-d $ziptemp);\r
@@ -100,8 +100,8 @@ sub makeZip {
     $zipfile->addTree('.', $topdir);\r
     if (-e $zipname)    {!system("rm -f $zipname")     or die "Error -- Couldn't remove $zipname.";}\r
     $zipfile->writeToFileNamed($zipname);\r
-    print "Info -- created $src\\$toPath\\$zipname.\n"  if ($verbose);\r
-       # move .zip from <src>/<out>/ziptemp to <src>/<out>.\r
+    print "Info -- created $out\\$zipname.\n"  if ($verbose);\r
+       # move .zip from <out>/ziptemp to <out>.\r
     !system("mv -f $zipname     ..")                    or die "Error -- Couldn't move $zipname to ..";\r
     }\r
     \r