Skip to content

Commit 5d01466

Browse files
committed
Redo window mkdir; add cross-platform rmdir
1 parent 6867499 commit 5d01466

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/export/gcc_arm_common.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# This file was automagically generated by mbed.org. For more information,
22
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
33

4+
# cross-platform directory manipulation
45
ifeq ($(OS),Windows_NT)
5-
MAKEDIR = IF exists $(1) () ELSE (mkdir $(1))
6+
MAKEDIR = if not exist "$(1)" mkdir "$(1)"
7+
RM = rmdir /S /Q
68
else
7-
MAKEDIR = [ -d $(1) ] || mkdir -p $(1)
9+
MAKEDIR = mkdir -p $(1)
10+
RM = rm -rf
811
endif
912

1013
ifeq (,$(filter bin,$(notdir $(CURDIR))))
@@ -19,7 +22,7 @@ $(OBJDIR):
1922
Makefile : ;
2023
% :: $(OBJDIR) ; :
2124
clean :
22-
rm -rf $(OBJDIR)
25+
$(RM) $(OBJDIR)
2326
{% block target_clean -%}
2427
{% endblock %}
2528
else

0 commit comments

Comments
 (0)