Skip to content

Commit e1b702c

Browse files
waychmichal42
authored andcommitted
KBuild: silence "'scripts/unifdef' is up to date."
While changing our build system over to use the headers_install target as part of our klibc build, the following message started showing up in our logs: make[2]: `scripts/unifdef' is up to date. It turns out that the build blindly invokes a recursive make on this target, which causes make to emit this message when the target is already up to date. This isn't seen for most targets as the rest of the build relies primarily on the default target and on PHONY targets when invoking make recursively. Silence the above message when building unifdef as part of headers_install by hiding it behind a new PHONY target called "build_unifdef" that has an empty recipe. Signed-off-by: Mike Waychison <mikew@google.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 4a5838a commit e1b702c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
10221022

10231023
PHONY += __headers
10241024
__headers: include/linux/version.h scripts_basic FORCE
1025-
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
1025+
$(Q)$(MAKE) $(build)=scripts build_unifdef
10261026

10271027
PHONY += headers_install_all
10281028
headers_install_all:

scripts/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ always := $(hostprogs-y) $(hostprogs-m)
1818
# The following hostprogs-y programs are only build on demand
1919
hostprogs-y += unifdef
2020

21+
# This target is used internally to avoid "is up to date" messages
22+
PHONY += build_unifdef
23+
build_unifdef: scripts/unifdef FORCE
24+
@:
25+
2126
subdir-$(CONFIG_MODVERSIONS) += genksyms
2227
subdir-y += mod
2328
subdir-$(CONFIG_SECURITY_SELINUX) += selinux

0 commit comments

Comments
 (0)