[llvm-commits] [llvm] r159313 - in /llvm/trunk/test: CMakeLists.txt Makefile lit.cfg lit.site.cfg.in site.exp.in

Chandler Carruth chandlerc at gmail.com
Wed Jun 27 17:16:51 PDT 2012


Author: chandlerc
Date: Wed Jun 27 19:16:51 2012
New Revision: 159313

URL: http://llvm.org/viewvc/llvm-project?rev=159313&view=rev
Log:
Remove 'site.exp' building from both CMake and configure+make.

This is another vestige of the DejaGNU roots. There were FIXMEs in the
lit setup to add a 'lit.site.cfg', which has been around for quite some
time now, so I've properly switched the handling of the 4 things
actually used in site.exp to go through lit.site.cfg now. No more
parsing of the .exp file, one fewer configure-style generated file,
etc., etc.

Removed:
    llvm/trunk/test/site.exp.in
Modified:
    llvm/trunk/test/CMakeLists.txt
    llvm/trunk/test/Makefile
    llvm/trunk/test/lit.cfg
    llvm/trunk/test/lit.site.cfg.in

Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=159313&r1=159312&r2=159313&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Wed Jun 27 19:16:51 2012
@@ -27,10 +27,6 @@
 set(LIT_ARGS "${LLVM_LIT_ARGS}")
 separate_arguments(LIT_ARGS)
 
-configure_file(
-  ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
-  ${CMAKE_CURRENT_BINARY_DIR}/site.exp)
-
 MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
 
 # Configuration-time: See Unit/lit.site.cfg.in

Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=159313&r1=159312&r2=159313&view=diff
==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Wed Jun 27 19:16:51 2012
@@ -107,43 +107,22 @@
 
 FORCE:
 
-site.exp: FORCE
-	@echo 'Making a new site.exp file...'
-	@echo '## Autogenerated by LLVM configuration.' > site.tmp
-	@echo '# Do not edit!' >> site.tmp
-	@echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp
-	@echo 'set TARGETS_TO_BUILD "$(TARGETS_TO_BUILD)"' >> site.tmp
-	@echo 'set llvmshlibdir "$(SharedLibDir)"' >>site.tmp
-	@echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp
-	@echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
-	@echo 'set objroot "$(LLVM_OBJ_ROOT)"' >>site.tmp
-	@echo 'set srcdir "$(LLVM_SRC_ROOT)/test"' >>site.tmp
-	@echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
-	@echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
-	@echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
-	@echo 'set ocamlopt "$(OCAMLOPT) -cc \"$(CXX_FOR_OCAMLOPT)\" -I $(LibDir)/ocaml"' >> site.tmp
-	@echo 'set valgrind "$(VALGRIND)"' >> site.tmp
-	@echo 'set grep "$(GREP)"' >>site.tmp
-	@echo 'set gas "$(GAS)"' >>site.tmp
-	@echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
-	@test ! -f site.exp || \
-	sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
-	@-rm -f site.bak
-	@test ! -f site.exp || mv site.exp site.bak
-	@mv site.tmp site.exp
-
 ifeq ($(DISABLE_ASSERTIONS),1)
 ENABLE_ASSERTIONS=0
 else
 ENABLE_ASSERTIONS=1
 endif
 
-lit.site.cfg: site.exp
+lit.site.cfg: FORCE
 	@echo "Making LLVM 'lit.site.cfg' file..."
-	@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
+	@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g > lit.tmp
+	@$(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=@SHLIBDIR@=$(SharedLibDir)=g >> lit.tmp
+	@$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=g >> lit.tmp
 	@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
+	@$(ECHOPATH) s=@OCAMLOPT@=$(OCAMLOPT) -cc \"$(CXX_FOR_OCAMLOPT)\" -I $(LibDir)/ocaml=g >> lit.tmp
 	@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
 	@$(ECHOPATH) s=@ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp
 	@$(ECHOPATH) s=@TARGETS_TO_BUILD@=$(TARGETS_TO_BUILD)=g >> lit.tmp

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=159313&r1=159312&r2=159313&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Wed Jun 27 19:16:51 2012
@@ -132,18 +132,6 @@
 
 ###
 
-# Load site data from DejaGNU's site.exp.
-import re
-site_exp = {}
-# FIXME: Implement lit.site.cfg.
-for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
-    m = re.match('set ([^ ]+) "(.*)"', line)
-    if m:
-        site_exp[m.group(1)] = m.group(2)
-
-# Provide target_triple for use in XFAIL and XTARGET.
-config.target_triple = site_exp['target_triplet']
-
 # When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
 # triple so we can check it with XFAIL and XTARGET.
 config.target_triple += lit.valgrindTriple
@@ -164,9 +152,10 @@
 else:
   config.substitutions.append( ('%lli', 'lli') )
 
-# Add substitutions.
-for sub in ['link', 'shlibext', 'ocamlopt', 'llvmshlibdir']:
-    config.substitutions.append(('%' + sub, site_exp[sub]))
+# Add site-specific substitutions.
+config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
+config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
+config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
 
 # For each occurrence of an llvm tool name as its own word, replace it
 # with the full path to the build directory holding that tool.  This

Modified: llvm/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.in?rev=159313&r1=159312&r2=159313&view=diff
==============================================================================
--- llvm/trunk/test/lit.site.cfg.in (original)
+++ llvm/trunk/test/lit.site.cfg.in Wed Jun 27 19:16:51 2012
@@ -1,10 +1,14 @@
 ## Autogenerated by LLVM/Clang configuration.
 # Do not edit!
+config.target_triple = "@TARGET_TRIPLE@"
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_shlib_ext = "@SHLIBEXT@"
 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.python_executable = "@PYTHON_EXECUTABLE@"
+config.ocamlopt_executable = "@OCAMLOPT@"
 config.enable_shared = @ENABLE_SHARED@
 config.enable_assertions = @ENABLE_ASSERTIONS@
 config.targets_to_build = "@TARGETS_TO_BUILD@"

Removed: llvm/trunk/test/site.exp.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/site.exp.in?rev=159312&view=auto
==============================================================================
--- llvm/trunk/test/site.exp.in (original)
+++ llvm/trunk/test/site.exp.in (removed)
@@ -1,16 +0,0 @@
-## Autogenerated by LLVM configuration.
-# Do not edit!
-set target_triplet "@TARGET_TRIPLE@"
-set TARGETS_TO_BUILD "@TARGETS_TO_BUILD@"
-set llvmshlibdir "@SHLIBDIR@"
-set llvm_bindings "@LLVM_BINDINGS@"
-set srcroot "@LLVM_SOURCE_DIR@"
-set objroot "@LLVM_BINARY_DIR@"
-set srcdir "@LLVM_SOURCE_DIR@"
-set objdir "@LLVM_BINARY_DIR@"
-set link "@TEST_LINK_CMD@"
-set shlibext "@SHLIBEXT@"
-set ocamlopt "@OCAMLOPT@"
-set valgrind "@VALGRIND@"
-set grep "@GREP@"
-set gas "@AS@"





More information about the llvm-commits mailing list