Am Montag, 13. November 2006 18:54 schrieb Per Inge Mathisen: > On 11/13/06, Gerard Krol <[EMAIL PROTECTED]> wrote: > > And it is not that every user needs to run "make depend", it just needs > > to be done when there are changes to the includes. I believe there are > > switches to make gcc do the same as makedepend, but a lot slower. > > I do not know about slower, but there is no need to add dependencies > to files that are checked in, at least not if you use gcc -M. The > standard way to do this is, it seems, to create new, hidden files with > dependency information for each .c file. In autohell, those are added > as .Po files in a separate .deps directory. One advantage of this is > that you do not need to check in changes to dependencies to the > repository. > > I had some fun with gnu make and gcc -M a few months ago, and created > a very generalized build system with only those two components, > including configuration checking, 'make dist' and dependency > generation. You can see it at > http://svn.gna.org/viewcvs/buckyball/trunk/ if you are interested. I > do not know how well something like that would scale. Looks interesting...
$(OBJDIR)/%.o : %.c $(COMPILE.c) -MD -o $@ $< @mkdir -p $(DEPDIR) @mv $(do).d $(df).d @cp $(df).d $(df).P; \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(df).d >> $(df).P; \ rm -f $(df).d -include $(SOURCE:%.c=$(DEPDIR)/%.P) Does that code run always before the %.o: %.c rule is applied to any file? Otherwise it should be run before and look similar to gcc -I. -MM -MF file.P file.c (-MM: Don't include system headers in the list.) --Dennis
pgpBDEmKEKzbt.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev