[Ksummit-discuss] [TECH TOPIC] tools/Makefile: Fix Many Many problems and inconsistencies
Randy Dunlap
rdunlap at infradead.org
Tue Aug 2 03:46:05 UTC 2016
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 at 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 at 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 '$@;
More information about the Ksummit-discuss
mailing list