ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: "ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>
Cc: Michal Marek <mmarek@suse.cz>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: [Ksummit-discuss] [TECH TOPIC] tools/Makefile: Fix Many Many problems and inconsistencies
Date: Mon, 1 Aug 2016 20:46:05 -0700	[thread overview]
Message-ID: <0e76826b-6552-e880-42fc-17be0c5bf3fe@infradead.org> (raw)

and subdir Makefiles.

Examples:

Use/honor O=outputdir consistently instead of building in <kerneltree>/tools.
(check/compare kernel commit bf35182ffcd00d8b36d56210ffdac110e5624d7d)

Honor MAKEFLAGS (well, they aren't even passed to tools/Makefile AFAICT.
from an execution log:
make LDFLAGS= MAKEFLAGS="" O=/local/lnx/kernel/lnx-47/TOOLS subdir=tools -C ../tools/ all

Use make's "findstring" correctly (see patch below)

There are lots of other problems unless I have just had too much too drink tonight,
so here's the TECH TOPIC:

In a 1.5 hour code crunch session, get a bunch of interested people together to fix
a lot of problems quickly.  Then I will be a guinea pig tester.  :)


Self-nomination: /me.
Others interested:
Arnaldo (acme); Michal Marek.


Thanks.
---

From: Randy Dunlap <rdunlap@infradead.org>

Use GCC make's "findstring findthis,instring" correctly;
i.e., reverse its arguments in tools/scripts/Makefiles.include.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 tools/scripts/Makefile.include |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This never worked, right?  because of the argument ordering
and because MAKEFLAGS=""!

--- lnx-47.orig/tools/scripts/Makefile.include
+++ lnx-47/tools/scripts/Makefile.include
@@ -40,7 +40,7 @@ EXTRA_WARNINGS += -Wundef
 EXTRA_WARNINGS += -Wwrite-strings
 EXTRA_WARNINGS += -Wformat
 
-ifneq ($(findstring $(MAKEFLAGS), w),w)
+ifneq ($(findstring w,$(MAKEFLAGS)),w)
 PRINT_DIR = --no-print-directory
 else
 NO_SUBDIR = :
@@ -58,7 +58,7 @@ descend = \
 QUIET_SUBDIR0  = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir
 QUIET_SUBDIR1  =
 
-ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifneq ($(findstring s,$(MAKEFLAGS)),s)
   ifneq ($(V),1)
 	QUIET_CC       = @echo '  CC       '$@;
 	QUIET_CC_FPIC  = @echo '  CC FPIC  '$@;

             reply	other threads:[~2016-08-02  4:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02  3:46 Randy Dunlap [this message]
2016-08-02  4:53 ` Wangnan (F)
2016-08-03 19:00   ` Arnaldo Carvalho de Melo
2016-08-02  5:02 ` Josh Triplett
2016-08-02  7:31   ` Arnd Bergmann
2016-08-02  8:27     ` Josh Triplett
2016-08-02  8:41   ` Alexandre Belloni
2016-08-02  8:43     ` Josh Triplett
2016-09-04 21:15 ` Ben Hutchings
2016-09-06 14:57   ` Arnaldo Carvalho de Melo
2016-09-08  3:25     ` Bamvor Zhang Jian

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=0e76826b-6552-e880-42fc-17be0c5bf3fe@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=arjan@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=mingo@kernel.org \
    --cc=mmarek@suse.cz \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox