strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times.

llvm-svn: 67365
This commit is contained in:
Chris Lattner 2009-03-20 05:23:53 +00:00
parent f0db9b6321
commit 03b886e301
1 changed files with 5 additions and 3 deletions

View File

@ -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; \