From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933634AbbFVMvl (ORCPT ); Mon, 22 Jun 2015 08:51:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47284 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933576AbbFVMv3 (ORCPT ); Mon, 22 Jun 2015 08:51:29 -0400 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Adrian Hunter , Andi Kleen , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Stephane Eranian , Lukas Wunner Subject: [PATCH 3/3] perf build: Fix single target build dependency check Date: Mon, 22 Jun 2015 14:50:52 +0200 Message-Id: <1434977452-32520-4-git-send-email-jolsa@kernel.org> In-Reply-To: <1434977452-32520-1-git-send-email-jolsa@kernel.org> References: <1434977452-32520-1-git-send-email-jolsa@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently if we build single target like: $ touch util/map.c && make util/map.o It will not rebuild util/map.o if it already exists and util/map.c is modified. The reason is that the top-level 'Makefile' processes util/map.o as an implicit rule and if util/map.o exists make considers the 'util/map.o' target as done and wouldn't nest into Makefile.perf. Adding FORCE for '%', because that's what we want to nest into Makefile.perf for any target. Adding Makefile into phony targets, because make tries to rebuilt it and it's also resolved as '%' target. Link: http://lkml.kernel.org/n/tip-yrix4k0nb2fgmtzvmvxr23ps@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d31a7bbd7cee..480546d5f13b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -83,8 +83,8 @@ build-test: # # All other targets get passed through: # -%: +%: FORCE $(print_msg) $(make) -.PHONY: tags TAGS +.PHONY: tags TAGS FORCE Makefile -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/