[CRIU] [PATCH 2/6] make: simplify checking of installed libraries

Cyrill Gorcunov gorcunov at openvz.org
Mon Jul 18 12:22:44 PDT 2016


From: Dmitry Safonov <dsafonov at virtuozzo.com>

Impact: use /dev/null as $(CC) output, drop temporary file.

Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/criu/Makefile b/criu/Makefile
index 7a4811747bc0..7b008caa552e 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -46,10 +46,8 @@ REQ-DEB-PKG-TEST-NAMES  += libaio-dev
 ifneq ($(MAKECMDGOALS),clean)
 ifneq ($(MAKECMDGOALS),mrproper)
         ifneq ($(shell sh -c                                                            \
-                        'TMP="$(OUTPUT)$(TMPOUT).$$$$";                                 \
-                        echo "int main(int argc, char *argv[]) { return 0; }" |         \
-                        "$(CC)" -x c - $(LIBS) -o "$$TMP" > /dev/null 2>&1 && echo y;   \
-                        rm -f "$$TMP"'),y)
+                        'echo "int main(int argc, char *argv[]) { return 0; }" |        \
+                        "$(CC)" -x c - $(LIBS) -o /dev/null > /dev/null 2>&1 && echo y'),y)
                 $(warning "Couldn't find some of the required libraries")
                 $(warning "Make sure the following packages are installed")
                 $(warning "RPM based distros: $(REQ-RPM-PKG-NAMES)")
-- 
2.7.4



More information about the CRIU mailing list