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.18 by williamc, Thu Apr 1 17:28:45 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}.exe
148 >        \@mv $$hashref{name}.exe \$(binarystore)/$$hashref{name}
149 > binfiles+=$filename
150 > bintargets+=$$hashref{name} $$hashref{name}_d $$hashref{name}_Insure
151 > ENDTEXT
152   }
153  
154   sub External_StartTag {
# Line 119 | Line 157 | sub External_StartTag {
157          my $hashref;
158          
159          $hashref=$switch->SetupValueHash(\@vars);
160 +        $$hashref{'ref'}=~tr[A-Z][a-z];
161          print GNUmakefile $$hashref{'ref'};
162          if ( defined $$hashref{'version'} ) {
163                  print GNUmakefile "_V_".$$hashref{'version'};
# Line 172 | Line 211 | sub Use_start {
211          print GNUmakefile "local__$$hashref{name}=true\n";
212   }
213  
214 < sub CheckBuildFile($directory) {
214 > sub CheckBuildFile {
215           my $classdir=shift;
216           $ClassName="";
217           $thisfile="$classdir/$buildfile";
# Line 203 | Line 242 | sub AssociateGroup {
242   }
243  
244   # Split up the Class Block String into a useable array
245 < sub _CutBlock($string) {
245 > sub _CutBlock {
246      my $string= shift @_;
247      @BlockClassA = split /\//, $string;
248   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines