aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2013-11-03 16:05:35 +0200
committerGravatar David Bremner <david@tethera.net>2014-01-13 14:12:15 -0400
commita7e072f2773cffa35ddcb5a3c6dc4563917cc93f (patch)
treef3837df96e0abbf041e48ab51a9eeb99121b9574
parentf2a3d9799d68d567d2bdd43827ac158885a4c11b (diff)
build: remove trailing '/.' when doing mkdir -p .deps/.
When make variable $@ does not contain directory part, $(@D) resolves as '.'. In this case .deps/$(@D) is '.deps/.' In some systems `mkdir [-p] directory/.` fails. To make this compatible with more system substitute trailing '/.' (slashdot) with '' (empty string) whenever it occurs there.
-rw-r--r--Makefile.local4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.local b/Makefile.local
index 72524eb3..c85e09c5 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -236,11 +236,11 @@ endif
quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))
%.o: %.cc $(global_deps)
- @mkdir -p .deps/$(@D)
+ @mkdir -p $(patsubst %/.,%,.deps/$(@D))
$(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
%.o: %.c $(global_deps)
- @mkdir -p .deps/$(@D)
+ @mkdir -p $(patsubst %/.,%,.deps/$(@D))
$(call quiet,CC $(CPPFLAGS) $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
.PHONY : clean