mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Masahiro Yamada](/assets/img/avatar_default.png)
As commit d0e628cd81
("kbuild: doc: clarify the difference between
extra-y and always-y") explained, extra-y should be used for listing
the prerequisites of vmlinux.
These targets are not related to vmlinux. always-y is a better fix.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
25 lines
667 B
Makefile
25 lines
667 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
ifdef building_out_of_srctree
|
|
|
|
symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py))
|
|
|
|
quiet_cmd_symlink = SYMLINK $@
|
|
cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
|
|
|
|
always-y += $(symlinks)
|
|
$(addprefix $(obj)/, $(symlinks)): FORCE
|
|
$(call if_changed,symlink)
|
|
|
|
endif
|
|
|
|
quiet_cmd_gen_constants_py = GEN $@
|
|
cmd_gen_constants_py = \
|
|
$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
|
|
sed -i '1,/<!-- end-c-headers -->/d;' $@
|
|
|
|
always-y += constants.py
|
|
$(obj)/constants.py: $(src)/constants.py.in FORCE
|
|
$(call if_changed_dep,gen_constants_py)
|
|
|
|
clean-files := *.pyc *.pyo
|