ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ProcessSiteFile
Revision: 1.6
Committed: Mon Aug 28 08:17:54 2000 UTC (24 years, 8 months ago) by williamc
Branch: MAIN
CVS Tags: V1_pre0, HEAD
Branch point for: SCRAM_V1_BRANCH
Changes since 1.5: +0 -0 lines
State: FILE REMOVED
Log Message:
removed

File Contents

# User Rev Content
1 williamc 1.1 #!/usr/local/bin/perl5
2     #
3     # Parse the site file specified by the first argument 1 and produce a
4     # makefile specified by argument 2
5     # version defaults by argument 3
6    
7     open (OUT, ">$ARGV[1]" );
8     # group stuff - prototypeonly - hardcoded in for now
9     #
10     print OUT<<ENDTEXT;
11     ifdef GROUP_G3
12     cmsim=true
13 williamc 1.5 CPPFLAGS += -DCMS_BIGBIG
14 williamc 1.3 geant=true
15 williamc 1.1 endif
16     ENDTEXT
17    
18 williamc 1.3 open (requires, "<$ARGV[0]_reqs" );
19     while( <requires> ) {
20     print OUT $_;
21     }
22     close requirements;
23    
24 williamc 1.1 # project defualts
25    
26     open (defaultsfile, "<$ARGV[2]" ) || die "Unable to open file $ARGV[2] $!";
27     while( <defaultsfile> ) {
28     chomp;
29     next if /^#/;
30     next if /^\s*$/;
31     ($product, $version )=split /:/;
32 williamc 1.3 $product=~tr[A-Z][a-z];
33 williamc 1.1 print OUT<<ENDTEXT;
34     ifdef $product
35     ${product}_V_$version=true
36     endif
37     ENDTEXT
38     }
39     close defaultsfile;
40    
41     open (file, "<$ARGV[0]" ) || die "Unable to open file $ARGV[0] $!";
42     while( <file> ) {
43     chomp;
44     next if /^#/;
45     next if /^\s*$/;
46     ($product, $version, $type, $variable, $value, @junk)=split /:/;
47     next if ( $variable=~/\&/ );
48 williamc 1.3 $product=~tr[A-Z][a-z];
49 williamc 1.1 if ( ! $version=="" ) {
50     $product=$product."_V_".$version;
51     }
52     print OUT<<ENDTEXT;
53     ifdef $product
54     $variable += $value
55     endif
56     ENDTEXT
57     }
58     close file;
59    
60    
61     # Prototype only
62     print OUT 'INCLUDEPATH+=$(addprefix -I,$(INCLUDE))'."\n";
63 williamc 1.2 print OUT 'LDFLAGS+=$(addprefix -L,$(LIBDIR))'."\n";
64 williamc 1.1 print OUT 'CPPFLAGS+=$(addprefix -D,$(CPPDEFINES))'."\n";
65 williamc 1.4 print OUT 'lib+=$(extralib)'."\n";
66 williamc 1.2 print OUT 'LDLIBS+=$(addprefix -l,$(lib))'."\n";
67     print OUT 'LDLIBS+=$(addprefix -l,$(REQUIRES))'."\n";
68 williamc 1.1
69     close OUT;