ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/clientfile.pm
(Generate patch)

Comparing COMP/SCRAM/src/clientfile.pm (file contents):
Revision 1.1 by williamc, Mon Mar 1 10:37:54 1999 UTC vs.
Revision 1.5 by williamc, Thu Mar 18 12:53:58 1999 UTC

# Line 1 | Line 1
1 #!/usr/local/bin/perl5
2 #
1   # Make a client specific file for external products
2   #
3   #
4  
5   package clientfile;
6 + require 5.001;
7   require Exporter;
8   @ISA = qw(Exporter);
9   @EXPORT = qw(BuildClientFile);
# Line 13 | Line 12 | $scramdir="$ENV{INTwork}/SCRAM";
12   $Arch=1;
13   push @ARCHBLOCK, $Arch;
14  
15 < sub BuildClientFile($projectfile) {
15 > sub BuildClientFile {
16          my $projectfile=shift;
17          my $archdir=".SCRAM/$ENV{SCRAM_ARCH}";
18          my $clientfile="$archdir/clientsettings";
19 <        use AddDir;
19 >        use Utilities::AddDir;
20          use ToolBox;
21  
22 <        adddir($archdir);
22 >        AddDir::adddir($archdir);
23          initialiseclient($clientfile) or return; # get out if it already exists
24          $toolbox=ToolBox->new();
25          open ( CLIENT, ">$ENV{LOCALTOP}/$clientfile" ) ||
26                  die "clientfile: Cannot open clientsettings file "
27                          ."$clientfile $!\n";
28 +        open ( CLIENT2, ">$ENV{LOCALTOP}/".$clientfile."_reqs" ) ||
29 +                die "clientfile: Cannot open clientsettings file "
30 +                        ."$clientfile $!\n";
31          open (INSTALLLOG, ">$archdir/installation_log")
32                          || die "clientfile: Cannot open log file $!\n";
33          print CLIENT "# Machine Generated File - do not edit\n";
34          _ParseProjectReqs($projectfile);
35          close INSTALLLOG;
36          close CLIENT;
37 +        close CLIENT2;
38   }
39  
40 < sub _ParseProjectReqs($reqfile) {
40 > sub _ParseProjectReqs {
41          my $reqfile=shift;
42 <        use Switcher;
42 >        use Utilities::Switcher;
43  
44          $taglist={
45                  'require' => 'none',
# Line 71 | Line 74 | sub Require_start {
74   #
75   #---------------------------------------------------------------------------
76  
77 < sub _gettool($toolurl) {
77 > sub _gettool {
78   # set the $toolfile variable
79          my $toolurl=shift;
80          my @toolpath= split /:/, $ENV{SCRAM_BootStrapFiles};
# Line 118 | Line 121 | sub _tool {
121                  'System' => \&system_body,
122                  'Splice' => 'none',
123                  'Splice_starttag' => \&splice_start,
121                'INCLUDE' => 'none' ,
122                'INCLUDE_StartTag' => \&_dirchecktest ,
123                'LIBDIR_StartTag' => \&_dirchecktest ,
124                'LIBDIR' => 'none',
124                  'Client' => 'none',
125                  'LIB' => 'none',
126                  'LIB_StartTag' => \&lib_start,
# Line 130 | Line 129 | sub _tool {
129                  'Architecture' => 'none',
130                  'Function' => 'none',
131                  'Function_StartTag' => \&Function_start,
132 <                'Function_EndTag' => \&Function_end
132 >                'Function_EndTag' => \&Function_end,
133 >                'External' => 'none',
134 >                'External_StartTag' => \&External_client,
135            };
136                 # 'INCLUDE_StartTag' => \&INCLUDE_start ,
137  
138 <        use Switcher;
138 >        use Utilities::Switcher;
139          $toolswitch=Switcher->new($toollist,$toolfile);
140          $toolswitch->parse();
141  
# Line 146 | Line 147 | sub _tool {
147   # multiple defaults can be specified > colon seperated
148   #
149  
150 + sub External_client {
151 +        my $name=shift;
152 +        my @vars=@_;
153 +        my $hashref;
154 +
155 +        $hashref=$toolswitch->SetupValueHash( \@vars );
156 +        $toolswitch->checkparam( $hashref, $name, 'ref' );
157 +        print CLIENT2 <<ENDTEXT;
158 + ifdef $toolname
159 + $$hashref{ref}=true
160 + endif
161 + ENDTEXT
162 + }
163 +
164   sub Arch_Start {
165          my $name=shift;
166          my @vars=@_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines