Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: unexport abs_srctree and abs_objtree

Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory")
exported abs_srctree and abs_objtree to avoid recomputation after the
sub-make. However, this approach turned out to be fragile.

Commit 5fa94ceb793e ("kbuild: set correct abs_srctree and abs_objtree
for package builds") moved them above "ifneq ($(sub_make_done),1)",
eliminating the need for exporting them.

These are only needed in the top Makefile. If an absolute path is
required in sub-directories, you can use $(abspath ) or $(realpath )
as needed.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

+6 -6
+2 -2
Makefile
··· 39 39 # prepare rule. 40 40 41 41 this-makefile := $(lastword $(MAKEFILE_LIST)) 42 - export abs_srctree := $(realpath $(dir $(this-makefile))) 43 - export abs_objtree := $(CURDIR) 42 + abs_srctree := $(realpath $(dir $(this-makefile))) 43 + abs_objtree := $(CURDIR) 44 44 45 45 ifneq ($(sub_make_done),1) 46 46
+2 -2
rust/Makefile
··· 100 100 -e 's:rust-logo-[0-9a-f]+\.svg:logo.svg:g' \ 101 101 -e 's:favicon-[0-9a-f]+\.svg:logo.svg:g' \ 102 102 -e 's:<link rel="alternate icon" type="image/png" href="[/.]+/static\.files/favicon-(16x16|32x32)-[0-9a-f]+\.png">::g' \ 103 - -e 's:<a href="srctree/([^"]+)">:<a href="$(abs_srctree)/\1">:g' 103 + -e 's:<a href="srctree/([^"]+)">:<a href="$(realpath $(srctree))/\1">:g' 104 104 $(Q)for f in $(rustdoc_output)/static.files/rustdoc-*.css; do \ 105 105 echo ".logo-container > img { object-fit: contain; }" >> $$f; done 106 106 ··· 413 413 rust-analyzer: 414 414 $(Q)$(srctree)/scripts/generate_rust_analyzer.py \ 415 415 --cfgs='core=$(core-cfgs)' --cfgs='alloc=$(alloc-cfgs)' \ 416 - $(abs_srctree) $(abs_objtree) \ 416 + $(realpath $(srctree)) $(realpath $(objtree)) \ 417 417 $(RUST_LIB_SRC) $(KBUILD_EXTMOD) > \ 418 418 $(if $(KBUILD_EXTMOD),$(extmod_prefix),$(objtree))/rust-project.json 419 419
+1 -1
scripts/Makefile.package
··· 135 135 mkdir $(objtree)/snap 136 136 $(MAKE) clean 137 137 sed "s@KERNELRELEASE@$(KERNELRELEASE)@; \ 138 - s@SRCTREE@$(abs_srctree)@" \ 138 + s@SRCTREE@$(realpath $(srctree))@" \ 139 139 $(srctree)/scripts/package/snapcraft.template > \ 140 140 $(objtree)/snap/snapcraft.yaml 141 141 cd $(objtree)/snap && \
+1 -1
tools/lib/bpf/Makefile
··· 2 2 # Most of this file is copied from tools/lib/traceevent/Makefile 3 3 4 4 RM ?= rm 5 - srctree = $(abs_srctree) 5 + srctree := $(realpath $(srctree)) 6 6 7 7 VERSION_SCRIPT := libbpf.map 8 8 LIBBPF_VERSION := $(shell \