don't check when its clang masquerading as gcc
[AROS.git] / tools / cxref / contrib / daVinvi_include.pl
blob68a0c90a1852616795411679d54376546e8ce3dc
1 #!/bin/sh
3 # Converts the cxref output files into a format that can be read into
4 # the DaVinci graph drawing program.
6 # (c) 1999 Andrew M. Bishop
9 exec perl -x $0 $*
11 #!perl
13 die "Usage: $0 cxref.include\n" if($#ARGV==-1);
15 open(INCLUDE,"<$ARGV[0]") || die "Cannot open $ARGV[0]\n";
17 %sysinclude=();
19 print "[\n";
21 while(<INCLUDE>)
23 chop;
24 ($file,@includes)=split(/ /);
26 if($file =~ /\.c$/)
28 print "l(\"$file\",n(\"\",[a(\"OBJECT\",\"$file\"),a(\"_GO\",\"ellipse\")],\n";
30 else
32 print "l(\"$file\",n(\"\",[a(\"OBJECT\",\"$file\")],\n";
35 print "\t[\n";
36 foreach $include (@includes)
38 if($include =~ /^%(.+)$/)
40 print "\te(\"\",[],r(\"$1\")),\n";
42 else
44 $sysincludes{$include}=1;
45 print "\te(\"\",[a(\"EDGEPATTERN\",\"dotted\")],r(\"<$include>\")),\n";
48 print "\t]))\n,\n";
51 foreach $include (keys(%sysincludes))
53 print "l(\"<$include>\",n(\"\",[a(\"OBJECT\",\"$include\"),a(\"COLOR\",\"#808080\")],[]))\n,\n";
56 print "]\n";
58 close(INCLUDE);