libxl: avoid build warning when _libxl_types.h does not initially exist.
authorIan Campbell <ian.campbell@citrix.com>
Thu, 2 Jun 2011 16:25:27 +0000 (17:25 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 2 Jun 2011 16:25:27 +0000 (17:25 +0100)
Olaf Hering reports:
if ! cmp _libxl_paths.h.2.tmp _libxl_paths.h; then mv -f _libxl_paths.h.2.tmp _libxl_paths.h; fi
cmp: _libxl_paths.h: No such file or directory

Use "cmp -s" to silence the error. cmp returns 2 in this case and so the mv
does occur.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/Makefile

index 538cd166807816e684c196f336b9cc04d63085d0..50a65672b92a808d31087bd00097ed26d0e07216 100644 (file)
@@ -69,7 +69,7 @@ $(eval $(genpath-target))
 
 _libxl_paths.h: genpath
        sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
-       if ! cmp $@.2.tmp $@; then mv -f $@.2.tmp $@; fi
+       if ! cmp -s $@.2.tmp $@; then mv -f $@.2.tmp $@; fi
 
 libxl_paths.c: _libxl_paths.h