Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4EBD7431FDE for ; Sun, 3 Nov 2013 06:05:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rEsFLcWyc5ma for ; Sun, 3 Nov 2013 06:05:47 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 7376E431FDD for ; Sun, 3 Nov 2013 06:05:47 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 8DB201000E0; Sun, 3 Nov 2013 16:05:37 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH 1/1] build: remove trailing '/.' when doing mkdir -p .deps/. Date: Sun, 3 Nov 2013 16:05:35 +0200 Message-Id: <1383487535-21597-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 14:05:52 -0000 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