From bdb6a31e8ca575d9c058a80aee3eb5d876261d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 5 Nov 2020 08:55:56 +0100 Subject: [PATCH] build: Make silent builds actually quiet. --- build/makefile_base.mak | 13 +++++++++++-- make/rules-autoconf.mk | 2 +- make/rules-common.mk | 20 ++++++++++---------- make/rules-meson.mk | 2 +- make/rules-source.mk | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/build/makefile_base.mak b/build/makefile_base.mak index ddece3c6..669b3188 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -1,6 +1,15 @@ SRC := $(abspath $(SRCDIR)) OBJ := $(abspath $(CURDIR)) +ifeq ($(filter s,$(MAKEFLAGS)),s) +MAKEFLAGS += --quiet --no-print-directory +--quiet? := --quiet +else +MFLAGS += V=1 VERBOSE=1 +-v? := -v +--verbose? := --verbose +endif + ## ## Nested make ## @@ -369,14 +378,14 @@ module32: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure32 module32: | all-source wine-configure32 +$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ32)/dlls/$(module) && \ find $(WINE_OBJ32)/dlls/$(module) -type f -name '*.dll' -printf '%p\0' | \ - xargs --verbose -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py + xargs $(--verbose?) -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py module64: private SHELL := $(CONTAINER_SHELL) module64: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure64 module64: | all-source wine-configure64 +$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) $(MFLAGS) $(MAKEOVERRIDES) -C $(WINE_OBJ64)/dlls/$(module) && \ find $(WINE_OBJ64)/dlls/$(module) -type f -name '*.dll' -printf '%p\0' | \ - xargs --verbose -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py + xargs $(--verbose?) -0 -r -P$(J) -n1 $(SRC)/make/pefixup.py module: CONTAINERGOALS := $(CONTAINERGOALS) wine-configure module: | all-source wine-configure diff --git a/make/rules-autoconf.mk b/make/rules-autoconf.mk index c6dc2d8d..80eee674 100644 --- a/make/rules-autoconf.mk +++ b/make/rules-autoconf.mk @@ -12,7 +12,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/configure.ac rm -rf "$$($(2)_OBJ$(3))/config.cache" cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ - $$($(2)_SRC)/configure -C \ + $$($(2)_SRC)/configure $(--quiet?) -C \ --prefix="$$($(2)_DST$(3))" \ --libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \ $$($(2)_ENV$(3)) \ diff --git a/make/rules-common.mk b/make/rules-common.mk index 481b3100..be7cc4be 100644 --- a/make/rules-common.mk +++ b/make/rules-common.mk @@ -55,32 +55,32 @@ ifneq ($(UNSTRIPPED_BUILD),) $$(OBJ)/.$(1)-dist$(3): @echo ":: installing $(3)bit $(1)..." >&2 mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/ - cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs --verbose -0 -r -P8 mkdir -p - cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs --verbose -0 -r -P8 -n2 cp -a + cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P8 mkdir -p + cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P8 -n2 cp -a cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \ -printf '--only-keep-debug\0%p\0$$(DST_LIBDIR$(3))/%p.debug\0' | \ - xargs --verbose -0 -r -P8 -n3 objcopy --file-alignment=4096 + xargs $(--verbose?) -0 -r -P8 -n3 objcopy --file-alignment=4096 cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \ -printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \ - xargs --verbose -0 -r -P8 -n4 objcopy --file-alignment=4096 + xargs $(--verbose?) -0 -r -P8 -n4 objcopy --file-alignment=4096 cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \ -printf '$$(DST_LIBDIR$(3))/%p\0' | \ - xargs --verbose -0 -r -P8 -n1 $$(SRC)/make/pefixup.py + xargs $(--verbose?) -0 -r -P8 -n1 $$(SRC)/make/pefixup.py touch $$@ else $$(OBJ)/.$(1)-dist$(3): @echo ":: installing $(3)bit $(1)..." >&2 mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/ - cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs --verbose -0 -r -P8 mkdir -p - cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs --verbose -0 -r -P8 -n2 cp -a + cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P8 mkdir -p + cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P8 -n2 cp -a cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \ - -printf '$$(DST_LIBDIR$(3))/%p.debug\0' | xargs --verbose -0 -r -P8 rm -f + -printf '$$(DST_LIBDIR$(3))/%p.debug\0' | xargs $(--verbose?) -0 -r -P8 rm -f cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \ -printf '--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \ - xargs --verbose -0 -r -P8 -n3 objcopy --file-alignment=4096 + xargs $(--verbose?) -0 -r -P8 -n3 objcopy --file-alignment=4096 cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \ -printf '$$(DST_LIBDIR$(3))/%p\0' | \ - xargs --verbose -0 -r -P8 -n1 $$(SRC)/make/pefixup.py + xargs $(--verbose?) -0 -r -P8 -n1 $$(SRC)/make/pefixup.py touch $$@ endif endif diff --git a/make/rules-meson.mk b/make/rules-meson.mk index 9c5d1f3a..7b982faf 100644 --- a/make/rules-meson.mk +++ b/make/rules-meson.mk @@ -31,7 +31,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build $$(OBJ)/.$(1)-build$(3): @echo ":: building $(3)bit $(1)..." >&2 env $$($(2)_ENV$(3)) \ - ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install + ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install $(-v?) touch $$@ endif endef diff --git a/make/rules-source.mk b/make/rules-source.mk index e84f8855..ff8eb9d3 100644 --- a/make/rules-source.mk +++ b/make/rules-source.mk @@ -25,7 +25,7 @@ $$(OBJ)/.$(1)-source: $$(shell echo -n 'syncing $(1)... ' >&2 && \ rsync --dry-run --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)" | \ grep -v -e ^$$$$ | grep -q ^ && echo $(1)-rebuild && \ echo 'done, dirty' >&2 || echo 'done' >&2) - rsync --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)" + rsync --filter=:C --exclude '*~' --exclude .git $$($(2)_SOURCE_ARGS) --info=name -Oarx --delete "$$(abspath $(3))/" "$$($(2)_SRC)" $(--quiet?) touch $$@ $$(OBJ)/.$(1)-post-source: $$(OBJ)/.$(1)-source