* makefiles: obj vs. objtree
@ 2010-02-18 2:27 Randy Dunlap
2010-02-18 9:54 ` Michal Marek
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2010-02-18 2:27 UTC (permalink / raw)
To: linux-kbuild
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:
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?
thanks,
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: makefiles: obj vs. objtree
2010-02-18 2:27 makefiles: obj vs. objtree Randy Dunlap
@ 2010-02-18 9:54 ` Michal Marek
2010-02-18 16:02 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2010-02-18 9:54 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kbuild
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: makefiles: obj vs. objtree
2010-02-18 9:54 ` Michal Marek
@ 2010-02-18 16:02 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2010-02-18 16:02 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild
On 02/18/10 01:54, Michal Marek wrote:
> 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,
Yes, it does. I get it. Thanks.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-18 16:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 2:27 makefiles: obj vs. objtree Randy Dunlap
2010-02-18 9:54 ` Michal Marek
2010-02-18 16:02 ` Randy Dunlap
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.