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

Comparing COMP/SCRAM/src/BuildSystem/BuildFile.pm (file contents):
Revision 1.3 by williamc, Wed Sep 6 10:17:28 2000 UTC vs.
Revision 1.13 by williamc, Wed Nov 15 14:49:22 2000 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new(ConfigArea)
5 > # new(toolbox)
6   # ParseBuildFile($base,$path,$file)
7   # ParseBuildFileExport(filename)
8   # BlockClassPath() : Return the class path
# Line 21 | Line 21 | sub new {
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;
# Line 49 | Line 48 | sub _initswitcher {
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,
# Line 136 | Line 139 | sub ParseBuildFile {
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;
# Line 170 | Line 173 | ENDTEXT
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          }
# Line 357 | Line 360 | sub Build_start {
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";
# Line 515 | Line 518 | ENDTEXT
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;
# Line 915 | Line 918 | sub Environment_end {
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 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines