annotate lib-src/gnudepend.pl @ 347:7c94d56991e1 r21-1-3

Import from CVS: tag r21-1-3
author cvs
date Mon, 13 Aug 2007 10:53:48 +0200
parents 19dcec799385
children cc15677e0335
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 0
diff changeset
1 #!/usr/bin/perl
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 while (<>)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 if (/\\$/)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 chop;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 $foo .= $_;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 @foo = split (/[ \\:]+/, $foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 $filename = $foo[0];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 if (($filename =~ /^unex/) ||
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ($filename =~ /^sgiplay/) ||
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ($filename =~ /^Extern/) ||
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ($filename =~ /^extw/))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 $foo = "";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 next;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 @foo = grep (!/\.c$/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 @foo = grep ((s/\/.*lwlib\//\$(LWLIBSRCDIR)\//, 1), @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 @foo = grep (!/lisp\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 @foo = grep (!/lisp\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 @foo = grep (!/lisp-union\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 @foo = grep (!/lisp-disunion\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 @foo = grep (!/lrecord\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 @foo = grep (!/emacsfns\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @foo = grep (!/symeval\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 @foo = grep (!/symsinit\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 @foo = grep (!/syssignal\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 @foo = grep (!/intl\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 @foo = grep (!/tt_c\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 @foo = grep (!/descrip\.h/, @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 shift @foo;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 foreach $i (0 .. $#foo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 $foo[$i] = $filename . ": " . $foo[$i];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 print $filename . ": config.h\n";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 print join ("\n", @foo);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 print "\n";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 $foo = "";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 }