linux-stable/Documentation/kbuild
Masahiro Yamada 95fd3f87bf kbuild: add a flag to force absolute path for srctree
In old days, Kbuild always used an absolute path for $(srctree).

Since commit 890676c65d ("kbuild: Use relative path when building in
the source tree"), $(srctree) is '.' when O= was not passed from the
command line.

Yet, using absolute paths is useful in some cases even without O=, for
instance, to create a cscope file with absolute path tags.

'O=.' was known to work as a workaround to force Kbuild to use absolute
paths even when you are building in the source tree.

Since commit 25b146c5b8 ("kbuild: allow Kbuild to start from any
directory"), Kbuild is too clever to be tricked. Even if you pass 'O=.'
Kbuild notices you are building in the source tree, then use '.' for
$(srctree).

So, 'make O=. cscope' is no help to create absolute path tags.

We cannot force one or the other according to commit e93bc1a0ca
("Revert "kbuild: specify absolute paths for cscope""). Both of
relative path and absolute path have pros and cons.

This commit adds a new flag KBUILD_ABS_SRCTREE to allow users to
choose the absolute path for $(srctree).

'make KBUILD_ABS_SRCTREE=1 cscope' will work as a replacement of
'make O=. cscope'.

Reported-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-11 00:05:09 +09:00
..
headers_install.txt kbuild: remove headers_{install,check}_all 2019-06-15 19:57:01 +09:00
kbuild.txt kbuild: add a flag to force absolute path for srctree 2019-07-11 00:05:09 +09:00
kconfig-language.txt kconfig: report recursive dependency involving 'imply' 2018-08-22 23:21:39 +09:00
kconfig-macro-language.txt Documentation: kconfig: document a new Kconfig macro language 2018-05-29 03:31:19 +09:00
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
kconfig.txt kconfig: update user kconfig tools doc. 2018-07-06 22:04:01 +09:00
makefiles.txt kbuild: support header-test-pattern-y 2019-07-09 10:10:52 +09:00
modules.txt kbuild: turn '/' into an alias of './' 2019-02-20 09:42:47 +09:00