From 325d09a60e376cc38eb3ab9a85047b49977f3040 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 29 Nov 2018 17:09:27 +0100 Subject: [PATCH] makefiles: updates for less verbosity --- daemons/cmirrord/Makefile.in | 6 +- daemons/dmeventd/Makefile.in | 21 ++++-- daemons/lvmdbusd/Makefile.in | 19 ++--- daemons/lvmlockd/Makefile.in | 12 ++- daemons/lvmpolld/Makefile.in | 6 +- libdm/Makefile.in | 12 ++- libdm/dm-tools/Makefile.in | 12 ++- libdm/make.tmpl.in | 10 ++- make.tmpl.in | 12 +-- scripts/Makefile.in | 59 ++++++++------- test/Makefile.in | 138 ++++++++++++++++++++--------------- tools/Makefile.in | 4 +- udev/Makefile.in | 5 +- 13 files changed, 185 insertions(+), 131 deletions(-) diff --git a/daemons/cmirrord/Makefile.in b/daemons/cmirrord/Makefile.in index a78dafeb6..0bcd73cca 100644 --- a/daemons/cmirrord/Makefile.in +++ b/daemons/cmirrord/Makefile.in @@ -29,8 +29,10 @@ CFLAGS += $(CPG_CFLAGS) $(EXTRA_EXEC_CFLAGS) LDFLAGS += $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \ + @echo " [CC] $@" + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \ $(LVMLIBS) $(LMLIBS) $(INTERNAL_LIBS) $(LIBS) install: $(TARGETS) - $(INSTALL_PROGRAM) -D cmirrord $(usrsbindir)/cmirrord + @echo " [INSTALL] $<" + $(Q) $(INSTALL_PROGRAM) -D cmirrord $(usrsbindir)/cmirrord diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in index 56a9e3590..2d856f789 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in @@ -60,11 +60,13 @@ CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS) LIBS += $(PTHREAD_LIBS) dmeventd: $(LIB_SHARED) dmeventd.o - $(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \ + @echo " [CC] $@" + $(Q) $(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(INTERNAL_LIBS) $(LIBS) -lm dmeventd.static: $(LIB_STATIC) dmeventd.o - $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ + @echo " [CC] $@" + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) ifeq ("@PKGCONFIG@", "yes") @@ -80,23 +82,28 @@ CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES)) endif install_include: $(srcdir)/libdevmapper-event.h - $(INSTALL_DATA) -D $< $(includedir)/$(> $@-t - echo 'LVMPOLLD_PIDFILE="@LVMPOLLD_PIDFILE@"' >> $@-t - echo 'DMEVENTD_PIDFILE="@DMEVENTD_PIDFILE@"' >> $@-t - echo 'LVM_TEST_THIN_CHECK_CMD=$${LVM_TEST_THIN_CHECK_CMD-@THIN_CHECK_CMD@}' >> $@-t - echo 'LVM_TEST_THIN_DUMP_CMD=$${LVM_TEST_THIN_DUMP_CMD-@THIN_DUMP_CMD@}' >> $@-t - echo 'LVM_TEST_THIN_REPAIR_CMD=$${LVM_TEST_THIN_REPAIR_CMD-@THIN_REPAIR_CMD@}' >> $@-t - echo 'LVM_TEST_THIN_RESTORE_CMD=$${LVM_TEST_THIN_RESTORE_CMD-@THIN_RESTORE_CMD@}' >> $@-t - echo 'LVM_TEST_CACHE_CHECK_CMD=$${LVM_TEST_CACHE_CHECK_CMD-@CACHE_CHECK_CMD@}' >> $@-t - echo 'LVM_TEST_CACHE_DUMP_CMD=$${LVM_TEST_CACHE_DUMP_CMD-@CACHE_DUMP_CMD@}' >> $@-t - echo 'LVM_TEST_CACHE_REPAIR_CMD=$${LVM_TEST_CACHE_REPAIR_CMD-@CACHE_REPAIR_CMD@}' >> $@-t - echo 'LVM_TEST_CACHE_RESTORE_CMD=$${LVM_TEST_CACHE_RESTORE_CMD-@CACHE_RESTORE_CMD@}' >> $@-t - echo 'export DM_UDEV_SYNCHRONISATION THIN RAID CACHE\' >> $@-t - echo ' LVM_TEST_THIN_CHECK_CMD LVM_TEST_THIN_DUMP_CMD LVM_TEST_THIN_REPAIR_CMD LVM_TEST_THIN_RESTORE_CMD\' >> $@-t - echo ' LVM_TEST_CACHE_CHECK_CMD LVM_TEST_CACHE_DUMP_CMD LVM_TEST_CACHE_REPAIR_CMD LVM_TEST_CACHE_RESTORE_CMD' >> $@-t - mv $@-t $@ + @echo " [PATHS] $@" + $(Q) echo 'DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t + $(Q) echo 'LVMPOLLD_PIDFILE="@LVMPOLLD_PIDFILE@"' >> $@-t + $(Q) echo 'DMEVENTD_PIDFILE="@DMEVENTD_PIDFILE@"' >> $@-t + $(Q) echo 'LVM_TEST_THIN_CHECK_CMD=$${LVM_TEST_THIN_CHECK_CMD-@THIN_CHECK_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_THIN_DUMP_CMD=$${LVM_TEST_THIN_DUMP_CMD-@THIN_DUMP_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_THIN_REPAIR_CMD=$${LVM_TEST_THIN_REPAIR_CMD-@THIN_REPAIR_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_THIN_RESTORE_CMD=$${LVM_TEST_THIN_RESTORE_CMD-@THIN_RESTORE_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_CACHE_CHECK_CMD=$${LVM_TEST_CACHE_CHECK_CMD-@CACHE_CHECK_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_CACHE_DUMP_CMD=$${LVM_TEST_CACHE_DUMP_CMD-@CACHE_DUMP_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_CACHE_REPAIR_CMD=$${LVM_TEST_CACHE_REPAIR_CMD-@CACHE_REPAIR_CMD@}' >> $@-t + $(Q) echo 'LVM_TEST_CACHE_RESTORE_CMD=$${LVM_TEST_CACHE_RESTORE_CMD-@CACHE_RESTORE_CMD@}' >> $@-t + $(Q) echo 'export DM_UDEV_SYNCHRONISATION THIN RAID CACHE\' >> $@-t + $(Q) echo ' LVM_TEST_THIN_CHECK_CMD LVM_TEST_THIN_DUMP_CMD LVM_TEST_THIN_REPAIR_CMD LVM_TEST_THIN_RESTORE_CMD\' >> $@-t + $(Q) echo ' LVM_TEST_CACHE_CHECK_CMD LVM_TEST_CACHE_DUMP_CMD LVM_TEST_CACHE_REPAIR_CMD LVM_TEST_CACHE_RESTORE_CMD' >> $@-t + $(Q) mv $@-t $@ lib/paths-installed: lib/paths-common - $(RM) $@-t - cat lib/paths-common > $@-t - echo 'installed_testsuite=1' >> $@-t - echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:$$PATH' >> $@-t - mv $@-t $@ + @echo " [PATHS] $@" + $(Q) $(RM) $@-t + $(Q) cat lib/paths-common > $@-t + $(Q) echo 'installed_testsuite=1' >> $@-t + $(Q) echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:$$PATH' >> $@-t + $(Q) mv $@-t $@ lib/paths: lib/paths-common - $(RM) $@-t - cat lib/paths-common > $@-t - echo 'top_srcdir="$(top_srcdir)"' >> $@-t - echo 'abs_top_builddir="$(abs_top_builddir)"' >> $@-t - echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t - echo 'abs_srcdir="$(abs_srcdir)"' >> $@-t - echo 'abs_builddir="$(abs_builddir)"' >> $@-t - mv $@-t $@ + @echo " [PATHS] $@" + $(Q) $(RM) $@-t + $(Q) cat lib/paths-common > $@-t + $(Q) echo 'top_srcdir="$(top_srcdir)"' >> $@-t + $(Q) echo 'abs_top_builddir="$(abs_top_builddir)"' >> $@-t + $(Q) echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t + $(Q) echo 'abs_srcdir="$(abs_srcdir)"' >> $@-t + $(Q) echo 'abs_builddir="$(abs_builddir)"' >> $@-t + $(Q) mv $@-t $@ lib/version-expected: $(top_srcdir)/VERSION .lib-dir-stamp - cut -f 1 -d ' ' <$< >$@ + $(Q) cut -f 1 -d ' ' <$< >$@ lib/dm-version-expected: $(top_srcdir)/VERSION_DM .lib-dir-stamp - cut -f 1 -d ' ' <$< >$@ + $(Q) cut -f 1 -d ' ' <$< >$@ CMDS = lvm $(shell cat $(top_builddir)/tools/.commands 2>/dev/null) LIB = $(addprefix lib/, $(LIB_SECURETEST) $(LIB_DMSECURETEST) $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(LIB_FLAVOURS)) .tests-stamp: $(ALL) $(LIB) $(SUBDIRS) lib/version-expected lib/dm-version-expected + @echo " [TEST-STAMP]" @if test "$(srcdir)" != . ; then \ echo "Linking tests to builddir."; \ $(MKDIR_P) shell; \ for f in $(subst $(srcdir)/,,$(ALL)); do \ + test -n "$(Q)" || echo "$(LN_S) -f $(abs_top_srcdir)/test/$$f $$f"; \ $(LN_S) -f $(abs_top_srcdir)/test/$$f $$f; \ done; \ fi - @$(MKDIR_P) -m a=rwx $(LVM_TEST_RESULTS) - touch $@ + $(Q) $(MKDIR_P) -m a=rwx $(LVM_TEST_RESULTS) + $(Q) touch $@ .lib-dir-stamp: - $(MKDIR_P) lib unit - $(RM) lib/clvmd - for i in $(CMDS); do $(LN_S) -f lvm-wrapper lib/$$i; done - for i in daemons/dmeventd/dmeventd \ + @echo " [LIB-STAMP]" + $(Q) $(MKDIR_P) lib unit + $(Q) $(RM) lib/clvmd + @for i in $(CMDS); do \ + test -n "$(Q)" || echo "$(LN_S) -f lvm-wrapper lib/$$i"; \ + $(LN_S) -f lvm-wrapper lib/$$i; done + @for i in daemons/dmeventd/dmeventd \ libdm/dm-tools/dmsetup \ daemons/lvmpolld/lvmpolld ; do \ + test -n "$(Q)" || echo "$(LN_S) -f $(abs_top_builddir)/$$i lib/"; \ $(LN_S) -f $(abs_top_builddir)/$$i lib/; done - $(LN_S) -f $(abs_top_builddir)/libdm/dm-tools/dmsetup lib/dmstats - $(LN_S) -f $(abs_top_srcdir)/conf/lvmdbusd.profile lib/ - $(LN_S) -f $(abs_top_srcdir)/conf/thin-performance.profile lib/ - $(LN_S) -f $(abs_top_srcdir)/scripts/fsadm.sh lib/fsadm - test "$(srcdir)" = . || \ + $(Q) $(LN_S) -f $(abs_top_builddir)/libdm/dm-tools/dmsetup lib/dmstats + $(Q) $(LN_S) -f $(abs_top_srcdir)/conf/lvmdbusd.profile lib/ + $(Q) $(LN_S) -f $(abs_top_srcdir)/conf/thin-performance.profile lib/ + $(Q) $(LN_S) -f $(abs_top_srcdir)/scripts/fsadm.sh lib/fsadm + @test "$(srcdir)" = . || \ for i in $(LIB_LVMLOCKD_CONF) $(LIB_MKE2FS_CONF); do \ + test -n "$(Q)" || echo "$(LN_S) -f $(abs_top_srcdir)/test/lib/$$i lib/"; \ $(LN_S) -f $(abs_top_srcdir)/test/lib/$$i lib/; done - touch $@ + $(Q) touch $@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ diff --git a/tools/Makefile.in b/tools/Makefile.in index e21ca6313..4be1f72b3 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -133,7 +133,7 @@ man-generator.c: command.c man-generator: man-generator.o @echo " [CC] $@" - $(CC) $(CFLAGS) -o $@ $< + $(Q) $(CC) $(CFLAGS) -o $@ $< lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(INTERNAL_LIBS) @echo " [CC] $@" @@ -225,7 +225,7 @@ install_tools_dynamic: lvm .commands $(Q) $(INSTALL_PROGRAM) -D lvm $(sbindir)/lvm @echo Creating symbolic links for individual commands in $(sbindir) @for v in `cat .commands`; do \ - echo "$(LN_S) -f lvm $(sbindir)/$$v"; \ + test -n "$(Q)" || echo "$(LN_S) -f lvm $(sbindir)/$$v"; \ $(LN_S) -f lvm $(sbindir)/$$v; \ done; diff --git a/udev/Makefile.in b/udev/Makefile.in index 6f57d4612..81c2c7b3a 100644 --- a/udev/Makefile.in +++ b/udev/Makefile.in @@ -55,10 +55,11 @@ PVSCAN_ACTION=add endif %.rules: $(srcdir)/%.rules.in - $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(PVSCAN_RULE)+$(PVSCAN_RULE)+;s+(PVSCAN_ACTION)+$(PVSCAN_ACTION)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@ + $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(PVSCAN_RULE)+$(PVSCAN_RULE)+;s+(PVSCAN_ACTION)+$(PVSCAN_ACTION)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@ %_install: %.rules - $(INSTALL_DATA) -D $< $(udevdir)/$(