Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: makefiles: obj vs. objtree
Date: Thu, 18 Feb 2010 10:54:36 +0100	[thread overview]
Message-ID: <4B7D0E5C.1070708@suse.cz> (raw)
In-Reply-To: <4B7CA583.5020002@xenotime.net>

On 18.2.2010 03:27, Randy Dunlap wrote:
> Can someone clarify the difference(s) in these variables, please?
> 
> Documentation/kbuild.txt says about objtree:
> 
> $(objtree) is the directory where output files are saved.
> The output directory is often set using "O=..." on the commandline.
> 
> 
> Documentation/makefiles.txt says about obj:
> 
>     $(obj)
> 	$(obj) is a relative path which points to the directory
> 	where the target is saved. Always use $(obj) when
> 	referring to generated files.
> 
> 
> These appear to be the same to me, but let me be more specific:

$(objtree) is the toplevel build directory (as the doc says the
directory you specify with O=).
$(obj) is the directory below $(objtree) where the targets of the
current Makefile are saved:

$ make O=/build/dir
$(objtree) == /build/dir
$(obj) == /build/dir/fs in fs/Makefile


> In some cases (or places), Documentation/DocBook/Makefile uses
> $(obj) and other cases/places, it uses $(objtree).
> Does it have these correct, or should some of them be fixed?

$(objtree)/Documentation/DocBook could be written as $(obj) in
Documentation/DocBook/Makefile.

hth,
Michal

  reply	other threads:[~2010-02-18  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18  2:27 makefiles: obj vs. objtree Randy Dunlap
2010-02-18  9:54 ` Michal Marek [this message]
2010-02-18 16:02   ` Randy Dunlap

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=4B7D0E5C.1070708@suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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