0
|
1 ## Process the output of makedepend.
|
|
2 ## Copyright (c) 1994 Amdahl Corporation.
|
|
3 ## Written by Ben Wing, December 1994.
|
|
4
|
|
5 ## This file is used as part of 'make depend', to produce the
|
|
6 ## dependency list for src/Makefile.in.in.
|
|
7
|
|
8 ## Unfortunately, makedepend (at least the one that comes as part
|
|
9 ## of Open Windows under Solaris) is stupid and doesn't follow the
|
|
10 ## documented behavior. So we have to force the definitions of
|
|
11 ## certain options through -D flags (even though it's supposed to
|
|
12 ## pick this up), and post-process the output to get rid of stuff
|
|
13 ## we don't want.
|
|
14
|
|
15 ## The sed stage gets rid of include files in other directories,
|
|
16 ## except for lwlib.h (makedepend puts system include files in,
|
|
17 ## which is pretty stupid). We also get rid of some standard
|
|
18 ## include files that are in every or pretty much every file
|
|
19 ## and where changes in those files don't usually merit
|
|
20 ## recompilation of everything. Finally, we eliminate entirely
|
|
21 ## the dependencies for some files (such as unex*.c) that get
|
|
22 ## screwed up by makedepend. We just put those in by hand at
|
|
23 ## the top of the dependency list.
|
|
24
|
|
25 ## The awk stage puts one dependency per line. Then we pass
|
|
26 ## the result through sort and uniq (makedepend is supposed
|
|
27 ## to not put in duplicate dependencies, but it does so
|
|
28 ## occasionally).
|
|
29
|
|
30 ## After running 'make depend', verify that the output (in
|
|
31 ## depend.out) is reasonable and then replace the stuff in
|
|
32 ## Makefile.in.in marked "generated by 'make depend'".
|
|
33
|
|
34 sed -e '
|
|
35 1d
|
|
36 s/ \/[^ ]*\/lwlib\// $(LWLIBSRCDIR)\//g
|
|
37 s/\.\.\/etc\//${srcdir}\/${etcdir}/g
|
|
38 s/ \/[^ ]*\.h//g
|
|
39 s/ \/[^ ]*gray//g
|
|
40 s/ [a-z][^ ]*\/[^ ]*\.h//g
|
|
41 s/ lisp\.h//g
|
|
42 s/ lisp-union\.h//g
|
|
43 s/ lisp-disunion\.h//g
|
|
44 s/ lrecord\.h//g
|
|
45 s/ emacsfns\.h//g
|
|
46 s/ symeval\.h//g
|
|
47 s/ symsinit\.h//g
|
|
48 s/ syssignal\.h//g
|
|
49 s/ intl\.h//g
|
|
50 s/ tt_c\.h//g
|
|
51 s/ descrip\.h//g
|
|
52 /^unex/d
|
|
53 /^sgiplay/d
|
|
54 /^Extern/d
|
|
55 /^extw/d
|
|
56 /^[^ ]*\.o:$/d
|
|
57 ' | awk '
|
|
58 { for (i = 2; i <= NF; i++)
|
|
59 printf ("%s %s\n", $1, $i)
|
|
60 }
|
|
61 ' | sort | uniq
|