linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Michal Marek <mmarek@suse.com>, linux-kbuild@vger.kernel.org
Subject: Behaviour of kernel makefiles when entering a subdir using a config symbol = m
Date: Wed, 9 Dec 2015 20:25:08 +0200	[thread overview]
Message-ID: <56687204.4080404@ti.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

Hi,

I wonder if this is as designed, or a bug:

I have a makefile which has

obj-$(CONFIG_FOO) += foo/

In the foo directory, I have a makefile which has

obj-$(CONFIG_FOO_BAR) += bar.o

The values of the variables are

CONFIG_FOO=m
CONFIG_FOO_BAR=y

When building the kernel with the above setup, I would expect make to
enter the foo/ directory, and build 'bar.o' into the kernel image.

And make does enter the directory, and does compile 'bar.o', but I think
'bar.o' doesn't end up anywhere. At least it's not compiled into the
kernel image.

If CONFIG_FOO=y, then 'bar.o' will be built in to the kernel image.

Am I doing something wrong here?

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2015-12-09 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 18:25 Tomi Valkeinen [this message]
2015-12-09 21:32 ` Behaviour of kernel makefiles when entering a subdir using a config symbol = m Sam Ravnborg
2015-12-10  7:44   ` Tomi Valkeinen
2015-12-10 20:46     ` Sam Ravnborg
2015-12-11  9:31       ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56687204.4080404@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).