X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lib-src%2Fprocess-gnu-depends.sh;fp=lib-src%2Fprocess-gnu-depends.sh;h=b08a916d856665b82f31a6fa4e8b699a6ebb1526;hb=a5f466de30a3e927ed1146b0c7e3870e71465c8f;hp=0000000000000000000000000000000000000000;hpb=8b0299e2a613ab99d6e4dc2423e77ff93b715adc;p=chise%2Fxemacs-chise.git.1 diff --git a/lib-src/process-gnu-depends.sh b/lib-src/process-gnu-depends.sh new file mode 100755 index 0000000..b08a916 --- /dev/null +++ b/lib-src/process-gnu-depends.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +perl -e ' +while (<>) +{ + chop; + $foo .= $_; + if (!/\\$/) + { + @foo = split (/[ \\:\n]+/, $foo); + $filename = $foo[0]; + if (($filename =~ /^unex/) || + ($filename =~ /^sgiplay/) || + ($filename =~ /^Extern/) || + ($filename =~ /^extw/)) + { + $foo = ""; + next; + } + @foo = grep (!/\.c$/, @foo); + @foo = grep ((s/\/.*lwlib\//\$(LWLIBSRCDIR)\//, 1), @foo); + @foo = grep (!/lisp\.h/, @foo); + @foo = grep (!/lisp\.h/, @foo); + @foo = grep (!/lisp-union\.h/, @foo); + @foo = grep (!/lisp-disunion\.h/, @foo); + @foo = grep (!/lrecord\.h/, @foo); + @foo = grep (!/emacsfns\.h/, @foo); + @foo = grep (!/symeval\.h/, @foo); + @foo = grep (!/symsinit\.h/, @foo); + @foo = grep (!/syssignal\.h/, @foo); + @foo = grep (!/intl\.h/, @foo); + @foo = grep (!/tt_c\.h/, @foo); + @foo = grep (!/descrip\.h/, @foo); + shift @foo; + if (!$#foo) + { + next; + } + foreach $i (0 .. $#foo) + { + $foo[$i] = $filename . ": " . $foo[$i]; + } + print $filename . ": config.h\n"; + print join ("\n", @foo); + print "\n"; + $foo = ""; + } +} +' | sort | uniq \ No newline at end of file