From 0c3ed6b04632409046c6d798be9699bd83cff5a4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 5 Mar 2011 09:46:45 +0000 Subject: 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 --- Makefile.rules | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Makefile.rules') 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 ############################################################################### -- cgit v1.2.3