ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/DependencyMangler
Revision: 1.4
Committed: Thu Apr 8 10:04:49 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: ProtoEnd, V0_8
Branch point for: V0_9branch
Changes since 1.3: +1 -1 lines
Log Message:
DependencyMangler - overwrite outfile

File Contents

# User Rev Content
1 williamc 1.1 #!/usr/local/bin/perl
2     #
3     # Take a standard dependency file (output from a makedepend)
4     # Add additional targets to reflect mangled names of objects
5     #
6    
7 williamc 1.3 @manglenames=qw(_d _pic _PIC _Insure);
8 williamc 1.1 open ( INFILE, "<$ARGV[0]" );
9 williamc 1.4 open (OUTFILE, ">$ARGV[0]_tmp");
10 williamc 1.1 while ( <INFILE> ) {
11 williamc 1.2 print OUTFILE $_;
12 williamc 1.1 foreach $mang ( @manglenames ) {
13     ($out=$_)=~s/(.*)(.o :)/\1$mang\2/;
14     print OUTFILE $out;
15     }
16     }
17     close INFILE;
18 williamc 1.2 close OUTFILE;
19     use File::Copy;
20     copy "$ARGV[0]_tmp", "$ARGV[0]";