Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!robobar!ronald From: ronald@robobar.co.uk (Ronald S H Khoo) Newsgroups: comp.unix.programmer Subject: Re: mkdep program for SysV (Xenix/Unix) Message-ID: <1990Dec17.171906.8080@robobar.co.uk> Date: 17 Dec 90 17:19:06 GMT References: <1990Dec13.010143@cs.yale.edu> <1990Dec14.023842.21164@robobar.co.uk> <1990Dec16.020414.8652@NCoast.ORG> Organization: Robobar Ltd., Perivale, Middx., ENGLAND. Lines: 33 allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) writes: > If I remember correctly, BSD cc has -M but it has to be massaged to produce > dependencies. gcc has -M and -E -M (I think that's correct); the latter > produces dependencies in Makefile format. Maybe gcc's changed since you last looked at its options. I quote the relevant portion of "man gcc" (which says 1.36 on it, but is the one distributed with gcc 1.37.1, ie the current gcc) > once you trust a tool, you don't worry it to death.) An excellent point. Begin excerpt from /usr/man/cat.G/gcc.G:----------------------------------- -M Tell the preprocessor to output a rule suitable for make(1) describing the dependencies of each source file. For each source file, the preprocessor outputs one make-rule whose target is the object file name for that source file and whose dependencies are all the files #included in it. This rule may be a single line or may be continued with \-newline if it is long. -M implies -E. -MM Like -M but the output mentions only the user-header files included with #include "file". System header files included with #include are omitted. -MM implies -E. End excerpt from /usr/man/cat.G/gcc.G:----------------------------------- -- ronald@robobar.co.uk +44 81 991 1142 (O) +44 71 229 7741 (H)