Skip to contentSkip to conversation

Change make to be quite again when doing nothing

PATCH New Juan Quintela 3 participants 5 messages Oct 14, 2009 – Oct 22, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change make to be quite again when doing nothing

Make don't print messages for sub-makes rules, but do it when targets are files.

If you run make twice in a row, you get this:

$ make -j3
make[1]: `qemu-doc.html' is up to date.
make[1]: `qemu-tech.html' is up to date.
make[1]: `qemu.1' is up to date.
make[1]: `qemu-img.1' is up to date.
make[1]: `qemu-nbd.8' is up to date.
make[1]: `qemu-io' is up to date.
make[1]: `qemu-img' is up to date.
$

This patch removes this messages, and make is quiet again.

Idea for this patch cames for Paulo Bonzini.

---
 Makefile |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Makefile +4 -2
index 04e21bb..238bd84 100644
@@ -20,7 +20,7 @@ Makefile: ;
 configure: ;
 
 .PHONY: all clean cscope distclean dvi html info install install-doc \
-	recurse-all speed tar tarbin test build-all
+	recurse-all speed tar tarbin test build-all build-top-level
 
 VPATH=$(SRC_PATH):$(SRC_PATH)/hw
 
@@ -41,7 +41,9 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 -include config-all-devices.mak
 
 build-all: config-host.h config-all-devices.h
-	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) V="$(V)" build-top-level recurse-all,)
+
+build-top-level: $(TOOLS) $(DOCS)
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 1/1 Makefile: Change make to be quiet again when doing nothing

This patch makes make quiet again.

There is already a similar patch from Juan Quintela, but maybe this shorter form is preferred.

---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index e78a3d0..4d9908c 100644
@@ -40,8 +40,8 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
 -include config-all-devices.mak
 
-build-all: config-host.h config-all-devices.h
-	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
+build-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS)
+	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) recurse-all,)
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
Signature · 1 line
1.5.6.5
#2 lore raw

[Qemu-devel] Re: [PATCH] Makefile: Change make to be quiet again when doing nothing

Quoted 4 lines · Stefan Weil

This patch makes make quiet again.

There is already a similar patch from Juan Quintela, but maybe this shorter form is preferred.

This patch would reintroduce an ordering problem between building config*.h and building the tools, whose fix is what made "make" noisy in the first place.

Paolo

#3 lore raw

[Qemu-devel] Re: [PATCH] Makefile: Change make to be quiet again when doing nothing

Quoted 11 lines · Paolo Bonzini
Quoted 4 lines · Stefan Weil

This patch makes make quiet again.

There is already a similar patch from Juan Quintela, but maybe this shorter form is preferred.

This patch would reintroduce an ordering problem between building config*.h and building the tools, whose fix is what made "make" noisy in the first place.

Paolo

Did you try this? config*.h will be built first, tools and docs come later with my patch,
so there should not be any difference regarding the build order.

The old code before 1215c6e7 was different.

Regards
Stefan

#4 lore raw

[Qemu-devel] Re: [PATCH] Makefile: Change make to be quiet again when doing nothing

Quoted 11 lines · Stefan Weil
Quoted 10 lines · Paolo Bonzini
Quoted 4 lines · Stefan Weil

This patch makes make quiet again.

There is already a similar patch from Juan Quintela, but maybe this shorter form is preferred.

This patch would reintroduce an ordering problem between building config*.h and building the tools, whose fix is what made "make" noisy in the first place.

Quoted 5 lines
Quoted 1 line

Paolo

Did you try this? config*.h will be built first, tools and docs come later with my patch,
so there should not be any difference regarding the build order.

No, but if there is a hidden missing dependency I don't see how your patch could work, that's it. I know that the patch is "in theory" correct, but people were reporting failed builds and Juan's move of $(TOOLS) $(DOCS) solved it.

Consider in addition that make does not guarantee to even *start* A before B if you have "TARGET: A B", especially at very high parallelism.
If you have icecream installed, a make -j20 is not uncommon and
guaranteed to find wrong dependencies.

Paolo