[cfe-commits] r108445 - /cfe/trunk/tools/driver/Makefile

Daniel Dunbar daniel at zuster.org
Thu Jul 15 12:33:44 PDT 2010


Author: ddunbar
Date: Thu Jul 15 14:33:44 2010
New Revision: 108445

URL: http://llvm.org/viewvc/llvm-project?rev=108445&view=rev
Log:
build/Darwin: Enable version information for clang executable.

Modified:
    cfe/trunk/tools/driver/Makefile

Modified: cfe/trunk/tools/driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/Makefile?rev=108445&r1=108444&r2=108445&view=diff
==============================================================================
--- cfe/trunk/tools/driver/Makefile (original)
+++ cfe/trunk/tools/driver/Makefile Thu Jul 15 14:33:44 2010
@@ -17,6 +17,9 @@
   endif
 endif
 
+# Include tool version information on OS X.
+TOOL_INFO_PLIST := Info.plist
+
 # Include this here so we can get the configuration of the targets that have
 # been configured for construction. We have to do this early so we can set up
 # LINK_COMPONENTS before including Makefile.rules
@@ -30,6 +33,29 @@
 
 include $(CLANG_LEVEL)/Makefile
 
+# Set the tool version information values.
+ifeq ($(HOST_OS),Darwin)
+ifdef CLANG_VENDOR
+TOOL_INFO_NAME := $(CLANG_VENDOR) clang
+else
+TOOL_INFO_NAME := clang
+endif
+
+ifdef CLANG_VENDOR_UTI
+TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
+else
+TOOL_INFO_UTI := org.llvm.clang
+endif
+
+TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
+	$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
+ifdef LLVM_SUBMIT_VERSION
+TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
+else
+TOOL_INFO_BUILD_VERSION := 
+endif
+endif
+
 # Translate make variable to define when building a "production" clang.
 ifdef CLANG_IS_PRODUCTION
 CPP.Defines += -DCLANG_IS_PRODUCTION





More information about the cfe-commits mailing list