build: Make silent builds actually quiet.

This commit is contained in:
Rémi Bernon 2020-11-05 08:55:56 +01:00 committed by Andrew Eikum
parent 5b406be13e
commit bdb6a31e8c
5 changed files with 24 additions and 15 deletions

View File

@ -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

View File

@ -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)) \

View File

@ -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

View File

@ -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

View File

@ -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