unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/1] build: remove trailing '/.' when doing mkdir -p .deps/.
@ 2013-11-03 14:05 Tomi Ollila
  2013-11-03 15:35 ` Jed Brown
  2014-01-13 18:39 ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: Tomi Ollila @ 2013-11-03 14:05 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

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.
---
 Makefile.local | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index 72524eb..c85e09c 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
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-13 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-03 14:05 [PATCH 1/1] build: remove trailing '/.' when doing mkdir -p .deps/ Tomi Ollila
2013-11-03 15:35 ` Jed Brown
2013-11-03 21:55   ` Tomi Ollila
2014-01-12  0:19     ` David Bremner
2014-01-13 18:39 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).