Fix warnings and errors in ampi_noimpl.C
[charm.git] / src / scripts / dep.pl
blob4076728534b5a89fd05020cba03b2b156c2e5c6b
1 # input set of strings to match
2 # this script removes header files reported from g++ -MM from
3 # those directories in the argument to this script
5 @dontprint = @ARGV;
6 @ARGV=();
8 $n = @dontprint;
10 # read from stdin
12 while (<>) {
13 # if line ends with : it is the start of a dependency
14 chop;
15 if ( ($target,$other) = /([a-zA-Z0-9_-]*\.o:)(.*)$/ ) {
16 print $target;
17 $go=1;
18 $first=1;
19 while ($go) {
20 if ($first) {
21 $_ = $other;
22 } else {
23 $_ = <> || last;
24 chop;
26 $first = 0;
28 if ( /\\$/ ) {
29 chop;
30 $go = 1;
31 } else {
32 $go = 0;
35 @files = split;
36 foreach $word (@files) {
37 $bad = 0;
38 foreach $notword (@dontprint) {
39 if ( $word =~ /$notword/ ) {
40 $bad = 1;
41 last;
44 if ( ! $bad ) {
45 print " \\\n";
46 print " ",$word;
51 print "\n";