Creating directories using prerequisites is a bad idea, in a number of
ways.

The best way to do it is by adding this to your makefile:

  BUILD_DIR = build

  __dummy := $(shell [ -d $(BUILD_DIR) ] || mkdir $(BUILD_DIR))

  all: $(BUILD_DIR)/foo $(BUILD_DIR)/bar

  $(BUILD_DIR)/foo:
                echo "hello" > $(BUILD_DIR)/foo

  $(BUILD_DIR)/bar:
                echo "hi there" > $(BUILD_DIR)/bar

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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


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

Reply via email to