Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site enea.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!enea!kim From: kim@enea.UUCP (Kim Walden) Newsgroups: net.sources Subject: make depend (part 1 of 3) Message-ID: <854@enea.UUCP> Date: Wed, 10-Apr-85 13:58:15 EST Article-I.D.: enea.854 Posted: Wed Apr 10 13:58:15 1985 Date-Received: Sat, 13-Apr-85 05:15:21 EST Reply-To: kim@enea.UUCP (Kim Walden) Distribution: net Organization: ENEA DATA, Sweden Lines: 36 In response to all requests for my dependency generating program, which uses only source files as basis for generation, (general method described in: K. Walden, "Automatic Generation of Make Dependencies", Softw. Pract. & Exper., vol. 14(6), 575-585, June 1984), I am now posting it to net.sources, in the two following parts. It was developed for 4.2bsd, and I did not pay any special attention to portability. System V users must do the usual name changes CFLAGS="-Dindex=strchar -Drindex=strrchar" etc. The program deals correctly with included generated files, provided that the include statements are recognizable in the corresponding source files, and standard suffix conventions are used. If conditional includes, like #ifdef KERNEL & !defined(LOCORE) #include "foo" #else #include "bar" appear in the files, it may sometimes be possible to extend the recognition part so that only the relevant include statements are extracted (the distributed program uses only grep), but in the general case, only the C preprocessor may resolve the conditions correctly, and therefore one may be forced to use the newly added -M option of cpp instead. But then again, cpp -M cannot handle included generated files correctly. -- Kim Walden ENEA DATA Sweden UUCP: {seismo,decvax,philabs}!{mcvax,ukc,unido}!enea!kim ARPA: decvax!mcvax!enea!kim@berkeley.arpa mcvax!enea!kim@seismo.arpa