Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1 | Upstream-Status: Submitted (http://bugs.gw.com/view.php?id=485) |
| 2 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 3 | |
| 4 | From 3cde199d03b39632361c275cd30fa0612a03138b Mon Sep 17 00:00:00 2001 |
| 5 | From: Ross Burton <ross.burton@intel.com> |
| 6 | Date: Mon, 19 Oct 2015 10:30:57 +0100 |
| 7 | Subject: [PATCH 2/2] When using the host file, respect FILE_COMPILE |
| 8 | |
| 9 | If we're cross-compiling and not using the file binary that was just built, |
| 10 | execute the binary that we've been told to use (via FILE_COMPILE) when checking |
| 11 | the version instead of assuming that "file" is correct as the actual compile |
| 12 | uses FILE_COMPILE so different binaries may be used. |
| 13 | --- |
| 14 | magic/Makefile.am | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/magic/Makefile.am b/magic/Makefile.am |
| 18 | index 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 | -- |
| 31 | 2.1.4 |
| 32 | |