[6380] Make make output quieter (Avi Kivity)
Revision: 6380
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6380 Author: aliguori Date: 2009-01-21 18:13:09 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Make make output quieter (Avi Kivity)
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Modified Paths:
--------------
trunk/Makefile
trunk/rules.mak
Modified: trunk/Makefile
===================================================================
Makefile +1 -1
@@ -39,7 +39,7 @@ SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) all + $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
Modified: trunk/rules.mak
===================================================================
rules.mak +6 -4
@@ -1,14 +1,16 @@ %.o: %.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<,CC $@) %.o: %.S - $(CC) $(CPPFLAGS) -c -o $@ $< + $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<,AS $@) %.o: %.m - $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<,OBJC $@) -LINK = $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $@) %$(EXESUF): %.o $(LINK) + +quiet-command = $(if $(V),$1,@echo $2 && $1)
Quoted 5 lines · Anthony Liguori
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Excellent!
However, I would find it helpful to see the name of the target that is being built. Something like the following? ...
rules.mak +5 -5
@@ -1,19 +1,19 @@ %.o: %.c - $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<,CC $@) + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<,CC $(TARGET_DIR) $@) %.o: %.S - $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<,AS $@) + $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<,AS $(TARGET_DIR) $@) %.o: %.m - $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<,OBJC $@) + $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<,OBJC $(TARGET_DIR) $@) -LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $@) +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $(TARGET_DIR) $@) %$(EXESUF): %.o $(LINK) %.a: - $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $@) + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $(TARGET_DIR) $@) quiet-command = $(if $(V),$1,@echo $2 && $1)
Makefile +2 -1
@@ -8,6 +8,7 @@ VPATH=$(SRC_PATH):$(SRC_PATH)/hw +TARGET_DIR=common CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
@@ -39,7 +40,7 @@ SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all + $(MAKE) -C $(subst subdir-,,$@) V="$(V)" TARGET_DIR="$*" all $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
Or is there a cleaner way of doing this?
(BTW, could the $(subst subdir-,,$@) just be replaced with $*?)
Cheers,
Signature · 1 line
Stuart Brady
PATCH 1/1 build system: Further improve quiet mode (was: Re: [6380] Make make output quieter (Avi Kivity))
Quoted 11 lines · Stuart Brady
Quoted 5 lines · Anthony Liguori
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Excellent!
However, I would find it helpful to see the name of the target that is being built. Something like the following? ...
Good idea! I rebased your work over recent changes and adopted it a bit, see below. Hope you still like it. :)
[...]
Quoted 10 lines
(quoted diff) +1
-1@@ -39,7 +40,7 @@ SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all + $(MAKE) -C $(subst subdir-,,$@) V="$(V)" TARGET_DIR="$*" all $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
Quoted 3 lines
Or is there a cleaner way of doing this?
(BTW, could the $(subst subdir-,,$@) just be replaced with $*?)
I'm no makefile guru, but from all I read this is true. So I included that cleanup as well.
Jan
---------->
Derived from Stuart Brady's patch: Show the target directory as prefix to the current module when building in quiet mode. This helps to gain overview of the current build progress, specifically when running parallelized builds.
Furthermore, suppress make command echoing when entering subdirs and replace $(subst subdir-,,$@) with $* in the related rule.
---
Makefile | 2 +- rules.mak | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
Makefile +1 -1
@@ -39,7 +39,7 @@ all: $(TOOLS) $(DOCS) recurse-all SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all + $(call quiet-command,$(MAKE) -C $* V="$(V)" TARGET_DIR="$*/" all,) $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
rules.mak +6 -6
@@ -1,19 +1,19 @@ %.o: %.c - $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $@") + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $@") + $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") %.o: %.m - $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $@") + $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") -LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $@") +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o $(LINK) %.a: - $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $@") + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") -quiet-command = $(if $(V),$1,@echo $2 && $1) +quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
Re: [Qemu-devel] [PATCH] build system: Further improve quiet mode (was: Re: [6380] Make make output quieter (Avi Kivity))
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Stuart Brady
Quoted 5 lines · Anthony Liguori
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Quoted 7 lines
Quoted 4 lines
Excellent!
However, I would find it helpful to see the name of the target that is being built. Something like the following? ...
Good idea! I rebased your work over recent changes and adopted it a bit, see below. Hope you still like it. :)
While you're at it, would it be possible to dump C flags once at the beginning to see how things get compiled? :-)
Laurent
[Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 10 lines · Laurent Desnogues
Quoted 9 lines · Jan Kiszka
Quoted 8 lines · Stuart Brady
Quoted 5 lines · Anthony Liguori
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Excellent!
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
However, I would find it helpful to see the name of the target that is being built. Something like the following? ...
Good idea! I rebased your work over recent changes and adopted it a bit, see below. Hope you still like it. :)
While you're at it, would it be possible to dump C flags once at the beginning to see how things get compiled? :-)
Something like this? I also included LDFLAGS - before someone asks...
------>
Derived from Stuart Brady's patch: Show the target directory as prefix to the current module when building in quiet mode. This helps to gain overview of the current build progress, specifically when running parallelized builds.
Furthermore, suppress make command echoing when entering subdirs and replace $(subst subdir-,,$@) with $* in the related rule. And on request by Laurent Desnogues, dump the used CFLAGS and LDFLAGS once on startup of the quiet mode.
---
Makefile | 7 +++++-- rules.mak | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-)
Makefile +5 -2
@@ -34,12 +34,15 @@ ifdef CONFIG_WIN32 LIBS+=-lwinmm -lws2_32 -liphlpapi endif -all: $(TOOLS) $(DOCS) recurse-all +all: + $(call quiet-command,$(MAKE) build-all,"Building with\n CFLAGS = $(CFLAGS)\n LDFLAGS = $(LDFLAGS)") + +build-all: $(TOOLS) $(DOCS) recurse-all SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all + $(call quiet-command,$(MAKE) -C $* V="$(V)" TARGET_DIR="$*/" all,) $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
rules.mak +6 -6
@@ -1,19 +1,19 @@ %.o: %.c - $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $@") + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $@") + $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") %.o: %.m - $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $@") + $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") -LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $@") +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o $(LINK) %.a: - $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $@") + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") -quiet-command = $(if $(V),$1,@echo $2 && $1) +quiet-command = $(if $(V),$1,$(if $(2),@echo -e $2 && $1, @$1))
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 1 line · Jan Kiszka
Something like this? I also included LDFLAGS - before someone asks...
Exactly :-) Thanks!
Laurent
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
In reply to Jan KiszkaQuoted 36 lines · Jan Kiszka
Quoted 14 lines · Laurent Desnogues
Quoted 12 lines · Jan Kiszka
Quoted 10 lines · Stuart Brady
Quoted 6 lines · Anthony Liguori
Spew out less noise when compiling. This helps review make output for information such as compilation warnings, rather than extra long compiler invocations.
The full output can be generated by supplying a 'V=1' parameter to make.
Excellent!
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
However, I would find it helpful to see the name of the target that is being built. Something like the following? ...
Good idea! I rebased your work over recent changes and adopted it a bit, see below. Hope you still like it. :)
While you're at it, would it be possible to dump C flags once at the beginning to see how things get compiled? :-)
Something like this? I also included LDFLAGS - before someone asks...
------>
Derived from Stuart Brady's patch: Show the target directory as prefix to the current module when building in quiet mode. This helps to gain overview of the current build progress, specifically when running parallelized builds.
Quoted 7 lines
Furthermore, suppress make command echoing when entering subdirs and replace $(subst subdir-,,$@) with $* in the related rule. And on request by Laurent Desnogues, dump the used CFLAGS and LDFLAGS once on startup of the quiet mode.
Signed-off-by Jan Kiszka <[email protected]>
I applied the first rev of this patch because I had queued that one up. I usually check to see if there are newer versions before applying a patch but since you included it in a response in the thread, I missed it.
Can you extract the CFLAGS part of this and resubmit.
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
Regards,
Anthony Liguori
Quoted 61 lines
---
Makefile | 7 +++++-- rules.mak | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-)Makefile +5
-2@@ -34,12 +34,15 @@ ifdef CONFIG_WIN32 LIBS+=-lwinmm -lws2_32 -liphlpapi endif -all: $(TOOLS) $(DOCS) recurse-all +all: + $(call quiet-command,$(MAKE) build-all,"Building with\n CFLAGS = $(CFLAGS)\n LDFLAGS = $(LDFLAGS)") + +build-all: $(TOOLS) $(DOCS) recurse-all SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) subdir-%: - $(MAKE) -C $(subst subdir-,,$@) V="$(V)" all + $(call quiet-command,$(MAKE) -C $* V="$(V)" TARGET_DIR="$*/" all,) $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a $(filter %-user,$(SUBDIR_RULES)): libqemu_user.arules.mak +6
-6@@ -1,19 +1,19 @@ %.o: %.c - $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $@") + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $@") + $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") %.o: %.m - $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $@") + $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") -LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $@") +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o $(LINK) %.a: - $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $@") + $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") -quiet-command = $(if $(V),$1,@echo $2 && $1) +quiet-command = $(if $(V),$1,$(if $(2),@echo -e $2 && $1, @$1))
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 11 lines · Anthony Liguori
Jan Kiszka wrote:
Can you extract the CFLAGS part of this and resubmit.
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
Regards,
Anthony Liguori
Good idea,
Usually C/LDFLAGS variables are printed at the end of the configure script.
Regards,
Signature · 3 lines
Lione Landwerlin O p e n W i d e 14, rue Gaillon 75002 Paris
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
In reply to Anthony LiguoriQuoted 2 lines
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
I don't find it that interesting either. Especially given we use at least two different sets of CFLAGS, and you really also need to know which compiler is being invoked. You can always use V=1.
Paul
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 6 lines · Paul Brook
Quoted 3 lines
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
I don't find it that interesting either. Especially given we use at least two different sets of CFLAGS, and you really also need to know which compiler is being invoked. You can always use V=1.
That was my thinking too. The more noise in the build output, the less useful the quiet mode is wrt catching warnings.
Regards,
Anthony Liguori
Quoted 2 lines
Paul
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Paul Brook
Quoted 4 lines
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
Quoted 7 lines
Quoted 4 lines
I don't find it that interesting either. Especially given we use at least two different sets of CFLAGS, and you really also need to know which compiler is being invoked. You can always use V=1.
That was my thinking too. The more noise in the build output, the less useful the quiet mode is wrt catching warnings.
So what about this?
Laurent
- Make user-mode build process quieter.
Makefile.target +2 -2
@@ -725,9 +725,9 @@ endif # !CONFIG_USER_ONLY gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh - rm -f $@ + $(call quiet-command,rm -f $@) ifeq ($(TARGET_XML_FILES),) - echo > $@ + $(call quiet-command,echo > $@) else $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES) endif
[Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 27 lines · Laurent Desnogues
Quoted 10 lines · Anthony Liguori
Quoted 7 lines · Paul Brook
Quoted 3 lines
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
I don't find it that interesting either. Especially given we use at least two different sets of CFLAGS, and you really also need to know which compiler is being invoked. You can always use V=1.
That was my thinking too. The more noise in the build output, the less useful the quiet mode is wrt catching warnings.
So what about this?
Laurent
- Make user-mode build process quieter.
Signed-off-by Laurent Desnogues <[email protected]>Index: Makefile.target
===================================================================Makefile.target +0
-0@@ -725,9 +725,9 @@ endif # !CONFIG_USER_ONLY
Makefile.target line 733
Quoted 10 lines
Makefile.target +2
-2gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh - rm -f $@ + $(call quiet-command,rm -f $@) ifeq ($(TARGET_XML_FILES),) - echo > $@ + $(call quiet-command,echo > $@) else $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES) endif
I was thinking in this direction already as well. But please go for a canonical output, something like
GENERATE ppc-softmmu/gdbstub-xml.c
(Likely requires adjusting indention of the other rules.)
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
[Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 41 lines · Jan Kiszka
Quoted 26 lines · Laurent Desnogues
Quoted 10 lines · Anthony Liguori
Quoted 7 lines · Paul Brook
Quoted 3 lines
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
I don't find it that interesting either. Especially given we use at least two different sets of CFLAGS, and you really also need to know which compiler is being invoked. You can always use V=1.
That was my thinking too. The more noise in the build output, the less useful the quiet mode is wrt catching warnings.
So what about this?
Laurent
- Make user-mode build process quieter.
Signed-off-by Laurent Desnogues <[email protected]>Index: Makefile.target
===================================================================Makefile.target +0
-0@@ -725,9 +725,9 @@ endif # !CONFIG_USER_ONLYMakefile.target line 733
Quoted 10 lines
Makefile.target +2
-2gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh - rm -f $@ + $(call quiet-command,rm -f $@) ifeq ($(TARGET_XML_FILES),) - echo > $@ + $(call quiet-command,echo > $@) else $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES) endifI was thinking in this direction already as well. But please go for a canonical output, something like
Quoted 3 lines
GENERATE
ppc-softmmu/gdbstub-xml.c(Likely requires adjusting indention of the other rules.)
Or simply use
GEN ppc-softmmu/gdbstub-xml.c
which fits into the existing layout.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Re: [Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
In reply to Anthony LiguoriQuoted 3 lines · Anthony Liguori
BTW, what do people think of printing CFLAGS? I find it not all that exciting but if people like it, I'm happy to go with it.
I'm obviously interested since I asked for it :-) I often play with -O flag when I check every target still builds and sometimes I forget to set it back to -O2 while I need to run the thing. Having it dumped early in the build helps me catch when it's wrong as I always look at the first compilation lines before switching to something else. Of course it's just a nice-to-have for me, nothing that matters that much.
Laurent
Anthony Liguori
AppliedRe: [Qemu-devel] [PATCH] build system: Further improve quiet mode
In reply to Jan KiszkaQuoted 10 lines
Derived from Stuart Brady's patch: Show the target directory as prefix to the current module when building in quiet mode. This helps to gain overview of the current build progress, specifically when running parallelized builds.
Furthermore, suppress make command echoing when entering subdirs and replace $(subst subdir-,,$@) with $* in the related rule.
Signed-off-by Jan Kiszka <[email protected]>
Applied. Thanks.
The output really does look better.
Regards,
Anthony Liguori
[Qemu-devel] Re: [PATCH] build system: Further improve quiet mode
Quoted 6 lines · Anthony Liguori
Quoted 6 lines
Derived from Stuart Brady's patch: Show the target directory as prefix to the current module when building in quiet mode. This helps to gain overview of the current build progress, specifically when running parallelized builds.
Quoted 8 lines
Quoted 4 lines
Furthermore, suppress make command echoing when entering subdirs and replace $(subst subdir-,,$@) with $* in the related rule.
Signed-off-by Jan Kiszka <[email protected]>Applied. Thanks.
The output really does look better.
Accidentally missed -v2? If yes, here is the delta:
------>
Add-on to the previous patch: On request by Laurent Desnogues dump the used CFLAGS and LDFLAGS once on startup of the quiet mode.
---
Makefile | 5 ++++- rules.mak | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)
Makefile +4 -1
@@ -34,7 +34,10 @@ ifdef CONFIG_WIN32 LIBS+=-lwinmm -lws2_32 -liphlpapi endif -all: $(TOOLS) $(DOCS) recurse-all +all: + $(call quiet-command,$(MAKE) build-all,"Building with\n CFLAGS = $(CFLAGS)\n LDFLAGS = $(LDFLAGS)") + +build-all: $(TOOLS) $(DOCS) recurse-all SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
rules.mak +1 -1
@@ -16,4 +16,4 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $(TARGET_ %.a: $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") -quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1)) +quiet-command = $(if $(V),$1,$(if $(2),@echo -e $2 && $1, @$1))