Message ID | 1516112253-14480-11-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,01/51] scsi-generic: Add share-rw option | expand |
On Tue, Jan 16, 2018 at 03:16:52PM +0100, Paolo Bonzini wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Move generic make flags in MAKEFLAGS (SUBDIR_MAKEFLAGS is more qemu specific). > > Use --quiet to silence make 'is up to date' message. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Tested-by: Eric Blake <eblake@redhat.com> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > Message-Id: <20180104160523.22995-3-marcandre.lureau@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > Makefile | 2 +- > rules.mak | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) After applying it when you run 'make install' absolutely nothing is displayed, but it none the less does work. This is very misleading to devs who thing nothing is being installed... Either this needs reverting, or we need to re-write the 'install' target so that it generates messages of whats being installed. Perhaps something like this diff --git a/Makefile b/Makefile index f26ef1b1df..8ef195a0df 100644 --- a/Makefile +++ b/Makefile @@ -697,28 +697,33 @@ ifneq ($(TOOLS),) endif ifneq ($(CONFIG_MODULES),) $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" + $(call quiet-command,\ for s in $(modules-m:.mo=$(DSOSUF)); do \ t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ $(INSTALL_LIB) $$s "$$t"; \ test -z "$(STRIP)" || $(STRIP) "$$t"; \ - done + done, "INSTALL", "$(modules-m)") endif ifneq ($(HELPERS-y),) $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) endif ifneq ($(BLOBS),) + $(call quiet-command,\ set -e; for x in $(BLOBS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ - done + done, "INSTALL", "$(BLOBS)") endif ifeq ($(CONFIG_GTK),y) $(MAKE) -C po $@ endif $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" + $(call quiet-command,\ set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ - done - $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" + done, "INSTALL", "$(KEYMAPS)") + $(call quiet-command,\ + $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all",\ + "INSTALL", "trace-events-all") for d in $(TARGET_DIRS); do \ $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ done diff --git a/rules.mak b/rules.mak index 5fb4951561..cd669833bf 100644 --- a/rules.mak +++ b/rules.mak @@ -147,7 +147,8 @@ set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) # install-prog list, dir define install-prog $(INSTALL_DIR) "$2" - $(INSTALL_PROG) $1 "$2" + $(call quiet-command,\ + $(INSTALL_PROG) $1 "$2", "INSTALL", "$1") $(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),) endef > > diff --git a/Makefile b/Makefile > index d86ecd2..1671db3 100644 > --- a/Makefile > +++ b/Makefile > @@ -277,7 +277,7 @@ else > DOCS= > endif > > -SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) > +SUBDIR_MAKEFLAGS=BUILD_DIR=$(BUILD_DIR) > SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) > SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) > > diff --git a/rules.mak b/rules.mak > index 6e94333..5fb4951 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -131,6 +131,8 @@ modules: > # If called with only a single argument, will print nothing in quiet mode. > quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) > > +MAKEFLAGS += $(if $(V),,--no-print-directory --quiet) > + > # cc-option > # Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) > Regards, Daniel
Hi On Tue, Jan 23, 2018 at 4:38 PM, Daniel P. Berrange <berrange@redhat.com> wrote: > On Tue, Jan 16, 2018 at 03:16:52PM +0100, Paolo Bonzini wrote: >> From: Marc-André Lureau <marcandre.lureau@redhat.com> >> >> Move generic make flags in MAKEFLAGS (SUBDIR_MAKEFLAGS is more qemu specific). >> >> Use --quiet to silence make 'is up to date' message. >> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> >> Tested-by: Eric Blake <eblake@redhat.com> >> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> >> Message-Id: <20180104160523.22995-3-marcandre.lureau@redhat.com> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> --- >> Makefile | 2 +- >> rules.mak | 2 ++ >> 2 files changed, 3 insertions(+), 1 deletion(-) > > After applying it when you run 'make install' absolutely nothing is > displayed, but it none the less does work. This is very misleading > to devs who thing nothing is being installed... Right, you would need V=1 now > Either this needs reverting, or we need to re-write the 'install' target > so that it generates messages of whats being installed. Perhaps something > like this > Make sense to me, could you send a former patch for review? thanks > diff --git a/Makefile b/Makefile > index f26ef1b1df..8ef195a0df 100644 > --- a/Makefile > +++ b/Makefile > @@ -697,28 +697,33 @@ ifneq ($(TOOLS),) > endif > ifneq ($(CONFIG_MODULES),) > $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" > + $(call quiet-command,\ > for s in $(modules-m:.mo=$(DSOSUF)); do \ > t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ > $(INSTALL_LIB) $$s "$$t"; \ > test -z "$(STRIP)" || $(STRIP) "$$t"; \ > - done > + done, "INSTALL", "$(modules-m)") > endif > ifneq ($(HELPERS-y),) > $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) > endif > ifneq ($(BLOBS),) > + $(call quiet-command,\ > set -e; for x in $(BLOBS); do \ > $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ > - done > + done, "INSTALL", "$(BLOBS)") > endif > ifeq ($(CONFIG_GTK),y) > $(MAKE) -C po $@ > endif > $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" > + $(call quiet-command,\ > set -e; for x in $(KEYMAPS); do \ > $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ > - done > - $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" > + done, "INSTALL", "$(KEYMAPS)") > + $(call quiet-command,\ > + $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all",\ > + "INSTALL", "trace-events-all") > for d in $(TARGET_DIRS); do \ > $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ > done > diff --git a/rules.mak b/rules.mak > index 5fb4951561..cd669833bf 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -147,7 +147,8 @@ set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) > # install-prog list, dir > define install-prog > $(INSTALL_DIR) "$2" > - $(INSTALL_PROG) $1 "$2" > + $(call quiet-command,\ > + $(INSTALL_PROG) $1 "$2", "INSTALL", "$1") > $(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),) > endef > > > > >> >> diff --git a/Makefile b/Makefile >> index d86ecd2..1671db3 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -277,7 +277,7 @@ else >> DOCS= >> endif >> >> -SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) >> +SUBDIR_MAKEFLAGS=BUILD_DIR=$(BUILD_DIR) >> SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) >> SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) >> >> diff --git a/rules.mak b/rules.mak >> index 6e94333..5fb4951 100644 >> --- a/rules.mak >> +++ b/rules.mak >> @@ -131,6 +131,8 @@ modules: >> # If called with only a single argument, will print nothing in quiet mode. >> quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) >> >> +MAKEFLAGS += $(if $(V),,--no-print-directory --quiet) >> + >> # cc-option >> # Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) >> > > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On Tue, Jan 23, 2018 at 05:08:08PM +0100, Marc-Andre Lureau wrote: > Hi > > On Tue, Jan 23, 2018 at 4:38 PM, Daniel P. Berrange <berrange@redhat.com> wrote: > > On Tue, Jan 16, 2018 at 03:16:52PM +0100, Paolo Bonzini wrote: > >> From: Marc-André Lureau <marcandre.lureau@redhat.com> > >> > >> Move generic make flags in MAKEFLAGS (SUBDIR_MAKEFLAGS is more qemu specific). > >> > >> Use --quiet to silence make 'is up to date' message. > >> > >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > >> Tested-by: Eric Blake <eblake@redhat.com> > >> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > >> Message-Id: <20180104160523.22995-3-marcandre.lureau@redhat.com> > >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > >> --- > >> Makefile | 2 +- > >> rules.mak | 2 ++ > >> 2 files changed, 3 insertions(+), 1 deletion(-) > > > > After applying it when you run 'make install' absolutely nothing is > > displayed, but it none the less does work. This is very misleading > > to devs who thing nothing is being installed... > > Right, you would need V=1 now > > > Either this needs reverting, or we need to re-write the 'install' target > > so that it generates messages of whats being installed. Perhaps something > > like this > > > > Make sense to me, could you send a former patch for review? When I looked at this more, I became concerned that I would inevitably miss places which need updating, as our makefiles as huge & have many targets potentially affected by this. So I took the former approach, with a small tweak to silence "is up to date" messages Regards, Daniel
diff --git a/Makefile b/Makefile index d86ecd2..1671db3 100644 --- a/Makefile +++ b/Makefile @@ -277,7 +277,7 @@ else DOCS= endif -SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory) BUILD_DIR=$(BUILD_DIR) +SUBDIR_MAKEFLAGS=BUILD_DIR=$(BUILD_DIR) SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS)) diff --git a/rules.mak b/rules.mak index 6e94333..5fb4951 100644 --- a/rules.mak +++ b/rules.mak @@ -131,6 +131,8 @@ modules: # If called with only a single argument, will print nothing in quiet mode. quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) +MAKEFLAGS += $(if $(V),,--no-print-directory --quiet) + # cc-option # Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)