Listtree.mcc: rename variables in Listtree_GetEntry to match the template of other...
[AROS.git] / tools / cxref / contrib / includes2cxref.pl
blobacd96117a5554ce8e4abf1e77dbd2ea436a95c13
1 #!/bin/sh
3 # C Cross Referencing & Documentation tool. Version 1.5b.
5 # A Perl script to determine the headers to process from the cxref.include file.
7 # Written by Andrew M. Bishop
9 # This file Copyright 1999 Andrew M. Bishop
10 # It may be distributed under the GNU Public License, version 2, or
11 # any higher version. See section COPYING of the GNU Public license
12 # for conditions under which this file may be redistributed.
15 if [ ! -f "$1" ]; then
16 echo "Usage: $0 cxref.include"
17 exit 1
20 exec perl -x $0 $1
22 exit 1
24 #!perl
26 $|=1;
28 open(INCLUDE,"<$ARGV[0]") || die "Cannot open $ARGV[0]\n";
30 @files=();
32 while(<INCLUDE>)
34 ($cfile,@hfiles)=split(/[ \n]+/);
36 foreach $hfile (@hfiles)
38 push(@files,substr($hfile,1)) if ($hfile =~ m/^%/);
42 close(INCLUDE);
44 $lastfile='';
45 @files=sort(@files);
47 foreach $file (@files)
49 if($file ne $lastfile)
51 print "cxref $file\n";
52 `cxref $file`;
54 $lastfile=$file;