Skip to content

Commit 0b3c515

Browse files
authored
Merge pull request #149 from nitz/sorry-my-build-env-is-absolute-nonsense
Fixing Windows not playing nicely with mkdir.
2 parents 764147d + 73ec884 commit 0b3c515

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ GDB = $(CROSS_COMPILE)gdb
4747
NRFUTIL = adafruit-nrfutil
4848
NRFJPROG = nrfjprog
4949

50-
MK = mkdir -p
50+
# Set make directory command, Windows tries to create a directory named "-p" if that flag is there.
51+
ifneq ($(OS), Windows_NT)
52+
MK = mkdir -p
53+
else
54+
MK = mkdir
55+
endif
56+
5157
RM = rm -rf
5258

5359
# auto-detect BMP on macOS, otherwise have to specify
@@ -324,7 +330,7 @@ print-%:
324330

325331
# Create build directories
326332
$(BUILD):
327-
@$(MK) $@
333+
@$(MK) "$@"
328334

329335
clean:
330336
@$(RM) $(BUILD)

0 commit comments

Comments
 (0)