summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-04-22 09:00:24 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-04-22 09:00:24 +0000
commita729299ab5f088411e0f0029b72accc18a87fe02 (patch)
tree2292e193462654d0e41aa48297430952a132fe6a /Makefile
parent96c42ff9e091ecc4d4cfb2326642213aa5689fd7 (diff)
downloadnetsurf-a729299ab5f088411e0f0029b72accc18a87fe02.tar.gz
netsurf-a729299ab5f088411e0f0029b72accc18a87fe02.tar.bz2
Rudimentary sanitisation of uname -s
svn path=/trunk/netsurf/; revision=12217
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 84d0f075b..7fc7868df 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,11 @@ all: all-program
# In case you don't see anything printed (including the warning), you
# have an up-to-date RISC OS build system. ;-)
HOST := $(shell uname -s)
+
+# Sanitise host
+# TODO: Ideally, we want the equivalent of s/[^A-Za-z0-9]/_/g here
+HOST := $(subst .,_,$(subst -,_,$(subst /,_,$(HOST))))
+
ifeq ($(HOST),)
HOST := riscos
$(warning Build platform determination failed but that's a known problem for RISC OS so we're assuming a native RISC OS build.)