Skip to contentSkip to conversation

Subdirectory output dependencies

DISCUSSION H. Peter Anvin 1 participant 2 messages May 14, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

What is the proper way to indicate to Kbuild that something in the current directory depends on something built in a subdirectory?

Specifically, something like:

obj-y += foo/
obj-y += bar.o

... where bar.o depends on a header file generated inside the foo directory?

-hpa

#1 lore raw
Quoted 10 lines · H. Peter Anvin

What is the proper way to indicate to Kbuild that something in the current directory depends on something built in a subdirectory?

Specifically, something like:

obj-y += foo/
obj-y += bar.o

... where bar.o depends on a header file generated inside the foo directory?

Note: in the real-life example there is a lot of bar.o's:

https://git.kernel.org/cgit/libs/klibc/klibc.git/tree/usr/klibc/Kbuild

-hpa