This is strange... (creating dependency lists for make)
Paul English
pme at umb.umb.edu
Thu Dec 29 05:45:45 AEST 1988
In article <1652 at 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'').
More information about the Comp.unix.wizards
mailing list