* building individual files in subdirectories
@ 2019-05-28 12:11 Christoph Hellwig
2019-05-29 1:12 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-05-28 12:11 UTC (permalink / raw)
To: linux-kbuild
A few kernel modules have source files in multiple subdirectories.
Trying to build just a single object of a source file in such a
subdirectory currently doesn't work.
For example:
hch@brick:~/work/xfs$ make fs/xfs/libxfs/xfs_alloc.o
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
scripts/Makefile.build:42: fs/xfs/libxfs/Makefile: No such file or directory
make[1]: *** No rule to make target 'fs/xfs/libxfs/Makefile'. Stop.
make: *** [Makefile:1747: fs/xfs/libxfs/xfs_alloc.o] Error 2
Is there any reasonably easy way to get this to work?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building individual files in subdirectories
2019-05-28 12:11 building individual files in subdirectories Christoph Hellwig
@ 2019-05-29 1:12 ` Masahiro Yamada
2019-11-18 0:15 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-05-29 1:12 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Linux Kbuild mailing list
On Tue, May 28, 2019 at 9:12 PM Christoph Hellwig <hch@lst.de> wrote:
>
> A few kernel modules have source files in multiple subdirectories.
> Trying to build just a single object of a source file in such a
> subdirectory currently doesn't work.
>
> For example:
>
> hch@brick:~/work/xfs$ make fs/xfs/libxfs/xfs_alloc.o
> CALL scripts/checksyscalls.sh
> CALL scripts/atomic/check-atomics.sh
> DESCEND objtool
> scripts/Makefile.build:42: fs/xfs/libxfs/Makefile: No such file or directory
> make[1]: *** No rule to make target 'fs/xfs/libxfs/Makefile'. Stop.
> make: *** [Makefile:1747: fs/xfs/libxfs/xfs_alloc.o] Error 2
>
> Is there any reasonably easy way to get this to work?
While single targets are useful,
they never work correctly.
subdir-ccflags-y from upper Makefiles
are not inherited.
I want to implement single targets correctly, but
I have never got around to it.
"make fs/xfs/" is an alternative solution
although it will compile much more than you want.
Another solution is to put a dummy
fs/xfs/libxfs/Makefile
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building individual files in subdirectories
2019-05-29 1:12 ` Masahiro Yamada
@ 2019-11-18 0:15 ` Masahiro Yamada
2019-11-18 2:30 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-11-18 0:15 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Linux Kbuild mailing list, Linux Kernel Mailing List
Hi Jens,
(related to https://lkml.org/lkml/2019/11/15/1152)
I received questions about single builds not working properly
some times in the past.
For example, the following is a post from Christoph to kbuild ML,
and my reply to it.
On Wed, May 29, 2019 at 10:12 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Tue, May 28, 2019 at 9:12 PM Christoph Hellwig <hch@lst.de> wrote:
> >
> > A few kernel modules have source files in multiple subdirectories.
> > Trying to build just a single object of a source file in such a
> > subdirectory currently doesn't work.
> >
> > For example:
> >
> > hch@brick:~/work/xfs$ make fs/xfs/libxfs/xfs_alloc.o
> > CALL scripts/checksyscalls.sh
> > CALL scripts/atomic/check-atomics.sh
> > DESCEND objtool
> > scripts/Makefile.build:42: fs/xfs/libxfs/Makefile: No such file or directory
> > make[1]: *** No rule to make target 'fs/xfs/libxfs/Makefile'. Stop.
> > make: *** [Makefile:1747: fs/xfs/libxfs/xfs_alloc.o] Error 2
> >
> > Is there any reasonably easy way to get this to work?
>
>
> While single targets are useful,
> they never work correctly.
> subdir-ccflags-y from upper Makefiles
> are not inherited.
>
> I want to implement single targets correctly, but
> I have never got around to it.
>
> "make fs/xfs/" is an alternative solution
> although it will compile much more than you want.
>
> Another solution is to put a dummy
> fs/xfs/libxfs/Makefile
>
> --
> Best Regards
> Masahiro Yamada
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building individual files in subdirectories
2019-11-18 0:15 ` Masahiro Yamada
@ 2019-11-18 2:30 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-11-18 2:30 UTC (permalink / raw)
To: Masahiro Yamada, Christoph Hellwig
Cc: Linux Kbuild mailing list, Linux Kernel Mailing List
On 11/17/19 5:15 PM, Masahiro Yamada wrote:
> Hi Jens,
>
>
> (related to https://lkml.org/lkml/2019/11/15/1152)
>
>
> I received questions about single builds not working properly
> some times in the past.
>
> For example, the following is a post from Christoph to kbuild ML,
> and my reply to it.
I'm not saying it isn't useful, what I'm saying is that slowing
things down by almost 100% seems excessive!
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-18 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 12:11 building individual files in subdirectories Christoph Hellwig
2019-05-29 1:12 ` Masahiro Yamada
2019-11-18 0:15 ` Masahiro Yamada
2019-11-18 2:30 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.