[libvirt] [PATCH] src: Don't use double-colon rules

Andrea Bolognani posted 1 patch 22 weeks ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190111102333.20448-1-abologna@redhat.com
src/Makefile.am            | 6 +++---
src/remote/Makefile.inc.am | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)

[libvirt] [PATCH] src: Don't use double-colon rules

Posted by Andrea Bolognani 22 weeks ago
According to the GNU Make manual, "double-colon rules are
somewhat obscure and not often very useful". Looking at
the few instances we have in libvirt, that certainly seems
to be the case, so just drop them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/Makefile.am            | 6 +++---
 src/remote/Makefile.inc.am | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cd386297ed..8c8dfe3dcf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -816,14 +816,14 @@ if WITH_LIBVIRTD
 if LIBVIRT_INIT_SCRIPT_RED_HAT
 initdir = $(sysconfdir)/rc.d/init.d
 
-install-init:: $(SYSVINIT_FILES) install-sysconfig
+install-init: $(SYSVINIT_FILES) install-sysconfig
 	$(MKDIR_P) $(DESTDIR)$(initdir)
 	for f in $(SYSVINIT_FILES:%.init=%) ; \
 	do \
 	  $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
 	done
 
-uninstall-init:: uninstall-sysconfig
+uninstall-init: uninstall-sysconfig
 	rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
 	rmdir $(DESTDIR)$(initdir) || :
 
@@ -1010,7 +1010,7 @@ install-data-local: $(INSTALL_DATA_LOCAL) \
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
 
-uninstall-local:: $(UNINSTALL_LOCAL) \
+uninstall-local: $(UNINSTALL_LOCAL) \
 		$(INSTALL_DATA_DIRS:%=uninstall-data-%)
 	rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
 	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 0988435eed..3d0ff29548 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -213,7 +213,7 @@ polkitdir = $(datadir)/polkit-1
 polkitactionsdir = $(polkitdir)/actions
 polkitrulesdir = $(polkitdir)/rules.d
 
-install-polkit::
+install-polkit:
 	$(MKDIR_P) $(DESTDIR)$(polkitactionsdir)
 	$(INSTALL_DATA) $(srcdir)/remote/libvirtd.policy \
 		$(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
@@ -221,7 +221,7 @@ install-polkit::
 	$(INSTALL_DATA) $(srcdir)/remote/libvirtd.rules \
 		$(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
 
-uninstall-polkit::
+uninstall-polkit:
 	rm -f $(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
 	rmdir $(DESTDIR)$(polkitactionsdir) || :
 	rm -f $(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] src: Don't use double-colon rules

Posted by Erik Skultety 22 weeks ago
On Fri, Jan 11, 2019 at 11:23:33AM +0100, Andrea Bolognani wrote:
> According to the GNU Make manual, "double-colon rules are
> somewhat obscure and not often very useful". Looking at
> the few instances we have in libvirt, that certainly seems
> to be the case, so just drop them.

I actually wanted to ask about that during the review process of your previous
series, but I forgot, so thanks for addressing that too. I found a practical
example [1] where it *can* be useful, but we don't collect the actions
gradually (or as they call it "vertically").

Reviewed-by: Erik Skultety <eskultet@redhat.com>

[1] https://web.archive.org/web/20180122002430/http://owen.sj.ca.us/~rk/howto/slides/make/slides/makecolon.html

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list