help-make
[Top][All Lists]
Advanced

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

RE: too simple of a problem


From: Paul D. Smith
Subject: RE: too simple of a problem
Date: Tue, 18 Apr 2006 11:29:01 -0400

%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:

  pb> Ok Mr. Adams, I forgot the question.
  pb> Why doesn't it work ?

You really need to provide more information.  What do you want to
happen?  What does actually happen?


Offhand I'd _guess_ that nothing happens.  This is because you've listed
files that already exist as your targets, and there is no prerequisite
listed for any target.  So, since the targets exist and there's nothing
that might make them out of date, make considers all those targets up to
date and doesn't do anything.

However, please just _SAY_ what's going on rather than forcing everyone
to guess.  It's just a waste of everyone's time, including yours if we
don't have to have our intuition mojo working that day.


You have a few choices on where to go.  An obvious one is you could
declare all those targets .PHONY so they'll always be considered out of
date.


Also, I would strongly urge you to lay off the eval stuff unless it's
REALLY necessary.  People wrote lots of very complex makefiles for many,
many years without eval.  Eval is very powerful but it gives a lot of
added complexity to a makefile and causes it to be very difficult to
read (plus it takes more computing power to parse your makefiles).  Your
example could be trivially rewritten like this:

    LIST := \
        ...

    all: $(LIST)

    $(LIST) :
            UnmanglePvcs.pm $@

    .PHONY: all $(LIST)

which is a LOT more readable and less work to parse (both for people
_and_ make).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]