summaryrefslogtreecommitdiff
path: root/Makefile.grf.in
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-21 11:30:41 +0000
committerrubidium <rubidium@openttd.org>2010-08-21 11:30:41 +0000
commit70fb9ca9d8e1ece9ed2071f9b55b1db300e63897 (patch)
treea48a9b9b0eeac0d38cd9a84c1470c9613699d763 /Makefile.grf.in
parent64d7b84c9f962b0dc2f6462b2f848113f8c64177 (diff)
downloadopenttd-70fb9ca9d8e1ece9ed2071f9b55b1db300e63897.tar.xz
(svn r20588) -Fix (r20586): apparantly some NFORenums don't return an error code when an unknown command line option is given
Diffstat (limited to 'Makefile.grf.in')
-rw-r--r--Makefile.grf.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.grf.in b/Makefile.grf.in
index 963b6d4d2..86403991e 100644
--- a/Makefile.grf.in
+++ b/Makefile.grf.in
@@ -35,8 +35,10 @@ else
endif
# Some configurational settings for your environment.
+# If GRFCodec doesn't know a command, it'll exit with a non-zero exit code.
GRFCODEC := $(shell grfcodec -s -v >/dev/null 2>/dev/null && echo "grfcodec -s" || echo "grfcodec")
-NFORENUM := $(shell nforenum -s -v >/dev/null 2>/dev/null && echo "nforenum -s" || echo "nforenum")
+# Old NFORenums don't give an error code when a parameter isn't known, so we have to work around that.
+NFORENUM := $(shell [ `nforenum -s -v 2>/dev/null | wc -l ` -eq 1 ] && echo "nforenum -s" || echo "nforenum")
MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
# Some "should not be changed" settings.