2011-04-24 20:19:19

by Peter Foley

[permalink] [raw]
Subject: [PATCH] kbuild: allow headerdep to work in KBUILD_OUTPUT and add targets to PHONY

This patch fixes the headerdep target so it will work when make is executed from KBUILD_OUTPUT.
It also adds a few targets to PHONY so they are always executed.

Signed-off-by: Peter Foley <[email protected]>
---
Makefile | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index b967b96..093c9d2 100644
--- a/Makefile
+++ b/Makefile
@@ -991,7 +991,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE

PHONY += headerdep
headerdep:
- $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl
+ $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
+ $(srctree)/scripts/headerdep.pl -I$(srctree)/include

# ---------------------------------------------------------------------------

@@ -1392,6 +1393,8 @@ tags TAGS cscope gtags: FORCE
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------

+PHONY += includecheck versioncheck coccicheck namespacecheck export_report
+
includecheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
--
1.7.5.rc1


2011-04-26 06:52:56

by Arnaud Lacombe

[permalink] [raw]
Subject: Re: [PATCH] kbuild: allow headerdep to work in KBUILD_OUTPUT and add targets to PHONY

Hi,

On Sun, Apr 24, 2011 at 4:08 PM, Peter Foley <[email protected]> wrote:
> This patch fixes the headerdep target so it will work when make is executed from KBUILD_OUTPUT.
> It also adds a few targets to PHONY so they are always executed.
>
one change, one patch, please.

Why do you want that much consistency check to be always ran ?
Especially `coccicheck', which rely on a non-common program being
available.

Thanks,
- Arnaud

> Signed-off-by: Peter Foley <[email protected]>
> ---
> ?Makefile | ? ?5 ++++-
> ?1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b967b96..093c9d2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -991,7 +991,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE
>
> ?PHONY += headerdep
> ?headerdep:
> - ? ? ? $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl
> + ? ? ? $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
> + ? ? ? $(srctree)/scripts/headerdep.pl -I$(srctree)/include
>
> ?# ---------------------------------------------------------------------------
>
> @@ -1392,6 +1393,8 @@ tags TAGS cscope gtags: FORCE
> ?# Scripts to check various things for consistency
> ?# ---------------------------------------------------------------------------
>
> +PHONY += includecheck versioncheck coccicheck namespacecheck export_report
> +
> ?includecheck:
> ? ? ? ?find * $(RCS_FIND_IGNORE) \
> ? ? ? ? ? ? ? ?-name '*.[hcS]' -type f -print | sort \
> --
> 1.7.5.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

2011-04-26 20:16:19

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] kbuild: allow headerdep to work in KBUILD_OUTPUT and add targets to PHONY

On 26.4.2011 08:52, Arnaud Lacombe wrote:
> Hi,
>
> On Sun, Apr 24, 2011 at 4:08 PM, Peter Foley <[email protected]> wrote:
>> This patch fixes the headerdep target so it will work when make is executed from KBUILD_OUTPUT.
>> It also adds a few targets to PHONY so they are always executed.
>>
> one change, one patch, please.
>
> Why do you want that much consistency check to be always ran ?
> Especially `coccicheck', which rely on a non-common program being
> available.

The change is valid, but the changelog text is misleading. 'PHONY +=
foo' means that 'make foo' will always execute the commands for foo,
even if there is a file of the same name.

Michal

2011-04-26 20:28:25

by Arnaud Lacombe

[permalink] [raw]
Subject: Re: [PATCH] kbuild: allow headerdep to work in KBUILD_OUTPUT and add targets to PHONY

Hi,

On Tue, Apr 26, 2011 at 4:16 PM, Michal Marek <[email protected]> wrote:
> On 26.4.2011 08:52, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Sun, Apr 24, 2011 at 4:08 PM, Peter Foley <[email protected]> wrote:
>>> This patch fixes the headerdep target so it will work when make is executed from KBUILD_OUTPUT.
>>> It also adds a few targets to PHONY so they are always executed.
>>>
>> one change, one patch, please.
>>
>> Why do you want that much consistency check to be always ran ?
>> Especially `coccicheck', which rely on a non-common program being
>> available.
>
> The change is valid, but the changelog text is misleading. 'PHONY +=
> foo' means that 'make foo' will always execute the commands for foo,
> even if there is a file of the same name.
>
my bad, I just confirmed that purpose by checking make doc :)

- Arnaud

> Michal
>