blob: a7efbdcbccb5628a794fac9d70adde60d7ead7b4 [file] [log] [blame]
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001Upstream-Status: Submitted (http://bugs.gw.com/view.php?id=485)
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 3cde199d03b39632361c275cd30fa0612a03138b Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Mon, 19 Oct 2015 10:30:57 +0100
7Subject: [PATCH 2/2] When using the host file, respect FILE_COMPILE
8
9If we're cross-compiling and not using the file binary that was just built,
10execute the binary that we've been told to use (via FILE_COMPILE) when checking
11the version instead of assuming that "file" is correct as the actual compile
12uses FILE_COMPILE so different binaries may be used.
13---
14 magic/Makefile.am | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/magic/Makefile.am b/magic/Makefile.am
18index 89ac844..67067fe 100644
19--- a/magic/Makefile.am
20+++ b/magic/Makefile.am
21@@ -293,7 +293,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
22 @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
23 echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
24 else \
25- v=$$(file --version | sed -e s/file-// -e q); \
26+ v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \
27 if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
28 echo "Cannot use the installed version of file ($$v) to"; \
29 echo "cross-compile file ${PACKAGE_VERSION}"; \
30--
312.1.4
32