Path: utzoo!attcan!uunet!husc6!contact!umb!pme From: pme@umb.umb.edu (Paul English) Newsgroups: comp.unix.wizards Subject: Re: This is strange... (creating dependency lists for make) Keywords: dependencies make Message-ID: <726@umb.umb.edu> Date: 28 Dec 88 19:45:45 GMT References: <1652@ektools.UUCP> Reply-To: pme@umb.edu (Paul English) Organization: Dept of Math and CS, UMass Boston. Lines: 22 In article <1652@ektools.UUCP> you write: >Here is some bizareness I found. Below is a subset of a Bourne Shell >script I am writing on a Sun 3/60 running SunOS 4.0. This segment >generates dependency lists for makefiles. ... Why don't you just use the -M option of the C compiler to produce your dependency lists? (Or, if you have gnu gcc, use -MM, which is better.) See the cc man page for details on -M. My (generic) application Makefile ends like this: ----- dependencies: $(sources) @echo "# make dependencies for $(program)" > dependencies $(compile) -M $(csrc) >> dependencies include dependencies ----- Of course you have to first create an empty dependencies file (``touch dependencies''), or comment out the include, until you do the ``make dependencies'').