android_kernel_xiaomi_sm8350/scripts
Sam Ravnborg db8c1a7b2c kbuild: fix building external modules
kbuild failed to locate Makefile for external modules.
This brought to my attention how the variables for directories
have different values in different usage scenarios.

Different kbuild usage scenarios:
make       - plain make in same directory where kernel source lives
make O=    - kbuild is told to store output files in another directory
make M=    - building an external module
make O= M= - building an external module with kernel output seperate from src

Value assigned to the different variables:

           |$(src)          |$(obj) |$(srctree)        |$(objtree)
make       |reldir to k src |as src |abs path to k src |abs path to k src
make O=    |reldir to k src |as src |abs path to k src |abs path to output dir
make M=    |abs path to src |as src |abs path to k src |abs path to k src
make O= M= |abs path to src |as src |abs path to k src |abs path to k output

path to kbuild file:

make       | $(srctree)/$(src), $(src)
make O=    | $(srctree)/$(src)
make M=    | $(src)
make O= M= | $(src)

From the table above it can be seen that the only good way to find the
home directory of the kbuild file is to locate the one of the two variants
that is an absolute path. If $(src) is an absolute path (starts with /)
then use it, otherwise prefix $(src) with $(srctree).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-27 22:11:01 +02:00
..
basic [PATCH] Kill signed chars 2005-06-25 16:25:07 -07:00
genksyms
kconfig [PATCH] Kill signed chars 2005-06-25 16:25:07 -07:00
ksymoops
lxdialog
mod [PATCH] kbuild: modpost needs to cope with new glibc elf header on sparc 2005-07-13 17:05:32 +00:00
package [PATCH] kbuild: make help binrpm-pkg fix 2005-07-21 21:45:47 +00:00
bin2c.c
binoffset.c
checkconfig.pl
checkincludes.pl
checkstack.pl
checkversion.pl
conmakehash.c
extract-ikconfig
gcc-version.sh
gen_initramfs_list.sh
kallsyms.c
Kbuild.include kbuild: introduce Kbuild.include 2005-07-25 20:10:36 +00:00
kernel-doc [PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE 2005-07-13 23:18:36 +00:00
Lindent [PATCH] Lindent: ignore .indent.pro 2005-07-13 23:09:16 +00:00
Makefile
Makefile.build kbuild: fix building external modules 2005-07-27 22:11:01 +02:00
Makefile.clean kbuild: fix building external modules 2005-07-27 22:11:01 +02:00
Makefile.host [PATCH] kbuild: obey HOSTLOADLIBES_programname for single-file compilation 2005-07-13 22:11:14 +00:00
Makefile.lib kbuild: introduce Kbuild.include 2005-07-25 20:10:36 +00:00
Makefile.modinst kbuild: introduce Kbuild.include 2005-07-25 20:10:36 +00:00
Makefile.modpost kbuild: introduce Kbuild.include 2005-07-25 20:10:36 +00:00
makelst
mkcompile_h kbuild: "PREEMPT" in UTS_VERSION 2005-07-14 20:18:07 +00:00
mkmakefile
mksysmap
mkuboot.sh
mkversion
namespace.pl
patch-kernel
pnmtologo.c
reference_discarded.pl kbuild: fix buildcheck 2005-07-14 20:20:13 +00:00
reference_init.pl buildcheck: reduce DEBUG_INFO noise from reference* scripts 2005-07-14 20:14:42 +00:00
show_delta
ver_linux