[Top][All Lists]

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

RE: how to allow multiple empty commands?

From: Mark Galeck (CW)
Subject: RE: how to allow multiple empty commands?
Date: Wed, 3 Feb 2010 22:46:39 -0800

Thank you Paul!

>I don't know what "a SSCCE" is, but if you say so, I won't ask why.

Take a look at

> Is there a way to do this?  My attempts are below:

> is an obscure rule mentioned in the manual, that says in
> case of multiple commands for files starting with a ".", make would
> not complain.  But it still does !  why is the rule not followed??

>I'm not aware of any such statement; can you quote it or at give us some
>hint where it is?  Maybe you misinterpreted it?

Could very well be  I misunderstood something.  Here is:

Section 4.11 Multiple Rules for One Target
If more than one rule gives commands for the same file, make uses the last set 
given and prints an error message. (As a special case, if the file's name 
begins with a dot, no error message is printed. This odd behavior is only for 
compatibility with other implementations of make... you should avoid using it).

> but this seems not so great, because it seems from the manual, that
> make would actually go around and execute all these empty commands
> (you realize that I have thousands of them in the realistic example,
> and thousands of such targets, so the speed matters, I think).  Would
> it?

>It will... except that make has special case code and detects if the
command it would invoke is the empty string (or similar "do nothing"
commands) and won't actually invoke a shell to process the empty string.
It will, however, walk all the targets expanding the recipe strings

Yes indeed, I noticed it is walking all these millions of them, not good for me 
:)  can't have ::
Right now by best choice is to use :; and pipe the warnings to a black hole 
(these are only make warnings, which are of no interest to programmers using my 
make).  Seems to work OK, but I would probably prefer to prepend with . if 

reply via email to

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