[CRIU] [PATCH 8/9] Makefiles: remove @true

Kir Kolyshkin kir at openvz.org
Wed Feb 22 15:15:48 PST 2017


Apparently @true was used as a rule for any target which should have
a non-empty rule doing nothing. For this, there's a "<target>: ;"
syntax, let's use this and eliminate an unnecessary fork/exec :)

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Makefile                     | 3 +--
 Makefile.install             | 3 +--
 criu/Makefile                | 3 +--
 scripts/nmk/Makefile         | 3 +--
 scripts/nmk/scripts/build.mk | 3 +--
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index 7c4b372..114bbb0 100644
--- a/Makefile
+++ b/Makefile
@@ -310,8 +310,7 @@ endif
 tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
 criu-$(tar-name).tar.bz2:
 	git archive --format tar --prefix 'criu-$(tar-name)/' $(head-name) | bzip2 > $@
-dist tar: criu-$(tar-name).tar.bz2
-	@true
+dist tar: criu-$(tar-name).tar.bz2 ;
 .PHONY: dist tar
 
 tags:
diff --git a/Makefile.install b/Makefile.install
index 9e78367..f1e5415 100644
--- a/Makefile.install
+++ b/Makefile.install
@@ -41,8 +41,7 @@ install-compel: $(compel-install-targets)
 	$(Q) $(MAKE) $(build)=compel/plugins install
 .PHONY: install-compel
 
-install: install-man install-lib install-criu install-compel
-	@true
+install: install-man install-lib install-criu install-compel ;
 .PHONY: install
 
 uninstall:
diff --git a/criu/Makefile b/criu/Makefile
index 48688d8..ada75af 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -57,8 +57,7 @@ pie: criu/pie/pie.lib.a
 	$(Q) $(MAKE) $(build)=criu/pie all
 .PHONY: pie
 
-criu/pie/%: pie
-	@true
+criu/pie/%: pie ;
 
 #
 # CRIU executable
diff --git a/scripts/nmk/Makefile b/scripts/nmk/Makefile
index d9885c2..f05e5c5 100644
--- a/scripts/nmk/Makefile
+++ b/scripts/nmk/Makefile
@@ -29,8 +29,7 @@ install:
 	@cp scripts/tools.mk $(dir)
 	@cp scripts/utils.mk $(dir)
 
-all:
-	@true
+all: ;
 
 clean:
 	$(call msg-clean, "nmk")
diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
index 46d15fa..907967c 100644
--- a/scripts/nmk/scripts/build.mk
+++ b/scripts/nmk/scripts/build.mk
@@ -281,8 +281,7 @@ endif
 
 #
 # Main phony rule.
-all: $(all-y)
-	@true
+all: $(all-y) ;
 .PHONY: all
 
 #
-- 
2.9.3



More information about the CRIU mailing list