[CRIU] [PATCH 2/2] test/*Makefile: add/append PHONY targets

Kir Kolyshkin kir at openvz.org
Tue Jan 7 13:58:05 PST 2014


...where they are missing.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 test/Makefile                      | 4 ++++
 test/app-emu/job/Makefile          | 2 ++
 test/app-emu/make/Makefile         | 2 ++
 test/libcriu/Makefile              | 2 ++
 test/rpc/Makefile                  | 2 ++
 test/tcp/Makefile                  | 2 ++
 test/zdtm/Makefile                 | 3 +--
 test/zdtm/live/Makefile            | 3 +--
 test/zdtm/live/static/Makefile     | 1 +
 test/zdtm/live/streaming/Makefile  | 1 +
 test/zdtm/live/transition/Makefile | 1 +
 11 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/test/Makefile b/test/Makefile
index 3bdabc3..5231275 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -7,17 +7,21 @@ ZDTM_ARGS ?= -C
 
 all: .FORCE
 	$(MAKE) zdtm
+.PHONY: all
 
 zdtm: .FORCE
 	$(MAKE) zdtm_ns
 	for t in $(shell echo "$(TST)" | tr ' ' '\n' | grep -Pv $(EXP)); do \
 		$(MAKE) $$t || break;	\
 	done
+.PHONY: zdtm
 
 fault-injection: .FORCE
 	$(MAKE) -C fault-injection
+.PHONY: fault-injection
 
 zdtm_ns: $(shell echo "$(TST)" | tr ' ' '\n' | grep -P $(EXP))
 $(TST):
 	./zdtm.sh ${ZDTM_ARGS} $(@) &> $(subst /,_,$@).log || \
 	{ flock Makefile cat $(subst /,_,$@).log; exit 1; }
+.PHONY: zdtm_ns
diff --git a/test/app-emu/job/Makefile b/test/app-emu/job/Makefile
index e8d572b..2fde2f6 100644
--- a/test/app-emu/job/Makefile
+++ b/test/app-emu/job/Makefile
@@ -1,4 +1,5 @@
 all: job
+.PHONY: all
 
 %.o: %.c
 	gcc -c $< -o $@
@@ -8,3 +9,4 @@ job: job.o
 
 clean:
 	rm -f *.o job
+.PHONY: clean
diff --git a/test/app-emu/make/Makefile b/test/app-emu/make/Makefile
index 035ae55..5ae8222 100644
--- a/test/app-emu/make/Makefile
+++ b/test/app-emu/make/Makefile
@@ -1,5 +1,6 @@
 all: foo1.o foo2.o foo3.o foo4.o
 	echo "Done"
+.PHONY: all
 
 %.o: %.c
 	gcc -c $< -o $@
@@ -9,3 +10,4 @@ foo%.c: tmpl.c
 
 clean:
 	rm -f *.o
+.PHONY: clean
diff --git a/test/libcriu/Makefile b/test/libcriu/Makefile
index e6f5da2..a1af1f5 100644
--- a/test/libcriu/Makefile
+++ b/test/libcriu/Makefile
@@ -1,4 +1,5 @@
 all: build/test
+.PHONY: all
 
 build/test: build/test.o
 	gcc $^ -L ../../lib -lcriu -o $@
@@ -8,3 +9,4 @@ build/test.o: test.c
 
 clean:
 	rm -rf build
+.PHONY: clean
diff --git a/test/rpc/Makefile b/test/rpc/Makefile
index 28bf530..ac52ae5 100644
--- a/test/rpc/Makefile
+++ b/test/rpc/Makefile
@@ -1,4 +1,5 @@
 all: test-c rpc_pb2.py
+.PHONY: all
 
 test-c: rpc.pb-c.o test.o
 	gcc $^ -o $@ -lprotobuf-c
@@ -14,3 +15,4 @@ rpc.pb-c.c: rpc.proto
 
 clean:
 	rm -rf build rpc.pb-c.o test.o test-c rpc.pb-c.c rpc.pb-c.h rpc_pb2.py
+.PHONY: clean
diff --git a/test/tcp/Makefile b/test/tcp/Makefile
index d23c0c5..365ea3d 100644
--- a/test/tcp/Makefile
+++ b/test/tcp/Makefile
@@ -1,6 +1,8 @@
 OBJS=cln srv
 
 all: $(OBJS)
+.PHONY: all
 
 clean:
 	rm -f $(OBJS)
+.PHONY: clean
diff --git a/test/zdtm/Makefile b/test/zdtm/Makefile
index 7b72e2f..997028d 100644
--- a/test/zdtm/Makefile
+++ b/test/zdtm/Makefile
@@ -1,8 +1,7 @@
 SUBDIRS	=	lib live
 
 default:	all
-
-.PHONY:	default
+PHONY: default all
 
 %:
 	set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
diff --git a/test/zdtm/live/Makefile b/test/zdtm/live/Makefile
index d50f0e7..951db94 100644
--- a/test/zdtm/live/Makefile
+++ b/test/zdtm/live/Makefile
@@ -1,8 +1,7 @@
 SUBDIRS	=	streaming transition static
 
 default:	all
-
-.PHONY:	default
+.PHONY:	default all
 
 %:
 	set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index 0e542e0..c3f7f4b 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -178,6 +178,7 @@ DEPEND.c = $(COMPILE.c) -MM -MP
 
 all:	$(TST) criu-rtc.so
 install: all
+.PHONY: all install
 
 inotify_system_nodel.c: inotify_system.c
 	ln -s inotify_system.c inotify_system_nodel.c
diff --git a/test/zdtm/live/streaming/Makefile b/test/zdtm/live/streaming/Makefile
index 9dd27e5..c9e9814 100644
--- a/test/zdtm/live/streaming/Makefile
+++ b/test/zdtm/live/streaming/Makefile
@@ -32,6 +32,7 @@ DEPEND.c = $(COMPILE.c) -MM -MP
 
 all:	$(TST)
 install: all
+PHONY: all install
 
 $(TST_NOFILE:%=%.pid):	%.pid:	%
 	$(<D)/$(<F) --pidfile=$@ --outfile=$<.out
diff --git a/test/zdtm/live/transition/Makefile b/test/zdtm/live/transition/Makefile
index 0fa7cf6..88e3972 100644
--- a/test/zdtm/live/transition/Makefile
+++ b/test/zdtm/live/transition/Makefile
@@ -29,6 +29,7 @@ DEPEND.c = $(COMPILE.c) -MM -MP
 
 all:	$(TST)
 install: all
+PHONY: all install
 
 $(TST_NOFILE:%=%.pid):	%.pid:	%
 	$(<D)/$(<F) --pidfile=$@ --outfile=$<.out
-- 
1.8.1.4



More information about the CRIU mailing list