From 2a87ebd7150af2c72c1de90f81c13ffb3c76ab44 Mon Sep 17 00:00:00 2001 From: Kevin Koch Date: Sat, 31 Mar 2007 22:09:23 +0000 Subject: [PATCH] Make /OUTDIR absolute instead of relative 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 | 2 +- src/windows/build/bkw.pl | 22 ++++++++++++---------- src/windows/build/makeZip.pl | 10 +++++----- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml index d6d89bb8d..111aaa601 100644 --- a/src/windows/build/BKWconfig.xml +++ b/src/windows/build/BKWconfig.xml @@ -11,7 +11,7 @@ - + diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index 20d219e01..5a2f7230c 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -197,7 +197,7 @@ sub main { our $vverbose = $config->{CommandLine}->{Options}->{vverbose}->{value}; our $clean = $switches[0]->{clean}->{value}; local $src = $paths[0]->{src}->{path}; - local $toPath = $paths[0]->{out}->{path}; + local $out = $paths[0]->{out}->{path}; if ($clean && !$switches[0]->{nopackage}->{value}) { print "Info -- /clean forces /nopackage.\n"; @@ -352,6 +352,7 @@ sub main { my $prunes = $config->{Stages}->{Make}->{Prunes}; my $j=0; print "Info -- Processing prunes in ".`cd`."\n" if ($verbose); +print Dumper($prunes); while ($prunes->{Prune}->[$j]) { if (exists $prunes->{Prune}->[$j]->{name}) { ## Don't process dummy entry! my $prune = $prunes->{Prune}->[$j]->{name}; @@ -541,10 +542,10 @@ sub main { # Begin packaging extra items: chdir($src); # Now in . - print "Info -- chdir to ".`cd`."\n" if ($verbose); - system("rm -rf $toPath") if (-d $toPath); - die "Fatal -- Couldn't remove $src\\$toPath." if (-d $toPath); - mkdir($toPath); + print "Info -- chdir to ".`cd`."\n" if ($verbose); + system("rm -rf $out") if (-d $out); + die "Fatal -- Couldn't remove $out." if (-d $out); + mkdir($out); my $zipsXML = $config->{Stages}->{PostPackage}->{Zips}; local $i = 0; @@ -554,17 +555,17 @@ sub main { $i++; } ## End zip in xml. - $ziptemp = "$src\\$toPath\\ziptemp"; ## Clean up any temp directory. - chdir("$src\\$toPath"); + $ziptemp = "$out\\ziptemp"; ## Clean up any temp directory. + chdir("$out"); print "Info -- chdir to ".`cd`."\n" if ($verbose); system("rm -rf $ziptemp") if (-d $ziptemp); - my $out = $config->{CommandLine}->{Directories}->{out}->{path}; $config->{Stages}->{PostPackage}->{CopyList}->{Config} = $config->{Stages}->{PostPackage}->{Config}; ## Use the post package config. $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{From}->{root} = "$src\\pismere"; - $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{To}->{root} = "$src\\$out"; + $config->{Stages}->{PostPackage}->{CopyList}->{Config}->{To}->{root} = "$out"; copyFiles($config->{Stages}->{PostPackage}->{CopyList}, $config); ## Copy any files + print "Info -- chdir to ".`cd`."\n" if ($verbose); if ($switches[0]->{sign}->{value}) { signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config); } @@ -574,7 +575,8 @@ sub main { ##-- Package action. system("rm -rf $src/a.tmp"); ## Clean up junk. - system("rm -rf $src/$toPath/ziptemp"); ## Clean up junk. + system("rm -rf $out/a.tmp"); ## Clean up junk. + system("rm -rf $out/ziptemp"); ## Clean up junk. # End logging: if ($switches[0]->{logfile}->{value}) {$l->stop;} diff --git a/src/windows/build/makeZip.pl b/src/windows/build/makeZip.pl index ab1100554..e54f5a831 100644 --- a/src/windows/build/makeZip.pl +++ b/src/windows/build/makeZip.pl @@ -9,7 +9,7 @@ sub makeZip { local ($zip, $config) = @_; local $src = $config->{CommandLine}->{Directories}->{src}->{path}; - local $toPath = $config->{CommandLine}->{Directories}->{out}->{path}; + local $out = $config->{CommandLine}->{Directories}->{out}->{path}; local @switches = $config->{CommandLine}->{Options}; local $zipname = $zip->{filename}; local $filestem = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name}; @@ -45,8 +45,8 @@ sub makeZip { } } - local $ziptemp = "$src\\$toPath\\ziptemp"; - chdir "$src\\$toPath"; + local $ziptemp = "$out\\ziptemp"; + chdir "$out"; print "Info -- chdir to ".`cd`."\n" if ($verbose); system("rm -rf $ziptemp") if (-d $ziptemp); die "Fatal -- Couldn't remove $ziptemp" if (-d $ziptemp); @@ -100,8 +100,8 @@ sub makeZip { $zipfile->addTree('.', $topdir); if (-e $zipname) {!system("rm -f $zipname") or die "Error -- Couldn't remove $zipname.";} $zipfile->writeToFileNamed($zipname); - print "Info -- created $src\\$toPath\\$zipname.\n" if ($verbose); - # move .zip from //ziptemp to /. + print "Info -- created $out\\$zipname.\n" if ($verbose); + # move .zip from /ziptemp to . !system("mv -f $zipname ..") or die "Error -- Couldn't move $zipname to .."; } -- 2.26.2