LKML Archive on lore.kernel.org help / color / mirror / Atom feed
* [PATCH] kbuild: introduce KECHO convenience echo @ 2008-11-06 8:31 Mike Frysinger 2008-11-06 8:31 ` [PATCH] kbuild: use " Mike Frysinger 2008-11-06 20:50 ` [PATCH] kbuild: introduce " Sam Ravnborg 0 siblings, 2 replies; 5+ messages in thread From: Mike Frysinger @ 2008-11-06 8:31 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linux-kernel, linux-kbuild There is a bunch of places in the build system where we do 'echo' to show some nice status lines. This means we still get output when running in silent mode. So declare a new KECHO variable that only does 'echo' when we are in a suitable verbose build mode. Signed-off-by: Mike Frysinger <vapier@gentoo.org> --- scripts/Kbuild.include | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 982dcae..9dc96cf 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -25,6 +25,13 @@ basetarget = $(basename $(notdir $@)) escsq = $(subst $(squote),'\$(squote)',$1) ### +# Easy method for doing a status message + kecho = : + quiet_kecho = echo +silent_kecho = : +KECHO = $($(quiet)kecho) + +### # filechk is used to check if the content of a generated file is updated. # Sample usage: # define filechk_sample -- 1.6.0.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] kbuild: use KECHO convenience echo 2008-11-06 8:31 [PATCH] kbuild: introduce KECHO convenience echo Mike Frysinger @ 2008-11-06 8:31 ` Mike Frysinger 2008-11-21 22:01 ` Sam Ravnborg 2008-11-06 20:50 ` [PATCH] kbuild: introduce " Sam Ravnborg 1 sibling, 1 reply; 5+ messages in thread From: Mike Frysinger @ 2008-11-06 8:31 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linux-kernel, linux-kbuild Convert a few echos in the build system to new $(KECHO) so we get correct output according to build verbosity. Signed-off-by: Mike Frysinger <vapier@gentoo.org> --- Makefile | 6 +++--- arch/blackfin/boot/Makefile | 2 +- scripts/Kbuild.include | 11 ++--------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 29abe62..3dd95c2 100644 --- a/Makefile +++ b/Makefile @@ -983,7 +983,7 @@ endef # directory for generated filesas used by some architectures. define create-symlink if [ ! -L include/asm ]; then \ - echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ + $(KECHO) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ if [ ! -d include/asm-$(SRCARCH) ]; then \ mkdir -p include/asm-$(SRCARCH); \ fi; \ @@ -1096,7 +1096,7 @@ all: modules PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) $(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.fwinst obj=firmware __fw_modbuild @@ -1360,7 +1360,7 @@ $(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) - @echo ' Building modules, stage 2.'; + @$(KECHO) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost PHONY += modules_install diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile index 522f3c1..25bb977 100644 --- a/arch/blackfin/boot/Makefile +++ b/arch/blackfin/boot/Makefile @@ -25,7 +25,7 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE $(obj)/vmImage: $(obj)/vmlinux.gz $(call if_changed,uimage) - @echo 'Kernel: $@ is ready' + @$(KECHO) 'Kernel: $@ is ready' install: sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 9dc96cf..c992249 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -46,22 +46,15 @@ KECHO = $($(quiet)kecho) # - If they are equal no change, and no timestamp update # - stdin is piped in from the first prerequisite ($<) so one has # 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 $(Q)set -e; \ - $($(quiet)chk_filechk); \ + $(KECHO) ' CHK $@'; \ mkdir -p $(dir $@); \ $(filechk_$(1)) < $< > $@.tmp; \ if [ -r $@ ] && cmp -s $@ $@.tmp; then \ rm -f $@.tmp; \ else \ - $($(quiet)upd_filechk); \ + $(KECHO) ' UPD $@'; \ mv -f $@.tmp $@; \ fi endef -- 1.6.0.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: use KECHO convenience echo 2008-11-06 8:31 ` [PATCH] kbuild: use " Mike Frysinger @ 2008-11-21 22:01 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2008-11-21 22:01 UTC (permalink / raw) To: Mike Frysinger; +Cc: linux-kernel, linux-kbuild On Thu, Nov 06, 2008 at 03:31:35AM -0500, Mike Frysinger wrote: > Convert a few echos in the build system to new $(KECHO) so we get correct > output according to build verbosity. > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> Applied both with a few mods. I will post full kbuild serie tomorrow. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: introduce KECHO convenience echo 2008-11-06 8:31 [PATCH] kbuild: introduce KECHO convenience echo Mike Frysinger 2008-11-06 8:31 ` [PATCH] kbuild: use " Mike Frysinger @ 2008-11-06 20:50 ` Sam Ravnborg 2008-11-06 21:17 ` Mike Frysinger 1 sibling, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2008-11-06 20:50 UTC (permalink / raw) To: Mike Frysinger; +Cc: linux-kernel, linux-kbuild On Thu, Nov 06, 2008 at 03:31:34AM -0500, Mike Frysinger wrote: > There is a bunch of places in the build system where we do 'echo' to show > some nice status lines. This means we still get output when running in > silent mode. So declare a new KECHO variable that only does 'echo' when we > are in a suitable verbose build mode. Nice idea. I will add it as soon as I start working on kbuild-next Same for your other two patches. A lot of the kbuild stuff today is using lowercase to avoid all the typical SCREAMING in Makefiles so I may end up using $(kecho). Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: introduce KECHO convenience echo 2008-11-06 20:50 ` [PATCH] kbuild: introduce " Sam Ravnborg @ 2008-11-06 21:17 ` Mike Frysinger 0 siblings, 0 replies; 5+ messages in thread From: Mike Frysinger @ 2008-11-06 21:17 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Mike Frysinger, linux-kernel, linux-kbuild On Thu, Nov 6, 2008 at 15:50, Sam Ravnborg wrote: > On Thu, Nov 06, 2008 at 03:31:34AM -0500, Mike Frysinger wrote: >> There is a bunch of places in the build system where we do 'echo' to show >> some nice status lines. This means we still get output when running in >> silent mode. So declare a new KECHO variable that only does 'echo' when we >> are in a suitable verbose build mode. > > Nice idea. > I will add it as soon as I start working on kbuild-next > Same for your other two patches. > > A lot of the kbuild stuff today is using lowercase to > avoid all the typical SCREAMING in Makefiles so I > may end up using $(kecho). yeah i wasnt sure whether to use $(KECHO) or $(kecho) or just $(echo). i'm really not partial to any :). -mike ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-21 22:02 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-11-06 8:31 [PATCH] kbuild: introduce KECHO convenience echo Mike Frysinger 2008-11-06 8:31 ` [PATCH] kbuild: use " Mike Frysinger 2008-11-21 22:01 ` Sam Ravnborg 2008-11-06 20:50 ` [PATCH] kbuild: introduce " Sam Ravnborg 2008-11-06 21:17 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).