2 |
|
# |
3 |
|
# Interface |
4 |
|
# --------- |
5 |
< |
# new(ConfigArea) |
5 |
> |
# new(toolbox) |
6 |
|
# ParseBuildFile($base,$path,$file) |
7 |
|
# ParseBuildFileExport(filename) |
8 |
|
# BlockClassPath() : Return the class path |
21 |
|
my $class=shift; |
22 |
|
my $self={}; |
23 |
|
bless $self, $class; |
24 |
< |
$self->{area}=shift; |
25 |
< |
$self->{toolbox}=$self->{area}->toolbox(); |
24 |
> |
$self->{toolbox}=shift; |
25 |
|
$self->{Arch}=1; |
26 |
|
push @{$self->{ARCHBLOCK}}, $self->{Arch}; |
27 |
|
return $self; |
48 |
|
\&Bin_start,$self, |
49 |
|
\&OutToScreen, $self, |
50 |
|
"", $self); |
51 |
+ |
$switch->addtag($parse,"ProductStore", |
52 |
+ |
\&Store_start,$self, |
53 |
+ |
"", $self, |
54 |
+ |
"", $self); |
55 |
|
$switch->addtag($parse,"LibType", |
56 |
|
\&LibType_Start,$self, |
57 |
|
\&LibType_text, $self, |
139 |
|
AddDir::adddir("$ENV{LOCALTOP}/$ENV{INTwork}/$self->{path}"); |
140 |
|
my $fh=FileHandle->new(); |
141 |
|
open ( $fh, ">$ENV{LOCALTOP}/$ENV{INTwork}/".$self->{path}."/BuildFile.mk" |
142 |
< |
) or die 'Unable to open /$ENV{INTwork}/".$self->{path}."/BuildFile.mk $!\n'; |
142 |
> |
) or die "Unable to open /$ENV{INTwork}/".$self->{path}."/BuildFile.mk $!\n"; |
143 |
|
@{$self->{filehandlestack}}=($fh); |
144 |
|
# make an alias |
145 |
|
*GNUmakefile=$fh; |
173 |
|
sub ParseBuildFile_Export { |
174 |
|
my $self=shift; |
175 |
|
my $filename=shift; |
176 |
< |
my $bf=BuildSystem::BuildFile->new($self->{area}); |
176 |
> |
my $bf=BuildSystem::BuildFile->new($self->{toolbox}); |
177 |
|
if ( defined $self->{remoteproject} ) { |
178 |
|
$bf->{remoteproject}=$self->{remoteproject}; |
179 |
|
} |
360 |
|
# print $typefile "\t\$(_quietbuild_)"; |
361 |
|
# print $typefile $mapper->template($$hashref{'class'},$type)."\n"; |
362 |
|
# print $typefile "\t\$(_quietstamp_)"; |
363 |
< |
# print $typefile "$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$@.ds \$@ \$^\n"; |
363 |
> |
# print $typefile "\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$@.ds \$@ \$^\n"; |
364 |
|
|
365 |
|
# -- cleaning targets |
366 |
|
push @targets, "clean_$dirname"; |
518 |
|
print binGNUmakefile "$$hashref{name}_Insure.exe:.psrc\n"; |
519 |
|
print binGNUmakefile "$$hashref{name}_d.exe:$objectname_d\n"; |
520 |
|
print binGNUmakefile "\t\$(CClinkCmdDebug)\n"; |
521 |
< |
print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
521 |
> |
print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
522 |
|
print binGNUmakefile "$$hashref{name}_l_d.exe:$objectname_d\n"; |
523 |
|
print binGNUmakefile "\t\$(CClinkCmdDebugLocal)\n"; |
524 |
< |
print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
524 |
> |
print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
525 |
|
print binGNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n"; |
526 |
|
print binGNUmakefile "\t\$(CClinkCmdInsure)\n"; |
527 |
< |
print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
527 |
> |
print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
528 |
|
print binGNUmakefile "$$hashref{name}_o.exe:$objectname_o\n"; |
529 |
|
print binGNUmakefile "\t\$(CClinkCmd)\n"; |
530 |
< |
print binGNUmakefile "\t\@\$(SCRAMPERL) $(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
530 |
> |
print binGNUmakefile "\t\@\$(SCRAMPERL) \$(SCRAM_HOME)/src/scramdatestamp \$\@\.ds \$\@ \$\^\n"; |
531 |
|
print binGNUmakefile "$$hashref{name}.dep:$$hashref{file}\n"; |
532 |
|
print binGNUmakefile "-include $$hashref{name}.dep\n"; |
533 |
|
print binGNUmakefile <<ENDTEXT; |
918 |
|
} |
919 |
|
} |
920 |
|
} |
921 |
+ |
|
922 |
+ |
sub Store_start { |
923 |
+ |
my $self=shift; |
924 |
+ |
my $name=shift; |
925 |
+ |
my $hashref=shift; |
926 |
+ |
|
927 |
+ |
if ( $self->{Arch} ) { |
928 |
+ |
$self->{switch}->checktag( $name, $hashref, 'name' ); |
929 |
+ |
|
930 |
+ |
# -- store creation |
931 |
+ |
my $dir=$$hashref{'name'}; |
932 |
+ |
AddDir::adddir($ENV{LOCALTOP}."/".$dir); |
933 |
+ |
if ( exists $$hashref{'type'} ) { |
934 |
+ |
# -- architecture specific store |
935 |
+ |
if ( $$hashref{'type'}=~/^arch/i ) { |
936 |
+ |
$dir=$dir."/".$ENV{SCRAM_ARCH}; |
937 |
+ |
AddDir::adddir($ENV{LOCALTOP}."/".$dir); |
938 |
+ |
} |
939 |
+ |
else { |
940 |
+ |
$self->parseerror("Unknown type in <$name> tag"); |
941 |
+ |
} |
942 |
+ |
} |
943 |
+ |
|
944 |
+ |
# -- set make variables for the store |
945 |
+ |
print GNUmakefile "SCRAMSTORENAME_".$$hashref{'name'}.":=".$dir."\n"; |
946 |
+ |
print GNUmakefile "SCRAMSTORE_".$$hashref{'name'}.":=". |
947 |
+ |
$ENV{LOCALTOP}."/".$dir."\n"; |
948 |
+ |
print GNUmakefile "VPATH+=".$ENV{LOCALTOP} |
949 |
+ |
."/".$dir.":".$ENV{RELEASETOP}."/".$dir."\n"; |
950 |
+ |
} |
951 |
+ |
} |
952 |
+ |
|