Masahiro Yamada
59b2bd05f5
kbuild: add 'headers' target to build up uapi headers in usr/include
...
In Linux build system, build targets and installation targets are
separated.
Examples are:
- 'make vmlinux' -> 'make install'
- 'make modules' -> 'make modules_install'
- 'make dtbs' -> 'make dtbs_install'
- 'make vdso' -> 'make vdso_install'
The intention is to run the build targets under the normal privilege,
then the installation targets under the root privilege since we need
the write permission to the system directories.
We have 'make headers_install' but the corresponding 'make headers'
stage does not exist. The purpose of headers_install is to provide
the kernel interface to C library. So, nobody would try to install
headers to /usr/include directly.
If 'sudo make INSTALL_HDR_PATH=/usr/include headers_install' were run,
some build artifacts in the kernel tree would be owned by root because
some of uapi headers are generated by 'uapi-asm-generic', 'archheaders'
targets.
Anyway, I believe it makes sense to split the header installation into
two stages.
[1] 'make headers'
Process headers in uapi directories by scripts/headers_install.sh
and copy them to usr/include
[2] 'make headers_install'
Copy '*.h' verbatim from usr/include to $(INSTALL_HDR_PATH)/include
For the backward compatibility, 'headers_install' depends on 'headers'.
Some samples expect uapi headers in usr/include. So, the 'headers'
target is useful to build up them in the fixed location usr/include
irrespective of INSTALL_HDR_PATH.
Another benefit is to stop polluting the final destination with the
time-stamp files '.install' and '.check'. Maybe you can see them in
your toolchains.
Lastly, my main motivation is to prepare for compile-testing uapi
headers. To build something, we have to save an object and .*.cmd
somewhere. The usr/include/ will be the work directory for that.
Signed-off-by: Masahiro Yamada <[email protected] >
2019-06-15 19:57:02 +09:00
..
atomic
locking/atomics: Don't assume that scripts are executable
2019-04-19 14:21:43 +02:00
basic
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
coccinelle
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 257
2019-06-05 17:30:27 +02:00
dtc
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
2019-06-05 17:37:17 +02:00
gcc-plugins
gcc-plugins: Handle unusual header environment
2019-05-31 10:26:05 -07:00
gdb
scripts/gdb: fix invocation when CONFIG_COMMON_CLK is not set
2019-06-01 15:51:31 -07:00
genksyms
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
kconfig
kconfig: tests: fix recursive inclusion unit test
2019-06-05 02:33:10 +09:00
ksymoops
mod
kbuild: modversions: Fix relative CRC byte order interpretation
2019-03-28 23:46:56 +09:00
package
kbuild: tar-pkg: enable communication with jobserver
2019-06-05 02:33:10 +09:00
selinux
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
tracing
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166
2019-05-30 11:26:39 -07:00
.gitignore
scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore
2018-12-22 00:37:52 +09:00
adjust_autoksyms.sh
kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
2019-03-14 02:39:11 +09:00
asn1_compiler.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36
2019-05-24 17:27:11 +02:00
bin2c.c
kbuild: move bin2c back to scripts/ from scripts/basic/
2018-07-18 01:18:05 +09:00
bloat-o-meter
bloat-o-meter: ignore __addressable_ symbols
2018-12-28 12:11:44 -08:00
bootgraph.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 391
2019-06-05 17:37:11 +02:00
bpf_helpers_doc.py
bpf: fix script for generating man page on BPF helpers
2019-05-13 01:12:45 +02:00
cc-can-link.sh
bpfilter: check compiler capability in Kconfig
2018-06-28 13:36:39 +09:00
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166
2019-05-30 11:26:39 -07:00
checkpatch.pl
checkpatch.pl: Update DT vendor prefix check
2019-05-22 14:54:49 -05:00
checkstack.pl
scripts/checkstack.pl: Fix arm64 wrong or unknown architecture
2019-06-05 02:33:10 +09:00
checksyscalls.sh
checksyscalls: fix up mq_timedreceive and stat exceptions
2019-02-19 21:27:53 +01:00
checkversion.pl
clang-version.sh
kbuild: update comment block of scripts/clang-version.sh
2019-03-04 22:34:54 +09:00
cleanfile
cleanpatch
coccicheck
coccicheck: return proper error code on fail
2018-08-14 08:58:56 +09:00
config
conmakehash.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 54
2019-05-24 17:36:42 +02:00
const_structs.checkpatch
decode_stacktrace.sh
scripts/decode_stacktrace.sh: handle RIP address with segment
2019-03-05 21:07:13 -08:00
decodecode
scripts/decodecode: set ARCH when running natively on arm/arm64
2018-12-28 12:11:44 -08:00
depmod.sh
kbuild: modules_install: warn when missing System.map file
2018-09-09 09:14:07 +09:00
diffconfig
documentation-file-ref-check
scripts/documentation-file-ref-check: detect broken :doc:foo
2019-05-03 06:45:22 -06:00
export_report.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
2019-05-30 11:29:53 -07:00
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
2019-06-05 17:37:10 +02:00
extract_xc3028.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 339
2019-06-05 17:37:07 +02:00
faddr2line
scripts/faddr2line: fix location of start_kernel in comment
2018-11-18 10:15:09 -08:00
file-size.sh
find-unused-docs.sh
gcc-goto.sh
jump_label: move 'asm goto' support test to Kconfig
2019-01-06 09:46:51 +09:00
gcc-ld
gcc-plugin.sh
gcc-version.sh
kbuild: clean up scripts/gcc-version.sh
2019-03-04 22:35:04 +09:00
gcc-x86_32-has-stack-protector.sh
stack-protector: test compiler capability in Kconfig and drop AUTO mode
2018-06-08 18:56:00 +09:00
gcc-x86_64-has-stack-protector.sh
stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y
2018-06-25 23:21:13 +09:00
gen_compile_commands.py
scripts: add a tool to produce a compile_commands.json file
2018-12-19 23:41:36 +09:00
gen_ksymdeps.sh
kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS
2018-12-01 23:13:14 +09:00
get_dvb_firmware
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
2019-05-24 17:36:45 +02:00
get_maintainer.pl
get_maintainer: allow option --mpath <directory> to read all files in <directory>
2018-08-22 10:52:48 -07:00
gfp-translate
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166
2019-05-30 11:26:39 -07:00
headerdep.pl
headers_check.pl
headers_install.sh
insert-sys-cert.c
kallsyms.c
Kbuild updates for v5.1
2019-03-10 17:48:21 -07:00
Kbuild.include
kbuild: use more portable 'command -v' for cc-cross-prefix
2019-06-08 00:38:47 +09:00
Kconfig.include
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
kernel-doc
kernel-doc: suppress 'not described' warnings for embedded struct fields
2019-01-16 15:04:01 -07:00
ld-version.sh
leaking_addresses.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166
2019-05-30 11:26:39 -07:00
Lindent
link-vmlinux.sh
Kbuild updates for v5.2
2019-05-08 12:25:12 -07:00
Makefile
kbuild: remove build_unifdef target in scripts/Makefile
2019-06-15 19:57:01 +09:00
Makefile.asm-generic
kbuild: force all architectures except um to include mandatory-y
2019-03-17 12:56:32 +09:00
Makefile.build
Kbuild updates for v5.2
2019-05-08 12:25:12 -07:00
Makefile.clean
kbuild: remove deprecated host-progs variable
2018-08-09 21:51:17 +09:00
Makefile.dtbinst
Makefile.extrawarn
kbuild: Remove -Waggregate-return from scripts/Makefile.extrawarn
2019-06-09 15:07:52 +09:00
Makefile.gcc-plugins
gcc-plugins: structleak: Generalize to all variable types
2019-03-04 09:29:41 -08:00
Makefile.headersinst
kbuild: add 'headers' target to build up uapi headers in usr/include
2019-06-15 19:57:02 +09:00
Makefile.host
kbuild: remove 'addtree' and 'flags' magic for header search paths
2019-05-18 11:49:57 +09:00
Makefile.kasan
kasan: remove use after scope bugs detection.
2019-03-05 21:07:13 -08:00
Makefile.kcov
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
Makefile.lib
dt-bindings: Pass binding directory to validation tools
2019-05-22 09:01:01 -05:00
Makefile.modbuiltin
kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build
2019-04-02 23:28:04 +09:00
Makefile.modinst
Revert "modsign: Abort modules_install when signing fails"
2019-03-17 12:56:31 +09:00
Makefile.modpost
modpost: make KBUILD_MODPOST_WARN also configurable for external modules
2019-04-11 23:11:51 +09:00
Makefile.modsign
kbuild: remove duplicated comments about PHONY
2018-07-06 22:04:03 +09:00
Makefile.ubsan
ubsan: Remove vla bound checks.
2019-05-06 11:12:09 -07:00
makelst
markup_oops.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 373
2019-06-05 17:37:10 +02:00
mkcompile_h
kbuild: remove unnecessary in-subshell execution
2019-01-28 09:11:17 +09:00
mkmakefile
kbuild: mkmakefile: generate a simple wrapper of top Makefile
2019-04-02 23:27:38 +09:00
mksysmap
mkuboot.sh
module-common.lds
modules-check.sh
kbuild: do not check name uniqueness of builtin modules
2019-05-21 08:54:05 +09:00
namespace.pl
objdiff
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 199
2019-05-30 11:29:23 -07:00
parse-maintainers.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
2019-06-05 17:37:10 +02:00
recordmcount.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
2019-06-05 17:37:10 +02:00
recordmcount.pl
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166
2019-05-30 11:26:39 -07:00
setlocalversion
scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks
2018-11-21 23:57:33 +09:00
show_delta
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 438
2019-06-05 17:37:17 +02:00
sign-file.c
sortextable.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
2019-06-05 17:37:10 +02:00
sortextable.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
2019-06-05 17:37:10 +02:00
spdxcheck-test.sh
scripts: add spdxcheck.py self test
2018-12-28 12:11:44 -08:00
spdxcheck.py
spdxcheck.py: fix directory structures
2019-06-01 15:51:31 -07:00
spelling.txt
scripts/spelling.txt: add more spellings to spelling.txt
2019-03-07 18:31:59 -08:00
sphinx-pre-install
SPDX update for 5.2-rc3, round 1
2019-05-31 08:34:32 -07:00
split-man.pl
stackdelta
stackusage
subarch.include
selftests: add headers_install to lib.mk
2018-09-05 08:12:09 -06:00
tags.sh
treewide: Add SPDX license identifier for missed files
2019-05-21 10:50:45 +02:00
unifdef.c
unifdef: use memcpy instead of strncpy
2018-11-30 14:45:01 -08:00
ver_linux
ver_linux: Assign constant RE to variable name for clarity
2019-01-22 13:34:35 +01:00
xen-hypercalls.sh
xz_wrap.sh