* [Kbuild] How to clean a particular directory ?
@ 2008-01-31 8:38 Francis Moreau
2008-01-31 8:48 ` Paul Mundt
0 siblings, 1 reply; 5+ messages in thread
From: Francis Moreau @ 2008-01-31 8:38 UTC (permalink / raw)
To: linux-kernel
Hello,
I'd like to clean a particular directory in the kernel tree.
I tried several things such as:
$ make drivers/char clean
$ make -f scripts/Makefile.clean obj=drivers/char
But it doesn't work.
Could anybody give me a hint ?
Thanks
--
Francis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Kbuild] How to clean a particular directory ?
2008-01-31 8:38 [Kbuild] How to clean a particular directory ? Francis Moreau
@ 2008-01-31 8:48 ` Paul Mundt
2008-01-31 8:54 ` Paul Mundt
2008-01-31 8:56 ` Francis Moreau
0 siblings, 2 replies; 5+ messages in thread
From: Paul Mundt @ 2008-01-31 8:48 UTC (permalink / raw)
To: Francis Moreau; +Cc: linux-kernel
On Thu, Jan 31, 2008 at 09:38:10AM +0100, Francis Moreau wrote:
> I'd like to clean a particular directory in the kernel tree.
>
> I tried several things such as:
>
> $ make drivers/char clean
> $ make -f scripts/Makefile.clean obj=drivers/char
>
> But it doesn't work.
>
> Could anybody give me a hint ?
make SUBDIRS=drivers/char clean
should do the trick. Kbuild might have a magic incantation for it these
days, but that's the way it used to work, and still seems to.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Kbuild] How to clean a particular directory ?
2008-01-31 8:48 ` Paul Mundt
@ 2008-01-31 8:54 ` Paul Mundt
2008-01-31 8:57 ` Francis Moreau
2008-01-31 8:56 ` Francis Moreau
1 sibling, 1 reply; 5+ messages in thread
From: Paul Mundt @ 2008-01-31 8:54 UTC (permalink / raw)
To: Francis Moreau, linux-kernel
On Thu, Jan 31, 2008 at 05:48:51PM +0900, Paul Mundt wrote:
> On Thu, Jan 31, 2008 at 09:38:10AM +0100, Francis Moreau wrote:
> > I'd like to clean a particular directory in the kernel tree.
> >
> > I tried several things such as:
> >
> > $ make drivers/char clean
> > $ make -f scripts/Makefile.clean obj=drivers/char
> >
> > But it doesn't work.
> >
> > Could anybody give me a hint ?
>
> make SUBDIRS=drivers/char clean
>
> should do the trick. Kbuild might have a magic incantation for it these
> days, but that's the way it used to work, and still seems to.
Makefile says:
# Use make M=dir to specify directory of external module to build
# Old syntax make ... SUBDIRS=$PWD is still supported
# Setting the environment variable KBUILD_EXTMOD take precedence
ifdef SUBDIRS
KBUILD_EXTMOD ?= $(SUBDIRS)
endif
ifdef M
ifeq ("$(origin M)", "command line")
KBUILD_EXTMOD := $(M)
endif
endif
so M= is apparently the newfangled (and undocumented) way of doing this.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Kbuild] How to clean a particular directory ?
2008-01-31 8:54 ` Paul Mundt
@ 2008-01-31 8:57 ` Francis Moreau
0 siblings, 0 replies; 5+ messages in thread
From: Francis Moreau @ 2008-01-31 8:57 UTC (permalink / raw)
To: Paul Mundt, Francis Moreau, linux-kernel
On Jan 31, 2008 9:54 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> Makefile says:
>
> # Use make M=dir to specify directory of external module to build
> # Old syntax make ... SUBDIRS=$PWD is still supported
> # Setting the environment variable KBUILD_EXTMOD take precedence
> ifdef SUBDIRS
> KBUILD_EXTMOD ?= $(SUBDIRS)
> endif
> ifdef M
> ifeq ("$(origin M)", "command line")
> KBUILD_EXTMOD := $(M)
> endif
> endif
>
> so M= is apparently the newfangled (and undocumented) way of doing this.
>
Good catch.
I tried "make help" to search for revelant info but didn't find anything useful.
Thanks
--
Francis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Kbuild] How to clean a particular directory ?
2008-01-31 8:48 ` Paul Mundt
2008-01-31 8:54 ` Paul Mundt
@ 2008-01-31 8:56 ` Francis Moreau
1 sibling, 0 replies; 5+ messages in thread
From: Francis Moreau @ 2008-01-31 8:56 UTC (permalink / raw)
To: Paul Mundt, Francis Moreau, linux-kernel
On Jan 31, 2008 9:48 AM, Paul Mundt <lethal@linux-sh.org> wrote:
>
> On Thu, Jan 31, 2008 at 09:38:10AM +0100, Francis Moreau wrote:
> > I'd like to clean a particular directory in the kernel tree.
> >
> > I tried several things such as:
> >
> > $ make drivers/char clean
> > $ make -f scripts/Makefile.clean obj=drivers/char
> >
> > But it doesn't work.
> >
> > Could anybody give me a hint ?
>
> make SUBDIRS=drivers/char clean
>
> should do the trick. Kbuild might have a magic incantation for it these
> days, but that's the way it used to work, and still seems to.
>
Thanks Paul, it works fine.
--
Francis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-31 8:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 8:38 [Kbuild] How to clean a particular directory ? Francis Moreau
2008-01-31 8:48 ` Paul Mundt
2008-01-31 8:54 ` Paul Mundt
2008-01-31 8:57 ` Francis Moreau
2008-01-31 8:56 ` Francis Moreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox