[CRIU] [RFC PATCHv2 12/32] zdtm: Makefile: sanitize building of groups executable

Ivan Shapovalov intelfx at intelfx.name
Sat Mar 12 00:42:11 PST 2016


Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
 test/zdtm/.gitignore   | 1 +
 test/zdtm/lib/Makefile | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/zdtm/.gitignore b/test/zdtm/.gitignore
index 29c9740..3e852b7 100644
--- a/test/zdtm/.gitignore
+++ b/test/zdtm/.gitignore
@@ -1,4 +1,5 @@
 /lib/libzdtmtst.so
+/lib/groups
 /static/apparmor
 /static/arm-neon00
 /static/bind-mount
diff --git a/test/zdtm/lib/Makefile b/test/zdtm/lib/Makefile
index a4b581a..476e733 100644
--- a/test/zdtm/lib/Makefile
+++ b/test/zdtm/lib/Makefile
@@ -7,6 +7,8 @@ LDFLAGS = -fPIC
 LIBDIR	= .
 LIB	= libzdtmtst.so
 GRPS	= groups
+SRC     = $(GRPS:%=%.c)
+DEP     = $(SRC:%.c=%.d)
 
 LIBSRC	= datagen.c msg.c parseargs.c test.c streamutil.c lock.c ns.c tcp.c fs.c
 LIBOBJ	= $(LIBSRC:%.c=%.o)
@@ -16,7 +18,7 @@ DEPEND.c = $(COMPILE.c) -MM -MP
 %.d:	%.c
 	$(DEPEND.c) $(OUTPUT_OPTION) $<
 
-all:	$(LIB)
+all:	$(LIB) $(GRPS)
 	@true
 install: all
 .PHONY: all install
@@ -26,7 +28,7 @@ $(LIB):	$(LIBOBJ)
 	$(LINK.c) $^ $(OUTPUT_OPTION)
 
 clean:
-	$(RM) -f $(LIBOBJ) $(LIB) *~
+	$(RM) -f $(LIBOBJ) $(LIB) $(GRPS) *~
 
 cleandep:
 	$(RM) -f $(LIBDEP)
@@ -51,5 +53,5 @@ realclean:	clean cleandep
 .PHONY:	clean cleandep cleanout realclean
 
 ifeq ($(filter-out no-deps-targets, $(MAKECMDGOALS)),)
--include $(LIBDEP)
+-include $(LIBDEP) $(DEP)
 endif
-- 
2.7.2



More information about the CRIU mailing list