view lib-src/process-gnu-depends.sh @ 13:13c6d0aaafe5

Added tag r19-15b7 for changeset bcdc7deadc19
author cvs
date Mon, 13 Aug 2007 08:48:18 +0200
parents 376386a54a3c
children
line wrap: on
line source

#!/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