linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Sam Ravnborg <sam@ravnborg.org>, Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: Behaviour of kernel makefiles when entering a subdir using a config symbol = m
Date: Fri, 11 Dec 2015 10:31:48 +0100	[thread overview]
Message-ID: <566A9804.6060305@suse.com> (raw)
In-Reply-To: <20151210204638.GA32218@ravnborg.org>

Dne 10.12.2015 v 21:46 Sam Ravnborg napsal(a):
> On Thu, Dec 10, 2015 at 09:44:45AM +0200, Tomi Valkeinen wrote:
>> We have three drivers (one fbdev, two drm), each of which can be built
>> as a module. But each of them also may require small boot-time setup,
>> which needs to be built-in.
>>
>> I can get around the problem by entering the dir with obj-y, or by
>> creating a new extra config define which is y/n, and using that in the
>> makefile. The former makes make enter the dir even if the driver is not
>> enabled, and latter creates a config symbol only to solve this problem.
> The extra config symbol is the most elegant solution here IMO.
> Make sure to document that this config symbol enables the boot-time
> setup stuff.

Agreed. We could tech kbuild to look for built-in.o also in obj-m
subdirs, but I'm quite sure it would break a Makefile or two. We had
this case when adding support for modname-m recently, a couple of
Makefiles did not expect this and broke.

Michal


      reply	other threads:[~2015-12-11  9:31 UTC|newest]

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

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=566A9804.6060305@suse.com \
    --to=mmarek@suse.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tomi.valkeinen@ti.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).