Skip to contentSkip to conversation

scripts: fix deprecated always and hostprogs-y

PATCH Superseded Anders Roxell 2 participants 3 messages May 5, 2020 – May 11, 2020 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: fix deprecated always and hostprogs-y

When I did an allmodconfig build the following warning showed up:

scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead scripts/Makefile.lib:12: 'hostprogs-y' and 'hostprogs-m' are deprecated. Please use 'hostprogs' instead

Rework to use the new 'always-y' and 'hostprogs'.

Fixes ee066c3ddf7b ("kbuild: warn if always, hostprogs-y, or hostprogs-m is used")
---
 samples/watch_queue/Makefile | 4 ++--
 scripts/Makefile.build       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
samples/watch_queue/Makefile +2 -2
index eec00dd0a8df..8511fb6c53d2 100644
@@ -1,7 +1,7 @@
 # List of programs to build
-hostprogs-y := watch_test
+hostprogs := watch_test
 
 # Tell kbuild to always build the programs
-always := $(hostprogs-y)
+always-y := $(hostprogs)
 
 HOSTCFLAGS_watch_test.o += -I$(objtree)/usr/include
scripts/Makefile.build +0 -1
index 3665b1a0bc8e..abdba70f33a1 100644
@@ -15,7 +15,6 @@ obj-y :=
 obj-m :=
 lib-y :=
 lib-m :=
-always :=
 always-y :=
 always-m :=
 targets :=
Signature · 1 line
2.20.1
#1 lore raw
Quoted 10 lines · Anders Roxell

When I did an allmodconfig build the following warning showed up:

scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead scripts/Makefile.lib:12: 'hostprogs-y' and 'hostprogs-m' are deprecated. Please use 'hostprogs' instead

Rework to use the new 'always-y' and 'hostprogs'.

Fixes ee066c3ddf7b ("kbuild: warn if always, hostprogs-y, or hostprogs-m is used")

As Stephen Rothwell reported
(https://lkml.org/lkml/2020/5/3/392),
this warning appears by merging the
two different trees.

You sent this patch to the kbuild maintainers,
but samples/watch_queue/Makefile does not exist
in the kbuild tree.

Also, please drop the fixes tag.
The commit hash might change.

Quoted 24 lines
---
 samples/watch_queue/Makefile | 4 ++--
 scripts/Makefile.build       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
samples/watch_queue/Makefile +2 -2
index eec00dd0a8df..8511fb6c53d2 100644
@@ -1,7 +1,7 @@
 # List of programs to build
-hostprogs-y := watch_test
+hostprogs := watch_test
 
 # Tell kbuild to always build the programs
-always := $(hostprogs-y)
+always-y := $(hostprogs)
 
 HOSTCFLAGS_watch_test.o += -I$(objtree)/usr/include
scripts/Makefile.build +0 -0
index 3665b1a0bc8e..abdba70f33a1 100644

scripts/Makefile.build obj-y := · line 20

Quoted 7 lines
scripts/Makefile.build +0 -1
@@ -15,7 +15,6 @@ obj-y :=
 obj-m :=
 lib-y :=
 lib-m :=
-always :=
 always-y :=
 always-m :=
 targets :=

Why are you deleting 'always'?
It would immediately break
the downstream Makefiles immediately.

--
Best Regards
Masahiro Yamada

#2 lore raw
Quoted 10 lines · Masahiro Yamada
Quoted 8 lines · Anders Roxell

When I did an allmodconfig build the following warning showed up:

scripts/Makefile.lib:8: 'always' is deprecated. Please use 'always-y' instead scripts/Makefile.lib:12: 'hostprogs-y' and 'hostprogs-m' are deprecated. Please use 'hostprogs' instead

Rework to use the new 'always-y' and 'hostprogs'.

Quoted 8 lines
Quoted 2 lines
Fixes ee066c3ddf7b ("kbuild: warn if always, hostprogs-y, or hostprogs-m is used")

As Stephen Rothwell reported
(https://lkml.org/lkml/2020/5/3/392),
this warning appears by merging the
two different trees.

Right, I see.

Quoted 5 lines

You sent this patch to the kbuild maintainers,
but samples/watch_queue/Makefile does not exist
in the kbuild tree.

oops, I'm sorry.

Quoted 3 lines

Also, please drop the fixes tag.

I will.

Quoted 31 lines

The commit hash might change.

Quoted 28 lines
---
 samples/watch_queue/Makefile | 4 ++--
 scripts/Makefile.build       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
samples/watch_queue/Makefile +2 -2
index eec00dd0a8df..8511fb6c53d2 100644
@@ -1,7 +1,7 @@
 # List of programs to build
-hostprogs-y := watch_test
+hostprogs := watch_test
 
 # Tell kbuild to always build the programs
-always := $(hostprogs-y)
+always-y := $(hostprogs)
 
 HOSTCFLAGS_watch_test.o += -I$(objtree)/usr/include
scripts/Makefile.build +0 -1
index 3665b1a0bc8e..abdba70f33a1 100644
@@ -15,7 +15,6 @@ obj-y :=
 obj-m :=
 lib-y :=
 lib-m :=
-always :=
Quoted 8 lines

scripts/Makefile.build obj-y := · line 20

Quoted 3 lines
scripts/Makefile.build +0 -0
 always-y :=
 always-m :=
 targets :=

Why are you deleting 'always'?
It would immediately break
the downstream Makefiles immediately.

Thank you, you are correct.

I will send out a new patch shortly to the correct list.

Cheers,
Anders