1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

man: Makefiles with V=1 support

Generation of man pages is generating lot of barely readable output.
For normal build quietize this a bit.

For original verbose build start to use  'make V=1'
(just like i.e. linux kernel does)

TODO: apply at more places...
This commit is contained in:
Zdenek Kabelac 2017-10-27 16:44:11 +02:00
parent 4b0f6829f6
commit 0c68c19c32

View File

@ -46,6 +46,19 @@ MAN8DM=dmsetup.8 dmstats.8
MAN8CLUSTER= MAN8CLUSTER=
MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8 MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8
ifeq ("$(origin V)", "command line")
BUILD_VERBOSE = $(V)
endif
ifndef BUILD_VERBOSE
BUILD_VERBOSE = 0
endif
ifeq ($(BUILD_VERBOSE),1)
Q =
else
Q = @
endif
ifeq ($(MAKECMDGOALS),all_man) ifeq ($(MAKECMDGOALS),all_man)
MAN_ALL="yes" MAN_ALL="yes"
@ -151,14 +164,14 @@ SEE_ALSO=$(srcdir)/see_also.end
.PRECIOUS: %.8_gen .PRECIOUS: %.8_gen
%.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN) %.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN)
@( \ $(Q)( \
if [ ! -s $(TESTMAN) ] ; then \ if [ ! -s $(TESTMAN) ] ; then \
echo "Copying pre-generated template $@" ; \ echo "Copying pre-generated template $@" ; \
else \ else \
echo "Generating template $@" ; \ echo "Generating template $@" ; \
fi \ fi \
) )
set -e ; ( \ $(Q)set -e ; ( \
if [ ! -s $(TESTMAN) ] ; then \ if [ ! -s $(TESTMAN) ] ; then \
cat $(srcdir)/$(@:%.8_gen=%.8_pregen) ; \ cat $(srcdir)/$(@:%.8_gen=%.8_pregen) ; \
else \ else \
@ -171,8 +184,8 @@ SEE_ALSO=$(srcdir)/see_also.end
) > $@ ) > $@
define SUBSTVARS define SUBSTVARS
echo "Generating $@" $(Q)echo "Generating $@"
$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \ $(Q)$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
-e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \ -e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \
-e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \ -e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \
-e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \ -e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \
@ -197,7 +210,7 @@ endef
# - in "$vg-$lv" # - in "$vg-$lv"
# - in single one in '\\f.-' # - in single one in '\\f.-'
define ESCAPEHYPHENS define ESCAPEHYPHENS
$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \ $(Q)$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{6\}+\1\\\-\\\-\\\-\\\-\\\-\\\-+g" \ -e "s+\([ [:alpha:]]\)-\{6\}+\1\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{5\}+\1\\\-\\\-\\\-\\\-\\\-+g" \ -e "s+\([ [:alpha:]]\)-\{5\}+\1\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{4\}+\1\\\-\\\-\\\-\\\-+g" \ -e "s+\([ [:alpha:]]\)-\{4\}+\1\\\-\\\-\\\-\\\-+g" \