make/common/MakeBase.gmk
changeset 32460 9e9bffb3029a
parent 32344 0b288e0efcfa
child 32553 418e3b5ff477
--- a/make/common/MakeBase.gmk	Wed Jul 05 20:48:33 2017 +0200
+++ b/make/common/MakeBase.gmk	Wed Sep 09 09:36:39 2015 +0200
@@ -41,6 +41,29 @@
 # next make invocation.
 .DELETE_ON_ERROR:
 
+################################################################################
+# Definitions for special characters
+################################################################################
+
+# When calling macros, the spaces between arguments are
+# often semantically important! Sometimes we need to subst
+# spaces and commas, therefore we need the following macros.
+X:=
+SPACE:=$(X) $(X)
+COMMA:=,
+DOLLAR:=$$
+HASH:=\#
+LEFT_PAREN:=(
+RIGHT_PAREN:=)
+SQUOTE:='
+#'
+DQUOTE:="
+#"
+define NEWLINE
+
+
+endef
+
 ##############################
 # Functions
 ##############################
@@ -780,6 +803,14 @@
 endif
 
 ################################################################################
+# Return a string suitable for use after a -classpath option. It will correct and safe to use
+# on all platforms. Arguments are given as space separate classpath entries.
+# param 1 : A space separated list of classpath entries
+# The surrounding strip is needed to keep additional whitespace out
+PathList = \
+  "$(subst $(SPACE),$(PATH_SEP),$(strip $1))"
+
+################################################################################
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , common/MakeBase.gmk))