summaryrefslogtreecommitdiffstats
path: root/src/windows/build/pruneFiles.pl
diff options
context:
space:
mode:
authorKevin Koch <kpkoch@mit.edu>2007-04-02 16:13:58 +0000
committerKevin Koch <kpkoch@mit.edu>2007-04-02 16:13:58 +0000
commitbda1c2f72144e81b8aab7db5282cfe323dddf775 (patch)
tree0c9b8bc53a4b9f6094949697dc0a0d5be744ab12 /src/windows/build/pruneFiles.pl
parent2f49a4ffe53292a6ce3c46a12e730ad2b6799665 (diff)
downloadkrb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.tar.gz
krb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.tar.xz
krb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.zip
Uncomment w2k files in corebinaries.xml
Factor processing of <Prunes> xml into pruneFiles.pl. Factor processing of <Zips> xml into zipXML.pl. Move SRC zip XML to <FetchSources> section of config file. Call zipXML in /REPOSITORY CHECKOUT section of script. Keep track of cleaning of OUTDIR so SRC zip isn't removed during packaging. Remove UNIXFIND from config file. If UNIXFIND isn't present in the config file, set the in-memory UNIXFIND to c:\tools\cygwin\bin. UNIXFIND is now an implementation detail stored in the in-memory config XML, like the versions read from kerberos.ver. Prune more temporary files before making SDK zip. Remove redundant custom files from sdkfiles.xml. Copy *.* from staging/inc instead of *.h -- one .c file is also required. Target_Version: 1.6.1 Ticket: 5490 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19375 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/build/pruneFiles.pl')
-rw-r--r--src/windows/build/pruneFiles.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/windows/build/pruneFiles.pl b/src/windows/build/pruneFiles.pl
new file mode 100644
index 000000000..2406c770e
--- /dev/null
+++ b/src/windows/build/pruneFiles.pl
@@ -0,0 +1,34 @@
+#!perl -w
+
+#use strict;
+require "makeZip.pl";
+
+sub pruneFiles {
+ local ($xml, $config) = @_;
+ 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->{CommandLine}->{Directories}->{unixfind}->{path}.";".$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++;
+ }
+ $ENV{PATH} = $savedPATH;
+ }
+
+return 1;