%% Ken Glasson <[EMAIL PROTECTED]> (by way of Ken Glasson
%% <[EMAIL PROTECTED]>) writes:

  kg> I want the directory to be created if it doesn't exist - so have set it
  kg> as a dependency for the target objects:

No.  Very bad idea.

Look in the GNU make manual section "Phony Targets" for an example of
how to do this the Right Way.

  kg> When used this way and make is run repeatedly I get objects (and
  kg> binaries - not shown) being rebuilt unnecessarily due to what appears to
  kg> be the fact the the timestamp of the $(OBJLOC) directory is being
  kg> updated every time a new object is placed into it....

Yes, of course.  To make a target is a target is a target, and in UNIX
the modification time of a directory changes every time a file is added,
removed, or renamed in the directory.

-- 
-------------------------------------------------------------------------------
 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

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

Reply via email to