From patchwork Wed Mar 7 23:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 10265551 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 827F660247 for ; Wed, 7 Mar 2018 23:09:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 731D628C08 for ; Wed, 7 Mar 2018 23:09:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67F40294CA; Wed, 7 Mar 2018 23:09:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E01BE294BA for ; Wed, 7 Mar 2018 23:09:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B86681DE6; Wed, 7 Mar 2018 23:09:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0A025D753; Wed, 7 Mar 2018 23:09:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B20F34CA9A; Wed, 7 Mar 2018 23:09:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w27N9fTc003365 for ; Wed, 7 Mar 2018 18:09:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1C9285D753; Wed, 7 Mar 2018 23:09:41 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 158805D6A8 for ; Wed, 7 Mar 2018 23:09:39 +0000 (UTC) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9DCCF4E4EE for ; Wed, 7 Mar 2018 23:09:37 +0000 (UTC) Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Thu, 08 Mar 2018 00:09:36 +0100 Received: from apollon.suse.de.de (nwb-a10-snat.microfocus.com [10.120.13.201]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Wed, 07 Mar 2018 23:09:11 +0000 From: Martin Wilck To: Christophe Varoqui Date: Thu, 8 Mar 2018 00:08:59 +0100 Message-Id: <20180307230859.14926-5-mwilck@suse.com> In-Reply-To: <20180307230859.14926-1-mwilck@suse.com> References: <20180307230859.14926-1-mwilck@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Mar 2018 23:09:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Mar 2018 23:09:38 +0000 (UTC) for IP:'195.135.221.5' DOMAIN:'smtp.nue.novell.com' HELO:'smtp.nue.novell.com' FROM:'mwilck@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 195.135.221.5 smtp.nue.novell.com 195.135.221.5 smtp.nue.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 07 Mar 2018 23:09:43 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP By default, "make" removes intermediate files from implicit rules if they are the only dependency. Prevent that by using .SECONDARY. Otherwise some files will be re-built upon second invocation of "make". Fixes: e39283ebd79b "multipath-tools: add dependency tracking to Makefiles" Reported-by: Xose Vazquez Perez Signed-off-by: Martin Wilck --- Makefile.inc | 1 + libmultipath/checkers/Makefile | 2 ++ libmultipath/foreign/Makefile | 2 ++ libmultipath/prioritizers/Makefile | 2 ++ tests/Makefile | 5 ++--- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index a5b9d4e3fa74..5d6123ded51a 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -127,4 +127,5 @@ check_file = $(shell \ ) %.o: %.c + @echo building $@ because of $? $(CC) $(CFLAGS) -c -o $@ $< diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile index 9559038a770d..87c15bd777c3 100644 --- a/libmultipath/checkers/Makefile +++ b/libmultipath/checkers/Makefile @@ -40,6 +40,8 @@ clean: dep_clean $(RM) core *.a *.o *.gz *.so OBJS := $(LIBS:libcheck%.so=%.o) libsg.o directio.o +.SECONDARY: $(OBJS) + include $(wildcard $(OBJS:.o=.d)) dep_clean: diff --git a/libmultipath/foreign/Makefile b/libmultipath/foreign/Makefile index dfba11e86d76..fe98ddf7e4e9 100644 --- a/libmultipath/foreign/Makefile +++ b/libmultipath/foreign/Makefile @@ -24,6 +24,8 @@ clean: dep_clean $(RM) core *.a *.o *.gz *.so OBJS := $(LIBS:libforeign-%.so=%.o) +.SECONDARY: $(OBJS) + include $(wildcard $(OBJS:.o=.d)) dep_clean: diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile index b3cc944c810d..ab7bc07572ec 100644 --- a/libmultipath/prioritizers/Makefile +++ b/libmultipath/prioritizers/Makefile @@ -42,6 +42,8 @@ clean: dep_clean $(RM) core *.a *.o *.gz *.so OBJS = $(LIBS:libprio%.so=%.o) alua_rtpg.o +.SECONDARY: $(OBJS) + include $(wildcard $(OBJS:.o=.d)) dep_clean: diff --git a/tests/Makefile b/tests/Makefile index f6b55836a434..7ae6b9012b5a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -21,10 +21,9 @@ clean: dep_clean rm -f $(TESTS:%=%-test) $(TESTS:%=%.out) $(TESTS:%=%.o) OBJS = $(TESTS:%=%.o) +.SECONDARY: $(OBJS) + include $(wildcard $(OBJS:.o=.d)) - - - dep_clean: $(RM) $(OBJS:.o=.d)