Thread (2 messages) 2 messages, 2 authors, 2011-10-01

What's the meaning of SUBDIRS ?

From: Philipp Ittershagen <hidden>
Date: 2011-10-01 10:44:40

make needs to enter the linux source tree in order to read the
top-level Makefile from that directory.

SUBDIRS is a variable used by the kernel top-level Makefile to know
which directory it should build external modules after performing some
initial checks to ensure proper compilation.


Greetings,

Philipp

On Sat, Oct 1, 2011 at 11:53 AM, Parmenides [off-list ref] wrote:
Hi,

? ?When making a kernel module outside the kernel source tree, I can
use this command to make my kernel module:

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?make -C /usr/src/linux
SUBDIRS=$PWD modules

According to man, the -C option will chanage the current working
directory to the top level directory of kernel source tree.
Furthermore, the SUBDIRS varialbe contains the path of current working
directory where my module is living. So, why does 'make' need to enter
/usr/src/linux first? And, What's the role of 'SUBDIRS'? Thanks.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help