help-make
[Top][All Lists]
Advanced

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

Re: how to allow multiple empty commands?


From: Eric Melski
Subject: Re: how to allow multiple empty commands?
Date: Thu, 4 Feb 2010 17:47:11 -0800
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Mark Galeck (CW) wrote:

So I thought, the best way to tell make, to not look for implicit
rules for header files, is to have lines like

foobar.h:;

in all my automatically generated dependency makefiles.  The problem
is, thousands of those makefiles are always included, and they have
all those duplicate lines, each header file, is present in many of
them.


...  But I can't due to
make complaining.  Well I can, it's just that I have to dump the
warnings into a devnull. Somehow this doesn't seem right :)


Rather than emitting simply:

        foobar.h:;

Why not emit something like this:

        ifndef _foobar_rule
        foobar.h:;
        _foobar_rule=1
        endif

This way you get only one definition of the rule, the first time it is encountered. Of course this will add an extra variable to your variable table, one per header file, which may or may not be a problem itself.

HTH,

Eric Melski
Electric Cloud, Inc.
http://blog.electric-cloud.com





reply via email to

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