From 4f0645eb7909635a72421de57904ef6531bbd82a Mon Sep 17 00:00:00 2001 From: Marian Balakowicz Date: Thu, 7 Sep 2006 12:05:53 +0200 Subject: Fix LOG_DIR directory creation error. Add support for automatic creation of BUILD_DIR directory. --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fc7b117..a4aa19f 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,11 @@ endif ifneq ($(BUILD_DIR),) saved-output := $(BUILD_DIR) + +# Attempt to create a output directory. +$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) + +# Verify if it was successful. BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd) $(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist)) endif # ifneq ($(BUILD_DIR),) -- cgit v1.1