summaryrefslogtreecommitdiffstats
path: root/src/windows/build/bkw.pl
diff options
context:
space:
mode:
authorKevin Koch <kpkoch@mit.edu>2007-04-01 18:42:18 +0000
committerKevin Koch <kpkoch@mit.edu>2007-04-01 18:42:18 +0000
commit95b3a38b02061319a950772662287cabf40860b2 (patch)
tree89427ebf887afdae880e47eb736285a289999660 /src/windows/build/bkw.pl
parentd2538fba2160d81ed76482cc0d961e3d85a91f54 (diff)
downloadkrb5-95b3a38b02061319a950772662287cabf40860b2.tar.gz
krb5-95b3a38b02061319a950772662287cabf40860b2.tar.xz
krb5-95b3a38b02061319a950772662287cabf40860b2.zip
Be smarter about cleaning the staging area.
Clean output area if packaging. (Will not clean if -nopackage specified.) Pull corebinaries from staging area instead of from target area. Don't sign before making zips. Build products are only signed in the staging area before any packaging is done. (Packaging products are signed when copied to the output area.) Previous change: Add relnotes.html to output area. Target_Version: 1.6.1 Ticket: 5490 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19371 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/build/bkw.pl')
-rw-r--r--src/windows/build/bkw.pl19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl
index 7c25399aa0..a5d0142335 100644
--- a/src/windows/build/bkw.pl
+++ b/src/windows/build/bkw.pl
@@ -403,10 +403,20 @@ print Dumper($prunes);
##++ Package action:
if ($switches[0]->{nopackage}->{value}) { ## If /clean, this switch will have been cleared.
print "Info -- *** Skipping packaging.";
+ if (-d $out) {
+ print "Warning -- *** Output directory $out will not be cleaned.\n";
+ }
}
else {
if ($verbose) {print "Info -- *** Begin prepackage.\n";}
+ if (-d $out) {
+ !system("rm -rf $out/*") or die "Fatal -- Couldn't clean $out.";
+ }
+ else {
+ mkdir($out) or die "Fatal -- Couldn't create $out.";
+ }
+
# We read in the version information to be able to update the site-local files in the install build areas:
local $version_path = $config->{Stages}->{Package}->{Config}->{Paths}->{Versions}->{path};
open(DAT, "$src/$version_path") or die "Could not open $version_path.";
@@ -467,9 +477,12 @@ print Dumper($prunes);
my $staging = "$wd\\staging";
chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";
print "Info -- chdir to ".`cd`."\n" if ($verbose);
- !system("rm -rf $staging/*") or die "Fatal -- Couldn't clean $staging.";
- !system("rmdir $staging") or die "Fatal -- Couldn't remove $staging.";
- mkdir($staging) or die "Fatal -- Couldn't create $staging.";
+ if (-d "staging") {
+ !system("rm -rf $staging/*") or die "Fatal -- Couldn't clean $staging.";
+ }
+ else {
+ mkdir($staging) or die "Fatal -- Couldn't create $staging.";
+ }
# Force Where From and To are relative to:
$prepackage->{CopyList}->{Config}->{From}->{root} = "$wd\\athena";