ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ProcessSiteFile
Revision: 1.5
Committed: Thu Apr 8 11:29:21 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: ProtoEnd, V0_9_39, V0_9_38, V0_9_37, V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31, V0_9_30, V0_9_29, V0_9_28, V0_9_27, V0_9_26, V0_9_25, V0_9_24, V0_9_23, V0_9_22, V0_9_21, V0_9_20, V0_9_19, V0_9_18, V0_9_17, V0_9_16, V0_9_15, V0_9_14, V0_9_13, V0_9_12, V0_9_11, V0_9_10, V0_9_9, V0_9_8, V0_9_7, V0_9_6, V0_9_5, V0_9_4, V0_9_3, V0_9_2, V0_9_1, V0_9, V0_8
Branch point for: V0_9branch
Changes since 1.4: +1 -0 lines
Log Message:
Add to CPPFLAGS for G3 group

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;