don't check when its clang masquerading as gcc
[AROS.git] / tools / cxref / contrib / cxref_includes.pl
blob91f3350f43ab4a715f0a6b8776d1d4e0040f1a70
1 #!/bin/sh
2 # -*- cperl -*-
4 # C Cross Referencing & Documentation tool. Version 1.5b.
6 # A Perl script to determine the headers to process from the cxref.include file.
8 # Written by Andrew M. Bishop
10 # This file Copyright 1999 Andrew M. Bishop
11 # It may be distributed under the GNU Public License, version 2, or
12 # any higher version. See section COPYING of the GNU Public license
13 # for conditions under which this file may be redistributed.
16 if [ ! -f "$1" ]; then
17 echo "Usage: $0 cxref.include"
18 exit 1
21 exec perl -x $0 $1
23 exit 1
25 #!perl
27 $|=1;
29 open(INCLUDE,"<$ARGV[0]") || die "Cannot open $ARGV[0]\n";
31 @files=();
33 while(<INCLUDE>)
35 ($cfile,@hfiles)=split(/[ \n]+/);
37 foreach $hfile (@hfiles)
39 push(@files,substr($hfile,1)) if ($hfile =~ m/^%/);
43 close(INCLUDE);
45 $lastfile='';
46 @files=sort(@files);
48 foreach $file (@files)
50 if($file ne $lastfile)
52 print "cxref $file\n";
53 `cxref $file`;
55 $lastfile=$file;