[Top][All Lists]

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

Re: clean dependencies

From: Paul D. Smith
Subject: Re: clean dependencies
Date: Wed, 18 Jul 2001 16:25:36 -0400

%% "Lindner, Mike" <address@hidden> 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 <address@hidden>          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

reply via email to

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