llvm.org GIT mirror llvm / 7cefa64
Revert r127073: "Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO)." It broke the llvm-gcc-native-mingw32 buildbot, and we need all of them to be green for the 2.9 branch. Takumi, please reapply after we branch, preferably with a fix ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127107 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 8 years ago
3 changed file(s) with 20 addition(s) and 41 deletion(s). Raw diff Collapse all Expand all
717717
718718 ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
719719 ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
720
721 #----------------------------------------------------------
722 # For Mingw MSYS bash and Python/w32:
723 #
724 # $(ECHOPATH) prints DOSish pathstring.
725 # ex) $(ECHOPATH) /include/sys/types.h
726 # --> C:/mingw/include/sys/types.h
727 # built-in "echo" does not transform path to DOSish path.
728 #
729 # FIXME: It would not be needed when MSYS's python
730 # were provided.
731 #----------------------------------------------------------
732
733 ifeq (-mingw32,$(findstring -mingw32,$(BUILD_TRIPLE)))
734 ECHOPATH := $(Verb)python -c "import sys;print ' '.join(sys.argv[1:])"
735 else
736 ECHOPATH := $(Verb)$(ECHO)
737 endif
738720
739721 ###############################################################################
740722 # DIRECTORIES: Handle recursive descent of directory structure
172172
173173 lit.site.cfg: site.exp
174174 @echo "Making LLVM 'lit.site.cfg' file..."
175 @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
176 @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
177 @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
178 @$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp
179 @$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
180 @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
181 @sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
182 @-rm -f lit.tmp
175 @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
176 -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
177 -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
178 -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
179 -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
180 $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
183181
184182 Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
185183 @echo "Making LLVM unittest 'lit.site.cfg' file..."
186 @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
187 @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
188 @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
189 @$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> unit.tmp
190 @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
191 @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
192 @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
193 @$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
194 @sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
195 @-rm -f unit.tmp
184 @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
185 -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
186 -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
187 -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
188 -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
189 -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
190 -e "s#@SHLIBDIR@#$(SharedLibDir)#g" \
191 -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \
192 $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
193
1212
1313 all:: $(ToolDir)/llvm-lit
1414
15 $(ToolDir)/llvm-lit: llvm-lit.in Makefile $(ToolDir)/.dir
15 $(ToolDir)/llvm-lit: llvm-lit.in $(ToolDir)/.dir
1616 $(Echo) "Creating 'llvm-lit' script..."
17 $(Verb)$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
18 $(Verb)$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
19 $(Verb)sed -f lit.tmp $< > $@
17 $(Verb)sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
18 -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
19 $< > $@
2020 $(Verb)chmod +x $@
21 $(Verb)rm -f lit.tmp