summaryrefslogtreecommitdiffstats
path: root/src/windows
diff options
context:
space:
mode:
authorKevin Koch <kpkoch@mit.edu>2007-04-23 15:54:19 +0000
committerKevin Koch <kpkoch@mit.edu>2007-04-23 15:54:19 +0000
commitd6658915d06df1f90191b2ff12c7c4a61ab0e47e (patch)
tree70e34d4e549db3a36e51e3b43c5d08e0436e7be4 /src/windows
parentbf95c447389c32e3555ea5cc5513a5ede2233ff2 (diff)
downloadkrb5-d6658915d06df1f90191b2ff12c7c4a61ab0e47e.tar.gz
krb5-d6658915d06df1f90191b2ff12c7c4a61ab0e47e.tar.xz
krb5-d6658915d06df1f90191b2ff12c7c4a61ab0e47e.zip
Optimize file/directory pruning
Not tagged yet so it can be evaluated first. Consolidate find and rm operations in prunefiles.pl as suggested by Ken. Remove pruning of SDK files. This hasn't been needed since the installer builds moved from staging to temp directories. Remove debug statement not cleaned up previously. Add a troubleshooting tip to the doc. Ticket: new Target_Version: 1.6.1 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19521 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/build/BKWconfig.xml12
-rw-r--r--src/windows/build/bkw-automation.html2
-rw-r--r--src/windows/build/bkw.pl1
-rw-r--r--src/windows/build/pruneFiles.pl38
-rw-r--r--src/windows/build/sdkfiles.xml2
5 files changed, 23 insertions, 32 deletions
diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml
index 30c77f9185..42cf1543b8 100644
--- a/src/windows/build/BKWconfig.xml
+++ b/src/windows/build/BKWconfig.xml
@@ -67,11 +67,9 @@
</Files>
</CopyList>
<Prunes> <!-- Files to be removed from current build to match what is in the 3.1 distribution: -->
- <Prune dummy="foo" />
<Prune name="CVS" />
<Prune name=".cvsignore" flags="i" />
<Prune name="Changelog" flags="i" />
-<!-- <Prune name="site" /> -->
</Prunes>
<Requires>
<Switch dummy="foo" />
@@ -155,16 +153,6 @@
<Include path="sdkfiles.xml" /> <!-- Included file is relative to location of bkw.pl. -->
</Files>
</CopyList>
- <Prunes>
- <Prune dummy="foo" />
- <Prune name="*.exe" />
- <Prune name="*.msi" />
- <Prune name="*.dll" />
- <Prune name="*.obj" />
- <Prune name="*.wixobj" />
- <Prune name="custom.lib" />
- <Prune name="custom.exp" />
- </Prunes>
</Zip>
</Zips>
<CopyList> <!-- Copied at end of post-package step. -->
diff --git a/src/windows/build/bkw-automation.html b/src/windows/build/bkw-automation.html
index ab0ef7d3c1..637c9c9b80 100644
--- a/src/windows/build/bkw-automation.html
+++ b/src/windows/build/bkw-automation.html
@@ -349,6 +349,8 @@ Default is bkw.pl.log. <BR>&nbsp;
</H2>
<P><STRONG>Can't clean directory; can't delete file or directory</STRONG><BR>
Make sure a file in the named directory isn't open in another application.</P>
+ <P><STRONG>Can't find kerberos.ver</STRONG><BR>
+ You skipped the repository step and are trying to build in an empty directory.</P>
</DIV>
</BODY>
</HTML>
diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl
index 08a168243f..439e68053b 100644
--- a/src/windows/build/bkw.pl
+++ b/src/windows/build/bkw.pl
@@ -341,7 +341,6 @@ sub main {
'pismere/athena/util/lib/getopt',
'pismere/athena/util/guiwrap'
);
- local $logging = $odr->{logfile}->{def} ? ">> $odr->{logfile}->{value} 2>&1" : " ";
foreach my $module (@cvsmodules) {
local $cvscmd = $cvscmdroot." ".$module;
if ($verbose) {print "Info -- cvs command: $cvscmd\n";}
diff --git a/src/windows/build/pruneFiles.pl b/src/windows/build/pruneFiles.pl
index 091a6a090a..9e47b1777e 100644
--- a/src/windows/build/pruneFiles.pl
+++ b/src/windows/build/pruneFiles.pl
@@ -1,33 +1,35 @@
#!perl -w
#use strict;
-require "makeZip.pl";
+use Data::Dumper;
sub pruneFiles {
local ($xml, $config) = @_;
- local $prunes = $xml->{Prunes};
+ local $prunes = $xml->{Prunes};
if (! $prunes) {return 0;}
-
+
# Use Unix find instead of Windows find. Save PATH so we can restore it when we're done:
local $savedPATH = $ENV{PATH};
$ENV{PATH} = $config->{Config}->{unixfind}->{value}.";".$savedPATH;
- local $j=0;
print "Info -- Processing prunes in ".`cd`."\n" if ($verbose);
- while ($prunes->{Prune}->[$j]) {
- if (exists $prunes->{Prune}->[$j]->{name}) { ## Don't process dummy entry!
- local $prune = $prunes->{Prune}->[$j]->{name};
- local $flags = $prunes->{Prune}->[$j]->{flags};
- $flags = "" if (!$flags);
- local $cmd = "find . -".$flags."name $prune";
- print "Info -- Looking for filenames containing $prune\n";
- local $list = `$cmd`;
- foreach $target (split("\n", $list)) {
- print "Info -- Pruning $target\n" if ($verbose);
- ! system("rm -rf $target") or die "Unable to prune $target";
- }
- }
- $j++;
+ local $pru = $prunes->{Prune};
+ local $files = "( ";
+ local $bFirst = 1;
+ while (($key, $val) = each %$pru) {
+ local $flags = $val->{flags};
+ $flags = "" if (!$flags);
+ if (!$bFirst) {$files .= " -or ";}
+ $bFirst = 0;
+ $files .= "-".$flags."name $key";
+ print "Info -- Looking for filenames matching $key\n" if ($verbose);
+ }
+ $files .= " )";
+ local $list = `find . $files`;
+ if (length($list) > 1) {
+ print "Info -- Pruning $list\n" if ($verbose);
+ ! system("rm -rf $list") or die "Unable to prune $list";
}
+
$ENV{PATH} = $savedPATH;
}
diff --git a/src/windows/build/sdkfiles.xml b/src/windows/build/sdkfiles.xml
index 3c1481f17c..37a5f422c7 100644
--- a/src/windows/build/sdkfiles.xml
+++ b/src/windows/build/sdkfiles.xml
@@ -7,7 +7,7 @@
<File name="relnotes.html" from="doc\kerberos" to="doc" />
<File name="kclient.rtf" from="athena\auth\krb4\kclient\doc" to="doc" />
- <File name="msi-deployment-guide.txt" from="athena\auth\krb5\src\windows\installer\wix\" to="\doc" />
+ <File name="msi-deployment-guide.txt" from="athena\auth\krb5\src\windows\installer\wix\" to="\doc" />
<File name="*.*" from="staging\inc" to="inc" />
<!-- loadfuncs.c is deliberately here. Otherwise, *.h would work. -->