8 ## A colon (':') separated list of files already read.
9 ## Must be initialized to ":".
11 ## A newline separated of element (support Shell Patterns) to exclude.
13 ## The separator used in list for the output
17 ## A list of elements separated by the separator given in $separator.
18 ## The new elements will be appended to the list.
24 if [ ":$onelist:" = "::" ] ; then return ; fi
25 if [ ! -f $onelist ] ; then return ; fi
26 if [ ":${filelist##*:$onelist:*}:" = "::" ] ; then return ; fi
27 filelist=":$onelist$filelist"
29 onelistcontent=`cat $onelist | while read line ; do echo -n $line ; echo -n ":" ; done`
33 for line in $onelistcontent ; do
34 line2=${line##\#include }
35 if [ ":$line:" = ":$line2:" ] ; then
36 for linex in $excludelist ; do
37 if [ ":${line##$linex}:" = "::" ] ; then line="" ; fi
39 if [ ":$line:" != "::" ] ; then
40 if [ ":$list:" = "::" ] ; then
43 list="$list$separator$line"
46 elif [ ":$line2:" != "::" ] ; then
57 readlist "$excludefile"
64 readlist "$includefile"
65 echo "$list" | sort | uniq