Use quotes properly so that the possibility of a null variable set is
authorReid Spencer <rspencer@reidspencer.com>
Thu, 13 Apr 2006 20:33:59 +0000 (20:33 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 13 Apr 2006 20:33:59 +0000 (20:33 +0000)
eliminated. This can happen, for example, if LLVM is configured without
llvm-gcc in which case things like LLVMGCC_VERSION will be empty. In
such cases, deja-gnu fails with:
can't read "llvmgcc_version": no such variable
because it sees:
set llvmgcc_version
instead of:
set llvmgcc_version ""

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27676 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile

index ab43cff5fce834b9150f85772237c9eb093beb74..4529619536633bb326a3efb6a111034226c365a8 100644 (file)
@@ -40,11 +40,11 @@ site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config
        @echo '## these variables are automatically generated by make ##' >site.tmp
        @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
        @echo '# edit the last section' >>site.tmp
-       @echo "set target_triplet $(TARGET_TRIPLE)" >> site.tmp
-       @echo "set llvmgcc_version $(LLVMGCC_VERSION)" >> site.tmp
+       @echo 'set target_triplet "$(TARGET_TRIPLE)"' >> site.tmp
+       @echo 'set llvmgcc_version "$(LLVMGCC_VERSION)"' >> site.tmp
        @echo 'set prcontext "$(TCLSH) $(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl"' >> site.tmp
-       @echo 'set srcdir $(LLVM_SRC_ROOT)/test' >>site.tmp
-       @echo "set objdir $(LLVM_OBJ_ROOT)/test" >>site.tmp
+       @echo 'set srcdir "$(LLVM_SRC_ROOT)/test"' >>site.tmp
+       @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
        @echo 'set llvmgcc "PATH=\"$(LLVMToolDir):$(PATH)\" \"$(LLVMGCC)\""' >> site.tmp
        @echo 'set llvmgxx "PATH=\"$(LLVMToolDir):$(PATH)\" \"$(LLVMGCC)\""' >> site.tmp
        @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp