summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-03-05 09:46:45 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-03-05 09:46:45 +0000
commit0c3ed6b04632409046c6d798be9699bd83cff5a4 (patch)
tree7a0854398d1017c9f0b3cee37d3422755957d2f4 /Makefile.rules
parent2f017cb7f3fbbde93f69a47172eeb7244ca269ec (diff)
downloadllvm-0c3ed6b04632409046c6d798be9699bd83cff5a4.tar.gz
llvm-0c3ed6b04632409046c6d798be9699bd83cff5a4.tar.bz2
llvm-0c3ed6b04632409046c6d798be9699bd83cff5a4.tar.xz
Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO).
On mingw and python/w32, lit would not be expected to understand MSYS-style path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index c0a9112c31..01d53f1934 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -719,6 +719,24 @@ BaseNameSources := $(sort $(basename $(Sources)))
ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
+#----------------------------------------------------------
+# For Mingw MSYS bash and Python/w32:
+#
+# $(ECHOPATH) prints DOSish pathstring.
+# ex) $(ECHOPATH) /include/sys/types.h
+# --> C:/mingw/include/sys/types.h
+# built-in "echo" does not transform path to DOSish path.
+#
+# FIXME: It would not be needed when MSYS's python
+# were provided.
+#----------------------------------------------------------
+
+ifeq (-mingw32,$(findstring -mingw32,$(BUILD_TRIPLE)))
+ ECHOPATH := $(Verb)python -c "import sys;print ' '.join(sys.argv[1:])"
+else
+ ECHOPATH := $(Verb)$(ECHO)
+endif
+
###############################################################################
# DIRECTORIES: Handle recursive descent of directory structure
###############################################################################