From: Michal Marek <mmarek@suse.cz>
To: 张忠山 <zzs0213@gmail.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] let kbuild mkdir for dir/file.o
Date: Wed, 03 Jul 2013 22:49:54 +0200 [thread overview]
Message-ID: <51D48E72.5010403@suse.cz> (raw)
In-Reply-To: <1372583368-32618-1-git-send-email-zzs0213@gmail.com>
Dne 30.6.2013 11:09, 张忠山 napsal(a):
> When add a obj with dir to obj-y, like this
>
> obj-y += dir/file.o
>
> The $(obj)/dir not created, this patch fix this.
>
> When try to add a file(which in a subdir) to my board's obj-y, the build
> progress crashed.
>
> For example, I use at91rm9200ek board, and in kernel dir run:
>
> mkdir objtree
> make O=objtree at91rm9200_defconfig
> mkdir arch/arm/mach-at91/dir
> touch arch/arm/mach-at91/dir/file.c
>
> and edit arch/arm/mach-at91/dir/file.c to add some code.
> then edit arch/arm/mach-at91/Makefile, change the following line:
>
> obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o
>
> to:
>
> obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o
>
> Now build it:
>
> make O=objtree
>
> Then the error appears:
> ...
> CC arch/arm/mach-at91/board-rm9200dk.o
> CC arch/arm/mach-at91/board-rm9200ek.o
> CC arch/arm/mach-at91/dir/file.o
> linux-2.6/arch/arm/mach-at91/dir/file.c:5:
> fatal error: opening dependency file
> arch/arm/mach-at91/dir/.file.o.d: No such file or directory
>
> Check the objtree:
> LANG=en ls objtree/arch/arm/mach-at91/dir
> ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory
>
> It's apparently that the target dir not created for file.o
>
> Check kbuild source code. It seems that kbuild create dirs for that in
> $(obj-dirs). But if the dir need not to create a built-in.o, It should
> never in $(obj-dirs).
>
> So I make this patch to make sure It in $(obj-dirs)
>
> this bug caused by commit
> f5fb976520a53f45f8bbf2e851f16b3b5558d485
> ---
You forgot to sign off this patch, can I add
Signed-off-by: 张忠山 <zzs0213@gmail.com>
like you did in the previous versions? Otherwise, the patch looks OK.
Michal
next prev parent reply other threads:[~2013-07-03 20:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 8:45 [PATCH] let kbuild mkdir for dir/file.o 张忠山
2013-06-04 8:45 ` 张忠山
2013-06-28 22:44 ` Michal Marek
2013-06-30 8:01 ` 张忠山
2013-06-30 8:01 ` 张忠山
2013-06-30 9:02 ` 张忠山
2013-06-30 9:09 ` 张忠山
2013-06-30 9:09 ` 张忠山
2013-07-03 20:49 ` Michal Marek [this message]
2013-07-04 1:35 ` 张忠山
2013-06-14 5:39 ` zzs
2013-06-23 21:59 ` Michal Marek
[not found] <1369807633-4364-1-git-send-email-zzs0213@gmail.com>
2013-05-30 1:59 ` 张忠山
2013-05-30 18:59 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2013-05-29 6:10 张忠山
2013-05-28 10:14 zzs0213
2013-05-29 3:42 ` zzs
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=51D48E72.5010403@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zzs0213@gmail.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 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.