[cfe-commits] r127284 - /cfe/trunk/test/Makefile

NAKAMURA Takumi geek4civic at gmail.com
Tue Mar 8 14:17:40 PST 2011


Author: chapuni
Date: Tue Mar  8 16:17:40 2011
New Revision: 127284

URL: http://llvm.org/viewvc/llvm-project?rev=127284&view=rev
Log:
test/Makefile: Reapply r127079, use $(ECHOPATH) to make lit.site.cfg(s).

Modified:
    cfe/trunk/test/Makefile

Modified: cfe/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Makefile?rev=127284&r1=127283&r2=127284&view=diff
==============================================================================
--- cfe/trunk/test/Makefile (original)
+++ cfe/trunk/test/Makefile Tue Mar  8 16:17:40 2011
@@ -38,30 +38,32 @@
 
 lit.site.cfg: FORCE
 	@echo "Making Clang 'lit.site.cfg' file..."
-	@sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
-	     -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
-	     -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
-	     -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \
-	     -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \
-	     -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \
-	     -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
-	     $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
+	@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
+	@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
+	@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
+	@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
+	@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
+	@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
+	@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
+	@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
+	@-rm -f lit.tmp
 
 Unit/lit.site.cfg: FORCE
 	@echo "Making Clang 'Unit/lit.site.cfg' file..."
 	@$(MKDIR) $(dir $@)
-	@sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
-	     -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
-	     -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
-	     -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \
-	     -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \
-	     -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \
-	     -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
-	     -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
-	     -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
-	     -e "s#@SHLIBDIR@#$(SharedLibDir)#g" \
-	     -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \
-	     $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
+	@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
+	@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> unit.tmp
+	@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> unit.tmp
+	@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
+	@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
+	@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
+	@sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
+	@-rm -f unit.tmp
 
 clean::
 	@ find . -name Output | xargs rm -fr





More information about the cfe-commits mailing list