forked from OSchip/llvm-project
Reapply r127073(partially): 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. llvm-svn: 127239
This commit is contained in:
parent
2b7eeb2b4b
commit
0b26c3a674
|
@ -719,6 +719,24 @@ BaseNameSources := $(sort $(basename $(Sources)))
|
||||||
ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
|
ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
|
||||||
ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
|
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 -u -c "import sys;print ' '.join(sys.argv[1:])"
|
||||||
|
else
|
||||||
|
ECHOPATH := $(Verb)$(ECHO)
|
||||||
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# DIRECTORIES: Handle recursive descent of directory structure
|
# DIRECTORIES: Handle recursive descent of directory structure
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
|
@ -173,22 +173,24 @@ site.exp: FORCE
|
||||||
|
|
||||||
lit.site.cfg: site.exp
|
lit.site.cfg: site.exp
|
||||||
@echo "Making LLVM 'lit.site.cfg' file..."
|
@echo "Making LLVM 'lit.site.cfg' file..."
|
||||||
@sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
|
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
|
||||||
-e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
|
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
|
||||||
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
|
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
|
||||||
-e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
|
@$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp
|
||||||
-e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
|
@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
|
||||||
$(PROJ_SRC_DIR)/lit.site.cfg.in > $@
|
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
|
||||||
|
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
|
||||||
|
@-rm -f lit.tmp
|
||||||
|
|
||||||
Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
|
Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
|
||||||
@echo "Making LLVM unittest 'lit.site.cfg' file..."
|
@echo "Making LLVM unittest 'lit.site.cfg' file..."
|
||||||
@sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
|
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
|
||||||
-e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
|
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
|
||||||
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
|
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
|
||||||
-e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
|
@$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> unit.tmp
|
||||||
-e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
|
@$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
|
||||||
-e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
|
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
|
||||||
-e "s#@SHLIBDIR@#$(SharedLibDir)#g" \
|
@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
|
||||||
-e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \
|
@$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
|
||||||
$(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
|
@sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
|
||||||
|
@-rm -f unit.tmp
|
||||||
|
|
Loading…
Reference in New Issue