Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd54f502 authored by Mike Frysinger's avatar Mike Frysinger Committed by Sam Ravnborg
Browse files

kbuild: use KECHO convenience echo



Convert a few echos in the build system to new $(kecho) so we get correct
output according to build verbosity.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
[sam: added kecho in a few more places for O=... builds]
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 5410ecc0
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -926,7 +926,7 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# 2) Create the include2 directory, used for the second asm symlink
# 2) Create the include2 directory, used for the second asm symlink
prepare3: include/config/kernel.release
prepare3: include/config/kernel.release
ifneq ($(KBUILD_SRC),)
ifneq ($(KBUILD_SRC),)
	@echo '  Using $(srctree) as source for kernel'
	@$(kecho) '  Using $(srctree) as source for kernel'
	$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
	$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
		echo "  $(srctree) is not clean, please run 'make mrproper'";\
		echo "  $(srctree) is not clean, please run 'make mrproper'";\
		echo "  in the '$(srctree)' directory.";\
		echo "  in the '$(srctree)' directory.";\
@@ -983,7 +983,7 @@ endef
# directory for generated filesas used by some architectures.
# directory for generated filesas used by some architectures.
define create-symlink
define create-symlink
	if [ ! -L include/asm ]; then                                      \
	if [ ! -L include/asm ]; then                                      \
			echo '  SYMLINK $@ -> include/asm-$(SRCARCH)';     \
			$(kecho) '  SYMLINK $@ -> include/asm-$(SRCARCH)'; \
			if [ ! -d include/asm-$(SRCARCH) ]; then           \
			if [ ! -d include/asm-$(SRCARCH) ]; then           \
				mkdir -p include/asm-$(SRCARCH);           \
				mkdir -p include/asm-$(SRCARCH);           \
			fi;                                                \
			fi;                                                \
@@ -1096,7 +1096,7 @@ all: modules
PHONY += modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
	@echo '  Building modules, stage 2.';
	@$(kecho) '  Building modules, stage 2.';
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild


@@ -1360,7 +1360,7 @@ $(module-dirs): crmodverdir $(objtree)/Module.symvers
	$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
	$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)


modules: $(module-dirs)
modules: $(module-dirs)
	@echo '  Building modules, stage 2.';
	@$(kecho) '  Building modules, stage 2.';
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost


PHONY += modules_install
PHONY += modules_install
+1 −1
Original line number Original line Diff line number Diff line
@@ -25,7 +25,7 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE


$(obj)/vmImage: $(obj)/vmlinux.gz
$(obj)/vmImage: $(obj)/vmlinux.gz
	$(call if_changed,uimage)
	$(call if_changed,uimage)
	@echo 'Kernel: $@ is ready'
	@$(kecho) 'Kernel: $@ is ready'


install:
install:
	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
+2 −9
Original line number Original line Diff line number Diff line
@@ -46,22 +46,15 @@ kecho := $($(quiet)kecho)
# - If they are equal no change, and no timestamp update
# - If they are equal no change, and no timestamp update
# - stdin is piped in from the first prerequisite ($<) so one has
# - stdin is piped in from the first prerequisite ($<) so one has
#   to specify a valid file as first prerequisite (often the kbuild file)
#   to specify a valid file as first prerequisite (often the kbuild file)
       chk_filechk = :
 quiet_chk_filechk = echo '  CHK     $@'
silent_chk_filechk = :
       upd_filechk = :
 quiet_upd_filechk = echo '  UPD     $@'
silent_upd_filechk = :

define filechk
define filechk
	$(Q)set -e;				\
	$(Q)set -e;				\
	$($(quiet)chk_filechk);			\
	$(kecho) '  CHK     $@';		\
	mkdir -p $(dir $@);			\
	mkdir -p $(dir $@);			\
	$(filechk_$(1)) < $< > $@.tmp;		\
	$(filechk_$(1)) < $< > $@.tmp;		\
	if [ -r $@ ] && cmp -s $@ $@.tmp; then	\
	if [ -r $@ ] && cmp -s $@ $@.tmp; then	\
		rm -f $@.tmp;			\
		rm -f $@.tmp;			\
	else					\
	else					\
		$($(quiet)upd_filechk);		\
		$(kecho) '  UPD     $@';	\
		mv -f $@.tmp $@;		\
		mv -f $@.tmp $@;		\
	fi
	fi
endef
endef