[Top][All Lists]

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

Re: Q: what is the best praxis to express dependency-only-prerequisites

From: Paul D. Smith
Subject: Re: Q: what is the best praxis to express dependency-only-prerequisites ?
Date: Fri, 16 Jun 2006 11:12:40 -0400

%% "Markus F.X.J. Oberhumer" <address@hidden> writes:

  mfxjo> I'm sorry of this is an obvious question, but I somehow cannot
  mfxjo> find a way to nicely express dependency-only-prerequisites.

  mfxjo> What is the best praxis for the two scenarios outlined below ?

(FYI, I think you mean "practice" here...)

  mfxjo> # This Makefile contains a typo, and I would like to get
  mfxjo> #   make: *** No rule to make target `tmp/b', needed by `all'.  Stop.
  mfxjo> #
  mfxjo> # But the order-only-prerequiste below also seems to provide
  mfxjo> # an (empty) recipe. So the quesion is: how do you best express
  mfxjo> # a dependency-only-preqrequisite ?

Unfortunately, I don't know of any way.

Your comments above slightly mischaracterize the situation.  It's not
quite true that "order-only-prerequisites provide an empty recipe".  In
a makefile, just defining a target is enough to keep make from
complaining about no rule to make a target.  The manual says:

> If a rule has no prerequisites or commands, and the target of the rule
> is a nonexistent file, then `make' imagines this target to have been
> updated whenever its rule is run.

I guess the result is the same so it's a distinction without a difference.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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