[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150310160425.GA16042@redhat.com>
Date: Tue, 10 Mar 2015 13:04:26 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Jeremie Galarneau <jgalar@...icios.com>,
Namhyung Kim <namhyung@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <peterz@...radead.org>,
Tom Zanussi <tzanussi@...il.com>,
Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH] perf build: Fix libbabeltrace detection
Em Tue, Mar 10, 2015 at 03:11:11PM +0100, Jiri Olsa escreveu:
> On Tue, Mar 10, 2015 at 11:01:34AM -0300, Arnaldo Carvalho de Melo wrote:
> > Ah, I found the following patch useful in debugging this, if you're ok with it,
> > I'll put it in my tree with your Acked-by, ok?
> >
> > - Arnaldo
> >
> > [acme@zoo linux]$ git diff tools/perf/config/Makefile
> > diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> > index e2350ada6ccd..4992c39652e6 100644
> > --- a/tools/perf/config/Makefile
> > +++ b/tools/perf/config/Makefile
> > @@ -184,7 +184,7 @@ endif
> >
> > feature_check = $(eval $(feature_check_code))
> > define feature_check_code
> > - feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/dev/null 2>/dev/null && echo 1 ||
> > + feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin > $(OUTPUT_FEATURES)make-$(1) 2>&1
> > endef
>
> ack, that seem usefull.. I always redirected this to '>> /tmp/krava'
> never got enough will to make it nice and generic ;-)
Got stuck trying to get the 'clean' target done, argh, makefiles, trying
to use the OUTPUT_FEATURES to add a clean target on
tools/perf/config/Makefile, but then if I call it from the main
makefile... it will do feature detection again...
So I think I'll have to redefine it on the main Makefile to avoid having
to call tools/perf/config/Makefile again, right?
Anyway, after lunch I'll try again.
- Arnaldo
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index ec4c063ed9f3..8177a063ee0a 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -530,6 +530,7 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean config-clean
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
$(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
+ $(QUIET_SUBDIR0)config $(QUIET_SUBDIR1) clean
$(python-clean)
#
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index d44c64d64465..9a492b56984a 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -184,7 +184,7 @@ endif
feature_check = $(eval $(feature_check_code))
define feature_check_code
- feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
+ feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin > $(OUTPUT_FEATURES)make-$(1).feature-test.output 2>&1 && echo 1 || echo 0)
endef
feature_set = $(eval $(feature_set_code))
@@ -880,3 +880,9 @@ $(call detected_var,LIBDIR)
$(call detected_var,GTK_CFLAGS)
$(call detected_var,PERL_EMBED_CCOPTS)
$(call detected_var,PYTHON_EMBED_CCOPTS)
+
+CLEAN_FILES = $(OUTPUT_FEATURES)make-*.feature-test.output
+
+clean:
+ $(call QUIET_CLEAN, config) $(RM) $(CLEAN_FILES)
+
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists