From: Chris Lattner Date: Fri, 20 Mar 2009 05:23:53 +0000 (+0000) Subject: strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71061bfac28f85bcbdc75a63b8be784ffb67d1e3;p=clang strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67365 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Makefile b/lib/Driver/Makefile index 79932799b1..38b11ce8c9 100644 --- a/lib/Driver/Makefile +++ b/lib/Driver/Makefile @@ -12,12 +12,14 @@ LIBRARYNAME := clangDriver BUILD_ARCHIVE = 1 CXXFLAGS = -fno-rtti -SVN_REVISION = $(shell cd $(PROJ_SRC_DIR)/../.. && svnversion) - -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include -DTARGET_TRIPLE='"$(TARGET_TRIPLE)"' -DSVN_REVISION='"$(SVN_REVISION)"' include $(LEVEL)/Makefile.common +SVN_REVISION := $(shell cd $(PROJ_SRC_DIR)/../.. && svnversion) + +CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \ + -DTARGET_TRIPLE='"$(TARGET_TRIPLE)"' -DSVN_REVISION='"$(SVN_REVISION)"' + $(ObjDir)/.ver-svn .ver: @if [ '$(SVN_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\ echo '$(SVN_REVISION)' > $(ObjDir)/.ver-svn; \