From: "Vyacheslav O. Myskin" Organization: BINP RAS, Novosibirsk, Russia To: djgpp AT delorie DOT com Date: Fri, 28 Feb 1997 12:54:20 +0600 Subject: Another makefile question Reply-To: V DOT O DOT Myskin AT inp DOT nsk DOT su Message-Id: <271CB367F60@csd.inp.nsk.su> Hello everybody! My question is: what's the best way to use gcc dependency-generating feature in a makefile? That's how I do it now: %.d: %.c gcc -MM $< | sed ... >$@ #don't remember the exact command line, #it inserts $@ between $*.o and ':' include foo.d bar.d .... It works, but when I start building from scratch make warns about lots of non-existent .d files before generating them. I'd like to use more elegant way if possible. Thanks. - ______________________________________________ Vyacheslav O. Myskin Budker Institute of Nuclear Physics (BINP RAS) Novosibirsk, Russia