diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 07:38:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 07:38:33 +0000 |
commit | fb76ffbaebfb9631b03bb445401d2c6572306afb (patch) | |
tree | b03cf60c5638c82b2c964f861e4886ac68c7bbda | |
parent | 4473c2d0ff4a979038bb57421cf68c50724dcbf2 (diff) |
Generate lit.site.cfg from a .in file, as clang does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82533 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Makefile | 13 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 9 |
2 files changed, 14 insertions, 8 deletions
diff --git a/test/Makefile b/test/Makefile index db85dda54f..6c931e3cef 100644 --- a/test/Makefile +++ b/test/Makefile @@ -190,14 +190,11 @@ site.exp: FORCE lit.site.cfg: site.exp @echo "Making LLVM 'lit.site.cfg' file..." - @echo "## Autogenerated by Makefile ##" > $@ - @echo "# Do not edit!" >> $@ - @echo >> $@ - @echo "# Preserve some key paths for use by main LLVM test suite config." >> $@ - @echo "config.llvm_obj_root = \"\"\"$(LLVM_OBJ_ROOT)\"\"\"" >> $@ - @echo >> $@ - @echo "# Let the main config do the real work." >> $@ - @echo "lit.load_config(config, \"\"\"$(LLVM_SRC_ROOT)/test/lit.cfg\"\"\")" >> $@ + @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#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ + $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ Unit/lit.site.cfg: Unit/.dir FORCE @echo "Making LLVM unittest 'lit.site.cfg' file..." diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in new file mode 100644 index 0000000000..88699e3e76 --- /dev/null +++ b/test/lit.site.cfg.in @@ -0,0 +1,9 @@ +## Autogenerated by LLVM/Clang configuration. +# Do not edit! +config.llvm_src_root = "@LLVM_SOURCE_DIR@" +config.llvm_obj_root = "@LLVM_BINARY_DIR@" +config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" +config.llvmgcc_dir = "@LLVMGCCDIR@" + +# Let the main config do the real work. +lit.load_config(config, "@LLVM_SOURCE_DIR@/test/lit.cfg") |