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

Comparing COMP/SCRAM/src/BuildFile.pm (file contents):
Revision 1.3 by williamc, Tue Mar 2 10:58:07 1999 UTC vs.
Revision 1.20 by williamc, Thu Apr 8 12:55:49 1999 UTC

# Line 7 | Line 7 | require Exporter;
7   BEGIN {
8   use ToolBox;
9   $buildfile="BuildFile";
10 < #$toolbox=ToolBox->new();
10 > $toolbox=ToolBox->new();
11   }
12  
13   #Parse the BuildFile
# Line 29 | Line 29 | sub ParseBuildFile {
29                  'ConfigurationClass' => \&OutToMakefile,
30                  'AssociateGroup' => \&AssociateGroup,
31                  'none' => \&OutToMakefile,
32 <                'Bin' => \&OutToMakefile,
32 >                'Bin' => 'none',
33                  'Bin_StartTag' => \&Bin_start,
34                  'ClassPath' => \&OutToMakefile,
35                  'ClassPath_StartTag' => \&setBlockClassPath
# Line 102 | Line 102 | sub Bin_start {
102          my $fileclass;
103          my @tools;
104          my $tool;
105 +        my $filename;
106 +        my $objectname;
107          
108          $hashref=$switch->SetupValueHash(\@vars);
109          $switch->checkparam($hashref, $name, 'file');
110          if ( ! defined $$hashref{name} ) {
111                  ($$hashref{name}=$$hashref{file})=~s/\..*//;
112          }
113 <        $fileclass=getclass($file);
114 <        $toolbox->maketargets("exe",$fileclass, $$hashref{name}, $file );
115 <        print GNUmakefile "bin::$file\n\n";
113 >        # This stuff for later
114 >        #$fileclass=$toolbox->getclass($file);
115 >        #$toolbox->maketargets("exe",$fileclass, $$hashref{name}, $file );
116 >        ($filename=$$hashref{file})=~s/\..*//;
117 >        ($objectname=$$hashref{file})=~s/\..*/\.o/;
118 >        ($objectname_d=$$hashref{file})=~s/\..*/_d\.o/;
119 >        ($objectname_Insure=$$hashref{file})=~s/\..*/_Insure\.o/;
120 >        print GNUmakefile "bin:$$hashref{name}\n";
121 >        print GNUmakefile "bin_debug:$$hashref{name}_d\n";
122 >        print GNUmakefile "bin_insure:$$hashref{name}_Insure\n";
123 >        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_d.exe\n";
124 >        print GNUmakefile ".INTERMEDIATE::$$hashref{name}_Insure.exe\n";
125 >        print GNUmakefile ".INTERMEDIATE::$$hashref{name}.exe\n";
126 >        print GNUmakefile "$$hashref{name}_Insure:.psrc\n";
127 >        print GNUmakefile "$$hashref{name}_d.exe:$objectname_d\n";
128 >        print GNUmakefile "\t\$(CClinkCmdDebug)\n";
129 >        print GNUmakefile "$$hashref{name}_Insure.exe:$objectname_Insure\n";
130 >        print GNUmakefile "\t\$(CClinkCmdInsure)\n";
131 >        print GNUmakefile "$$hashref{name}.exe:$objectname\n";
132 >        print GNUmakefile "\t\$(CClinkCmd)\n";
133 >        print GNUmakefile "$objectname:$$hashref{name}.dep\n";
134 >        print GNUmakefile "$objectname_d:$$hashref{name}.dep\n";
135 >        print GNUmakefile "$objectname_Insure:$$hashref{name}.dep\n";
136 >        print GNUmakefile "$$hashref{name}.dep:$$hashref{file}\n";
137 >        print GNUmakefile "-include $$hashref{name}.dep\n";
138 > #       print GNUmakefile "$$hashref{name}:$$hashref{file}\n";
139 > print GNUmakefile <<ENDTEXT;
140 > $$hashref{name}_d.exe:\$(libslocal_d)
141 > $$hashref{name}.exe:\$(libslocal)
142 > $$hashref{name}_Insure.exe:\$(libslocal_I)
143 > $$hashref{name}_d:$$hashref{name}_d.exe
144 >        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
145 > $$hashref{name}_Insure:$$hashref{name}_Insure.exe
146 >        \@mv $$hashref{name}_Insure.exe \$(binarystore)/$$hashref{name}_Insure
147 > $$hashref{name}:$$hashref{name}_d.exe
148 >        \@mv $$hashref{name}_d.exe \$(binarystore)/$$hashref{name}
149 > $$hashref{name}_o:$$hashref{name}_o.exe
150 >        \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
151 > binfiles+=$filename
152 > bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
153 > ENDTEXT
154   }
155  
156   sub External_StartTag {
# Line 119 | Line 159 | sub External_StartTag {
159          my $hashref;
160          
161          $hashref=$switch->SetupValueHash(\@vars);
162 +        $$hashref{'ref'}=~tr[A-Z][a-z];
163          print GNUmakefile $$hashref{'ref'};
164          if ( defined $$hashref{'version'} ) {
165                  print GNUmakefile "_V_".$$hashref{'version'};
# Line 172 | Line 213 | sub Use_start {
213          print GNUmakefile "local__$$hashref{name}=true\n";
214   }
215  
216 < sub CheckBuildFile($directory) {
216 > sub CheckBuildFile {
217           my $classdir=shift;
218           $ClassName="";
219           $thisfile="$classdir/$buildfile";
# Line 203 | Line 244 | sub AssociateGroup {
244   }
245  
246   # Split up the Class Block String into a useable array
247 < sub _CutBlock($string) {
247 > sub _CutBlock {
248      my $string= shift @_;
249      @BlockClassA = split /\//, $string;
250   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines