diff mbox series

scripts: fix deprecated always and hostprogs-y

Message ID 20200505115420.18765-1-anders.roxell@linaro.org (mailing list archive)
State New, archived
Headers show
Series scripts: fix deprecated always and hostprogs-y | expand

Commit Message

Anders Roxell May 5, 2020, 11:54 a.m. UTC
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")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 samples/watch_queue/Makefile | 4 ++--
 scripts/Makefile.build       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Masahiro Yamada May 6, 2020, 6:36 p.m. UTC | #1
On Tue, May 5, 2020 at 8:54 PM Anders Roxell <anders.roxell@linaro.org> wrote:
>
> 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")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>


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.


> ---
>  samples/watch_queue/Makefile | 4 ++--
>  scripts/Makefile.build       | 1 -
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/samples/watch_queue/Makefile b/samples/watch_queue/Makefile
> index eec00dd0a8df..8511fb6c53d2 100644
> --- a/samples/watch_queue/Makefile
> +++ b/samples/watch_queue/Makefile
> @@ -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
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 3665b1a0bc8e..abdba70f33a1 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -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
Anders Roxell May 11, 2020, 1:18 p.m. UTC | #2
On Wed, 6 May 2020 at 20:36, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Tue, May 5, 2020 at 8:54 PM Anders Roxell <anders.roxell@linaro.org> wrote:
> >
> > 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")
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
>
> As Stephen Rothwell reported
> (https://lkml.org/lkml/2020/5/3/392),
> this warning appears by merging the
> two different trees.

Right, I see.

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

oops, I'm sorry.

>
>
> Also, please drop the fixes tag.

I will.

> The commit hash might change.
>
>
> > ---
> >  samples/watch_queue/Makefile | 4 ++--
> >  scripts/Makefile.build       | 1 -
> >  2 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/samples/watch_queue/Makefile b/samples/watch_queue/Makefile
> > index eec00dd0a8df..8511fb6c53d2 100644
> > --- a/samples/watch_queue/Makefile
> > +++ b/samples/watch_queue/Makefile
> > @@ -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
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 3665b1a0bc8e..abdba70f33a1 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -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.

Thank you, you are correct.

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

Cheers,
Anders
diff mbox series

Patch

diff --git a/samples/watch_queue/Makefile b/samples/watch_queue/Makefile
index eec00dd0a8df..8511fb6c53d2 100644
--- a/samples/watch_queue/Makefile
+++ b/samples/watch_queue/Makefile
@@ -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
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 3665b1a0bc8e..abdba70f33a1 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -15,7 +15,6 @@  obj-y :=
 obj-m :=
 lib-y :=
 lib-m :=
-always :=
 always-y :=
 always-m :=
 targets :=