[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pre-including a generated file

From: Eric Melski
Subject: Re: Pre-including a generated file
Date: Wed, 12 Aug 2009 23:59:12 -0700
User-agent: Thunderbird (X11/20090608)

Leandro Lucarella wrote:


This worked:

    __dummy := $(shell ./gen_file $(MAKE) $(if $(MAKEFLAGS),-$(MAKEFLAGS),) \
                       $(MAKEOVERRIDES) $(MAKECMDGOALS))
    sinclude file

It's a little dirtier than I what expected to be (and well, what I'm doing
is pretty dirty itself =), but seems to works rather well.

Please let me know if you find any flaws on this approach.

You may also find this Mr. Make article useful:

It describes a system for getting gmake to consider targets out-of-date when the commands for the target have changed.

Hope that helps,

Eric Melski
Electric Cloud, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]