tools: Check presence of ncurses
PATCH 1/1 tools: Check presence of ncurses
Add a check for the presence of ncurses development files
tools/check/check_curses_devel new file +14 -0
@@ -0,0 +1,14 @@ +#!/bin/sh +# CHECK-BUILD + +RC=0 + +set -e +test -r /usr/include/curses.h || RC=1 + +if test ${RC} -ne 0; then + echo + echo " *** Check for curses headers FAILED" +fi + +exit ${RC}
Will this break cross-compile environments? Xentop is not built in that case (hence no dependency on curses.h), yet your new check will still be enforced. If it is the xentop usage that you are wanting to protect with a check, perhaps the compile-or-not decision in xenstat/Makefile should be made dynamically based on presence of curses.h?
-- Keir
Quoted 27 lines · Samuel Thibault
Add a check for the presence of ncurses development files
Signed-off-by Samuel Thibault <[email protected]>diff -r
b28ae5f00553tools/check/check_curses_develtools/check/check_curses_devel Tue Mar 04 11:06:06 2008 +0000 renamed from dev/null Thu Jan 01 00:00:00 1970 +0000 +14
-0@@ -0,0 +1,14 @@ +#!/bin/sh +# CHECK-BUILD + +RC=0 + +set -e +test -r /usr/include/curses.h || RC=1 + +if test ${RC} -ne 0; then + echo + echo " *** Check for curses headers FAILED" +fi + +exit ${RC}_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Keir Fraser, le Tue 04 Mar 2008 11:24:46 +0000, a écrit :
Will this break cross-compile environments? Xentop is not built in that case (hence no dependency on
curses.h), yet your new check will still be enforced. If it is the xentop usage that you are wanting to protect with a check, perhaps the compile-or-not decision in xenstat/Makefile should be made dynamically based on presence ofcurses.h?
Something like this then:
tools: Compile xentop only if curses are available.
tools/xenstat/Makefile +2 -0
@@ -6,7 +6,9 @@ SUBDIRS += libxenstat # This doesn't cross-compile (cross-compile environments rarely have curses) ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) +ifeq ($(wildcard /usr/include/curses.h),/usr/include/curses.h) SUBDIRS += xentop +endif endif .PHONY: all install clean