37 |
|
'ClassPath_StartTag' => \&setBlockClassPath, |
38 |
|
'lib' => 'none', |
39 |
|
'lib_StartTag' => \&lib_start, |
40 |
< |
'lib_EndTag' => 'none' |
40 |
> |
'lib_EndTag' => 'none', |
41 |
> |
'ignore' => 'none', |
42 |
> |
'ignore_EndTag' => \&ignoretag_end, |
43 |
> |
'ignore_StartTag' => \&ignoretag, |
44 |
> |
'Architecture_StartTag' => \&Arch_Start, |
45 |
> |
'Architecture_EndTag' => \&Arch_End, |
46 |
> |
'Architecture' => \&OutToMakefile |
47 |
|
}; |
48 |
|
use Utilities::Switcher; |
49 |
|
$switch=Switcher->new($SupportedTags, $fullfilename); |
109 |
|
my @vars=@_; |
110 |
|
|
111 |
|
$hashref=$switch->SetupValueHash(\@vars); |
112 |
+ |
if ( $Arch ) { |
113 |
|
if ( defined $$hashref{'type'} ) { |
114 |
|
$ClassName=$$hashref{'type'}; |
115 |
|
} |
116 |
+ |
} |
117 |
|
} |
118 |
|
|
119 |
|
sub ClassPath_StartTag { |
122 |
|
my $hashref; |
123 |
|
|
124 |
|
$hashref=$switch->SetupValueHash(\@vars); |
125 |
+ |
if ( $Arch ) { |
126 |
|
if ( defined $$hashref{'defaultpath'} ) { |
127 |
|
} |
128 |
+ |
} |
129 |
|
} |
130 |
|
|
131 |
|
sub Bin_start { |
140 |
|
|
141 |
|
$hashref=$switch->SetupValueHash(\@vars); |
142 |
|
$switch->checkparam($hashref, $name, 'file'); |
143 |
+ |
if ( $Arch ) { |
144 |
|
if ( ! defined $$hashref{name} ) { |
145 |
|
($$hashref{name}=$$hashref{file})=~s/\..*//; |
146 |
|
} |
185 |
|
binfiles+=$filename |
186 |
|
bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure |
187 |
|
ENDTEXT |
188 |
+ |
} |
189 |
|
} |
190 |
|
|
191 |
|
sub External_StartTag { |
212 |
|
|
213 |
|
$hashref=$switch->SetupValueHash(\@vars); |
214 |
|
$switch->checkparam($hashref, $name, 'name'); |
215 |
+ |
if ( $Arch ) { |
216 |
|
print GNUmakefile "GROUP_".$$hashref{'name'}; |
217 |
|
if ( defined $$hashref{'version'} ) { |
218 |
|
print GNUmakefile "_V_".$$hashref{'version'}; |
219 |
|
} |
220 |
|
print GNUmakefile "=true\n"; |
221 |
+ |
} |
222 |
|
} |
223 |
|
|
224 |
|
sub External { |
245 |
|
|
246 |
|
$hashref=$switch->SetupValueHash(\@vars); |
247 |
|
$switch->checkparam($hashref, $name, "name"); |
248 |
+ |
if ( $Arch ) { |
249 |
|
$filename=SCRAMUtils::checkfile( |
250 |
|
"$ENV{INTsrc}/$$hashref{name}/BuildFile"); |
251 |
|
if ( $filename ne "" ) { |
252 |
|
ParseBuildFile_Export( $filename ); |
253 |
|
} |
254 |
+ |
} |
255 |
|
} |
256 |
|
|
257 |
|
sub CheckBuildFile { |
284 |
|
} |
285 |
|
} |
286 |
|
|
287 |
+ |
sub ignoretag { |
288 |
+ |
my $name=shift; |
289 |
+ |
my @vars=@_; |
290 |
+ |
|
291 |
+ |
$Arch=0; |
292 |
+ |
push @ARCHBLOCK, $Arch; |
293 |
+ |
} |
294 |
+ |
|
295 |
+ |
sub ignoretag_end { |
296 |
+ |
my $name=shift; |
297 |
+ |
my @vars=@_; |
298 |
+ |
|
299 |
+ |
pop @ARCHBLOCK; |
300 |
+ |
$Arch=$ARCHBLOCK[$#ARCHBLOCK]; |
301 |
+ |
} |
302 |
+ |
|
303 |
+ |
sub Arch_Start { |
304 |
+ |
my $name=shift; |
305 |
+ |
my @vars=@_; |
306 |
+ |
my $hashref; |
307 |
+ |
|
308 |
+ |
$hashref=$toolswitch->SetupValueHash( \@vars ); |
309 |
+ |
$toolswitch->checkparam($hashref, $name, 'name'); |
310 |
+ |
#( ($$hashref{name}=~/$ENV{SCRAM_ARCH}/) )?$Arch=1:$Arch=0; |
311 |
+ |
( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($Arch=1) : ($Arch=0); |
312 |
+ |
push @ARCHBLOCK, $Arch; |
313 |
+ |
} |
314 |
+ |
sub Arch_End { |
315 |
+ |
my $name=shift; |
316 |
+ |
my @vars=@_; |
317 |
+ |
|
318 |
+ |
pop @ARCHBLOCK; |
319 |
+ |
$Arch=$ARCHBLOCK[$#ARCHBLOCK]; |
320 |
+ |
} |
321 |
+ |
|
322 |
|
# Split up the Class Block String into a useable array |
323 |
|
sub _CutBlock { |
324 |
|
my $string= shift @_; |