Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/build
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2008-12-12 21:39:50 +0300
committerRaja R Harinath <harinath@hurrynot.org>2008-12-12 21:39:50 +0300
commit230595303637aa37ffb2b0e908138a40d6d0f03e (patch)
tree6e8faaed49a28bb470b34965cf77e4aeb2ffe05f /mcs/build
parentf1f4f4e87244b6ab2d082d2617e82c15861258ec (diff)
* rules.make (topdir): Don't use $(shell ...).
Reported by Jonathan Chambers. svn path=/trunk/mcs/; revision=121446
Diffstat (limited to 'mcs/build')
-rw-r--r--mcs/build/ChangeLog5
-rw-r--r--mcs/build/rules.make13
2 files changed, 14 insertions, 4 deletions
diff --git a/mcs/build/ChangeLog b/mcs/build/ChangeLog
index 97f85aeb2bd..74da33d08c0 100644
--- a/mcs/build/ChangeLog
+++ b/mcs/build/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-12 Raja R Harinath <harinath@hurrynot.org>
+
+ * rules.make (topdir): Don't use $(shell ...).
+ Reported by Jonathan Chambers.
+
2008-12-10 Atsushi Enomoto <atsushi@ximian.com>
* library.make : enable FIXTURE and TESTNAME on run-test-ondotnet.
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index 2d3d124412a..6ae77550463 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -7,11 +7,16 @@
# If you need to edit this file, that's a bug; email
# peter@newton.cx about it.
-# Some more variables. The leading period in the sed expression prevents
-# thisdir = . from being changed into '..' for the toplevel directory.
+empty :=
+space := $(empty) $(empty)
-dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g')
-topdir := $(dots)
+# given $(thisdir), we compute the path to the top directory
+#
+# split_path = $(filter-out .,$(subst /,$(space),$(1)))
+# make_path = ./$(subst $(space),/,$(1))
+# dotdottify = $(patsubst %,..,$(1))
+# topdir = $(call make_path,$(call dotdottify,$(call split_path,$(thisdir))))
+topdir := ./$(subst $(space),/,$(patsubst %,..,$(filter-out .,$(subst /,$(space),$(thisdir)))))
VERSION = 0.93