Brian Foster wrote:
> does anyone happen to know of a makedepend(1)-like tool
> for *ix (plus, ideally, Cygwin), which is not buried deep
> in the guts of the X11 development system?
>> the gcc(1) or GNU cpp(1) `-M' option family may or may
> not be an acceptable alternative.
I've used cpp -MM with good results. Dependency stuff
can be trick though. Here's part of one of my Makefiles,
which has some info:
clean:
@@rm -f *.o tags .depend
# Note this dependency will be behind by one
# as the include is done before the dependencies
# are updated. This is OK however as the only
# thing that will change the dependency list is
# by {add,delet}ing #include directives. For
# C files this causes them to be rebuilt anyway.
# For H files it will change an existing
# header file in an existing dependency and so
# this is also handled. Note this method only
# works when all included files are in the
# current directory and below.
.depend: $(shell find ./ -name "*.[ch]")
gcc -MM ${CINCLUDES} ${SOURCES} > .depend
# Note this ifneq clause is required because
# when the file can't be included it tries
# to make it. So after a make clean it will just
# make the .depend again
ifneq ($(MAKECMDGOALS),clean)
-include .depend
endif
--
Pádraig Brady - http://www.pixelbeat.org
--- Following generated by rotagator ---
For a single user box, adding the following to /etc/fstab,
will allow you to `mount /mnt/floppy` etc. as a normal user
/dev/fd0 /mnt/floppy auto nosuid,nodev,noauto,user 0 0
/dev/cdrom /mnt/cdrom auto nosuid,nodev,noauto,user,ro,unhide 0 0
--
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!