From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757269Ab2HTQaV (ORCPT ); Mon, 20 Aug 2012 12:30:21 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56358 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754853Ab2HTQ0n (ORCPT ); Mon, 20 Aug 2012 12:26:43 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Ben Hutchings , Ingo Molnar , Paul Mackerras , Peter Zijlstra , Sedat Dilek , Arnaldo Carvalho de Melo Subject: [PATCH 22/24] perf tools: Fix include order for bison/flex-generated C files Date: Mon, 20 Aug 2012 13:26:23 -0300 Message-Id: <1345479985-18669-23-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.7.9.2.358.g22243 In-Reply-To: <1345479985-18669-1-git-send-email-acme@infradead.org> References: <1345479985-18669-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="UTF-8" X-SRS-Rewrite: SMTP reverse-path rewritten from by canuck.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Hutchings When we use a separate output directory, we add util/ to the include path for the generated C files. However, this is currently added to the end of the path, behind /usr/include/slang and /usr/include/gtk-2.0 if use of the respective libraries is enabled. Thus the '#include "../perf.h"' in util/parse-events.l can actually include /usr/include/perf.h if it exists. Move '-Iutil/' ahead of all the other preprocessor options. Reported-by: Sedat Dilek Signed-off-by: Ben Hutchings Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Sedat Dilek Link: http://lkml.kernel.org/r/1345420039.22400.80.camel@deadeye.wl.decadent.org.uk Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 90cfecf..77e7ae3 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -841,10 +841,10 @@ $(OUTPUT)perf.o perf.spec \ # over the general rule for .o $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $< + $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -w $< $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $< + $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w $< $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< -- 1.7.1