From d163cb70147b9c032c966702532e51ce5a49574a Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 3 Jan 2002 09:34:40 -0500 Subject: [PATCH] expand vars nwo for exists test --- Source/cmElseCommand.cxx | 4 +++- Source/cmIfCommand.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx index c04dbeb4e..984397a39 100644 --- a/Source/cmElseCommand.cxx +++ b/Source/cmElseCommand.cxx @@ -75,7 +75,9 @@ bool cmElseCommand::InitialPass(std::vector const& args) if (args.size() == 2 && (args[0] == "EXISTS")) { - if(cmSystemTools::FileExists(args[1].c_str())) + std::string tmp = args[1]; + m_Makefile->ExpandVariablesInString(tmp); + if(cmSystemTools::FileExists(tmp.c_str())) { f = new cmIfFunctionBlocker(); } diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 83da56f59..b86a7542b 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -136,7 +136,9 @@ bool cmIfCommand::InitialPass(std::vector const& args) if (args.size() == 2 && (args[0] == "EXISTS")) { - if(!cmSystemTools::FileExists(args[1].c_str())) + std::string tmp = args[1]; + m_Makefile->ExpandVariablesInString(tmp); + if(!cmSystemTools::FileExists(tmp.c_str())) { f = new cmIfFunctionBlocker(); }