www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/28/01:57:51

From: "Vyacheslav O. Myskin" <V DOT O DOT Myskin AT inp DOT nsk DOT su>
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  <myskin AT inp DOT nsk DOT su>
Budker Institute of Nuclear Physics (BINP RAS)
Novosibirsk, Russia

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019