%% "Lindner, Mike" <[EMAIL PROTECTED]> writes:

  lm> I'd like some way of avoiding the rebuliding of dependencies for
  lm> targets (liek clean) that don't need them. I thought of testing
  lm> the target and making the include conditional, but there doesn't
  lm> seem to be a way to access the target variable before the include
  lm> happens.

You can test whether you're cleaning or not in a conditional by
examining the $(MAKECMDGOALS) builtin variable, which see.  I think the
manual contains this exact example.

  lm> I found no solution in the online documentation. Is there a way to
  lm> do this, or is there a better way to write the makefile to avoid
  lm> the problem?

There is this, too; a much better way of handling dependencies that
avoids this and other problems.  See my web site below.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to