All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geoff Levand <geoff@infradead.org>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org, Marc Zyngier <marc.zyngier@arm.com>,
	kvmarm@lists.cs.columbia.edu
Subject: kbuild not creating output dirs
Date: Wed, 03 Apr 2013 16:28:08 -0700	[thread overview]
Message-ID: <1365031688.24496.19.camel@smoke> (raw)

Hi Michal,

I was building Marc's kvm development kernel outside of the
sources (make O=), and I got the following build error:

  arch/arm64/kvm/../../../arch/arm/kvm/mmio.c: fatal error: opening dependency file arch/arm64/kvm/../../../arch/arm/kvm/.mmio.o.d: No such file or directory

The cause was that kbuild did not create the output directory
arch/arm64/kvm/../../../arch/arm/kvm, and so gcc failed.

Here is what was in his makefile:

  obj-$(CONFIG_KVM_ARM_HOST) += $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)

I changed this to build a composite and kbuild then created
the output directories:

  obj-$(CONFIG_KVM_ARM_HOST) += kvm.o
  kvm-$(CONFIG_KVM_ARM_HOST) += $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)

I guess kbuild used some other rules and saw the dependency on
the output directory.

So, my questions are:

Is it expected that the original rule should fail?
Is my fix the correct way?
Can I use some other way to get those output directories created?

Just FYI, the original source is here:

  https://git.kernel.org/cgit/linux/kernel/git/maz/arm-platforms.git/tree/arch/arm64/kvm/Makefile?h=kvm-arm64/kvm-for-next

Thanks for your help.

-Geoff




             reply	other threads:[~2013-04-03 23:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 23:28 Geoff Levand [this message]
2013-04-03 23:34 ` kbuild not creating output dirs Christoffer Dall
2013-04-04 11:05   ` Marc Zyngier

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=1365031688.24496.19.camel@smoke \
    --to=geoff@infradead.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mmarek@suse.cz \
    /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 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.