summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2011-08-03 16:55:40 +0000
committerChristos Zoulas <christos@zoulas.com>2011-08-03 16:55:40 +0000
commit814aeb78686c7fdd3bab535d85b365607d2d76a3 (patch)
tree95959724f937a0d8ebdcebe261af8e91a5979aca
parentdcfe7bfd6ebfde3c3a450fa716fc04a78350d6f4 (diff)
downloadfile-git-FILE5_08.tar.gz
more portable if/then/elseFILE5_08
-rw-r--r--magic/Makefile.am10
1 files changed, 6 insertions, 4 deletions
diff --git a/magic/Makefile.am b/magic/Makefile.am
index 9486710b..f00d01ad 100644
--- a/magic/Makefile.am
+++ b/magic/Makefile.am
@@ -1,5 +1,5 @@
#
-# $File: Makefile.am,v 1.66 2011/05/10 17:01:57 christos Exp $
+# $File: Makefile.am,v 1.69 2011/08/03 16:28:23 christos Exp $
#
MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic
@@ -254,14 +254,16 @@ endif
${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
@rm -fr magic
@mkdir magic && cp -p $(EXTRA_DIST) magic
- @(if [ "${FILE_COMPILE}" = "file" ]; then \
+ @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
+ echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
+ else \
v=$$(file --version | sed -e s/file-// -e q); \
- if [ $$v != ${PACKAGE_VERSION} ]; then \
+ if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
echo "Cannot use the installed version of file ($$v) to"; \
echo "cross-compile file ${PACKAGE_VERSION}"; \
echo "Please install file ${PACKAGE_VERSION} locally first"; \
exit 1; \
fi; \
- fi)
+ fi)
$(FILE_COMPILE) -C -m magic
@rm -fr magic