diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-07-15 19:33:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-07-15 19:33:38 +0000 |
commit | 20d256e479052590a7d8b93e9aaad66ab6d8af62 (patch) | |
tree | 9e6d418b23f469dd0857007a11650082e8120286 /Makefile.rules | |
parent | 07538ad975994123317fe5b32daed4bf28683a1d (diff) |
build/Darwin: Add support for embedding version information in tool executables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules index 12582f6f91..8aeb6af11e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1345,6 +1345,27 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) endif endif +#--------------------------------------------------------- +# Tool Version Info Support +#--------------------------------------------------------- + +ifeq ($(HOST_OS),Darwin) +ifdef TOOL_INFO_PLIST + +LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST) + +$(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST) + +$(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in + $(Echo) "Creating $(TOOLNAME) '$(TOOL_INFO_PLIST)' file..." + $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \ + -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \ + -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \ + -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \ + $< > $@ + +endif +endif #--------------------------------------------------------- # Provide targets for building the tools |