summaryrefslogtreecommitdiffstats
path: root/tools/ucl
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-05-11 17:22:44 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-05-11 20:34:12 +0200
commit4f3fa9accbd77f8c85f87ae057d2420ce7666ff7 (patch)
tree8fced5134d1d2fea634ab93063cf3647df632efc /tools/ucl
parent8a4075d454a64cc51ea7e496f346fd96d5970eff (diff)
downloadrockbox-4f3fa9accbd77f8c85f87ae057d2420ce7666ff7.tar.gz
rockbox-4f3fa9accbd77f8c85f87ae057d2420ce7666ff7.zip
Change mkdir -p to work on Windows.
Windows mkdir doesn't know about the -p option and requires paths to use \ as path separator. Try to detect when building on Windows and use the Windows internal function instead of relying on a compatible mkdir in the path. Change-Id: I47d47d45edeb38c672321f77d6e91268bf744dba
Diffstat (limited to 'tools/ucl')
-rw-r--r--tools/ucl/src/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile
index 8a73a53f5f..2d6f18f102 100644
--- a/tools/ucl/src/Makefile
+++ b/tools/ucl/src/Makefile
@@ -12,6 +12,12 @@ ifndef V
SILENT = @
endif
+ifeq ($(OS),Windows_NT)
+mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
+else
+mkdir = mkdir -p $(1)
+endif
+
ifdef RBARCH
CFLAGS += -arch $(RBARCH)
endif
@@ -59,7 +65,7 @@ $(TARGET_DIR)libucl$(RBARCH).a: $(OBJS)
$(OBJDIR)/%.o: %.c
@echo CC $<
- $(SILENT)mkdir -p $(dir $@)
+ $(SILENT)$(call mkdir, $(dir $@))
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c $< -o $@
clean: