All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wangnan (F)" <wangnan0@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 1/2] tools build: Introduce features dump include makefile
Date: Mon, 7 Dec 2015 18:32:10 +0800	[thread overview]
Message-ID: <5665602A.7020600@huawei.com> (raw)
In-Reply-To: <20151207102949.GD21484@krava.brq.redhat.com>



On 2015/12/7 18:29, Jiri Olsa wrote:
> On Mon, Dec 07, 2015 at 05:22:41PM +0800, Wangnan (F) wrote:
>> Sorry for the late response...
>>
>> Tested-by: Wang Nan <wangnan0@huawei.com>
>>
>> But I'm thinking whether we can remove FEATURE-DUMP and rely on
>> FEATURE-INCLUDE only, since they contain same information...
> had the same thought, but the issue I hit is that I couldn't
> find a way to create *multiline* contents for FEATURE-INCLUDE
> variable in make
>
> maybe we could use internally signle line contents and
> convert multiline contents of FEATURE-INCLUDE into singleline
> variable for checking against live info

What about this? The drawback is it heavily rely on shell commands...

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 51f8d59..514c4e6 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -123,9 +123,8 @@ define feature_print_text_code
      MSG = $(shell printf '...%30s: %s' $(1) $(2))
  endef

-FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER)
-FEATURE_DUMP := $(foreach 
feat,$(FEATURE_DISPLAY),feature-$(feat)($(feature-$(feat))))
-FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat 
$(FEATURE_DUMP_FILENAME))
+#FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER)
+#FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat 
$(FEATURE_DUMP_FILENAME))

  ifeq ($(dwarf-post-unwind),1)
    FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text))
@@ -141,6 +140,9 @@ endif
  # features detection state.
  FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-INCLUDE$(FEATURE_USER)

+FEATURE_DUMP := $(foreach 
feat,$(FEATURE_DISPLAY),feature-$(feat)($(feature-$(feat))))
+FEATURE_DUMP_FILE := $(foreach feat,$(FEATURE_DISPLAY),$(shell touch 
$(FEATURE_INCLUDE_FILENAME); cat $(FEATURE_INCLUDE_FILENAME) | grep 
'feature-$(feat)=' | sed 's/=\(.\)/(\1)/g'))
+
  # The $(feature_display) controls the default detection message
  # output. It's set if:
  # - detected features differes from stored features from

> jirka



  reply	other threads:[~2015-12-07 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  9:06 [PATCH 1/2] tools build: Introduce features dump include makefile Jiri Olsa
2015-11-27  9:06 ` [PATCH 2/2] perf build: Use FEATURE-INCLUDE in bpf subproject Jiri Olsa
2015-12-07  8:56 ` [PATCH 1/2] tools build: Introduce features dump include makefile Jiri Olsa
2015-12-07  9:22   ` Wangnan (F)
2015-12-07 10:29     ` Jiri Olsa
2015-12-07 10:32       ` Wangnan (F) [this message]
2015-12-07 10:38         ` Wangnan (F)
2015-12-07 10:48           ` [PATCH] tools build: Remove FEATURE-DUMP Wang Nan
2015-12-07 13:52             ` Jiri Olsa
2015-12-18  8:41               ` Wangnan (F)
2015-12-18 10:13                 ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5665602A.7020600@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.