git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix dependencies of parse-options test program

From
Pierre Habouzit <madcoder@debian.org>
Date
Nov 14, 2007, 08:48 UTC
Message-ID
<20071114084819.GA18926@artemis.corp>
In-Reply-To
<Pine.LNX.4.64.0711140012210.4362@racer.site>
On Wed, Nov 14, 2007 at 12:12:49AM +0000, Johannes Schindelin wrote:
Show 13 quoted lines
> Hi,
> 
> On Wed, 14 Nov 2007, Pierre Habouzit wrote:
> 
> > On Tue, Nov 13, 2007 at 11:46:20PM +0000, Johannes Schindelin wrote:
> > 
> > > apparently I forgot to send this patch, which I thought was only 
> > > relevant in the builtin-commit branch of mine:
> > 
> >   Btw is there a reason why git doesn't use the gcc -M* options to have
> > proper dependency informations ?
> 
> I suspect the reason is that we do not want to depend on gcc...
  right, but like said, other compilers can generate them, only with a
different CLI switch, and non withstanding this problem, there are tools
to generate such kind of information easily.
  Though for those who care about this issue, this is hackable easily
using config.mak, here is how:
    CFLAGS += -MMD -MF $(@D)/.$(@F:.o=.dep)
    -include $(wildcard .*.dep */.*.dep) GIT-VERSION-FILE

It's a quick hack, but allow gcc + gnu make (I believe $(@D) is GNU) users not to be bitten hard by those dependency issues.

The reason why I include GIT-VERSION-FILE again is that many make complain if -include gets an empty like as an argument, and passing /dev/null on certains occasions triggers warnings about /dev/null having a date in the future on some machines for a reason I never found.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 6 in “Fix dependencies of parse-options test program”
  1. Fix dependencies of parse-options test programAlex Riesen, Nov 13, 2007
  2. Johannes SchindelinNov 13, 2007
  3. Pierre HabouzitNov 14, 2007
  4. Johannes SchindelinNov 14, 2007
  5. Pierre HabouzitNov 14, 2007
  6. Junio C HamanoNov 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.