ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildPackageReqs
Revision: 1.2.2.1.2.1
Committed: Tue Aug 22 18:14:57 2000 UTC (24 years, 8 months ago) by williamc
Branch: HPWbranch
CVS Tags: BuildSystemProto1, V0_18_0, V0_18_0model, V0_17_1, V0_18_0alpha, V0_17_0, V0_16_4, V0_16_3, V0_16_2, V0_16_1, V0_16_0, V0_15_1, V0_15_0, V0_15_0beta
Branch point for: V0_17branch, V0_16branch, V0_15branch
Changes since 1.2.2.1: +0 -1 lines
Log Message:
remove perl5 location dependence

File Contents

# User Rev Content
1 williamc 1.1 #
2     # build the package dependencies information file
3     #
4     # First argument is filename to build
5     # Following arguments are package names to update from
6    
7     $reqsfile=shift;
8 williamc 1.2 use Utilities::Switcher;
9 williamc 1.1
10     &initialise;
11     foreach $file ( @ARGV ) {
12     $hashtags={
13     'Use' => 'none',
14     'Use_StartTag' => 'Use_start'
15     };
16     $switch=Switcher->new($hashtags,"$file");
17     &finishup;
18     }
19    
20     sub Use_start {
21     my $name=shift;
22     my @var=@_;
23     my $hashref;
24    
25     $hashref=$switch->SetupValueHash(\@vars);
26     $switch->checkparam($hashref, $name, "name");
27    
28     print WORKFILE "local__$file:Use:$$hashref{name}\n";
29     }
30    
31     sub initialise {
32     open WORKFILE, ">$reqsfile.wk" ) or die "Unable to open $reqsfile.wk $!";
33     open ( REQSFILE , "<$reqsfile" );
34     while ( <REQSFILE> ) {
35     foreach $file ( @ARGV ) {
36     next if ( /^local__$file:Use:/ )
37     print WORKFILE $_;
38     }
39     }
40     close REQSFILE
41     }
42    
43     sub finishup {
44     use File::Copy;
45     close WORKFILE;
46     copy ( $reqsfile.wk, $reqsfile ) or die "Unable to update $reqsfile $!";
47     }