2 # Common ProjectBuilder-style Postamble.
4 # Wilfredo Sanchez | wsanchez@apple.com
5 # Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
7 # @APPLE_LICENSE_HEADER_START@
9 # Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
10 # Reserved. This file contains Original Code and/or Modifications of
11 # Original Code as defined in and that are subject to the Apple Public
12 # Source License Version 1.1 (the "License"). You may not use this file
13 # except in compliance with the License. Please obtain a copy of the
14 # License at http://www.apple.com/publicsource and read it before using
17 # The Original Code and all software distributed under the License are
18 # distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
20 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
21 # FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
22 # License for the specific language governing rights and limitations
25 # @APPLE_LICENSE_HEADER_END@
28 #########################
29 # Overridding variables #
30 #########################
35 INSTALL_AS_USER = $(Install_User)
36 INSTALL_AS_GROUP = $(Install_Group)
37 INSTALL_PERMISSIONS = $(Install_Program_Mode)
40 # This is a command to let you hard link the product to another name.
42 # AFTER_INSTALL += install-links
44 # $(LINKPRODUCT) $(DSTROOT)$(INSTALLDIR)/othername
46 LINKPRODUCT = $(LN) -f $(DSTROOT)$(INSTALLDIR)/$(notdir $(PRODUCT))
49 # If you set SHELLTOOL, then we know your program is a shell script.
50 # There's no need to compile it, just copy and set permissions.
53 $(PRODUCT): $(SHELLTOOL)
54 $(_v) $(INSTALL_PROGRAM) -c $(SHELLTOOL) $(PRODUCT)
58 # If the user running make is not root, then you can't do chown.
59 # We want to be able to compile as a regular user without having make
60 # stop due to errors in using chown, so we set CHOWN in that case to
63 ifneq ($(shell whoami),root)
68 # PB Makefiles are wierd.
69 # Some some odd reason, RC used to need to set SRCROOT=OBJROOT=SYMROOT and
70 # make clean. That nukes subprojects without .tproj, etc extensions. This
71 # is a bug in PB Makefiles, and the following is a workaround.
73 ifeq ($(SYMROOT),$(SRCROOT))
78 # If we are using shared Makefiles, we should install them with the sources.
80 ifneq ($(wildcard Makefiles),)
81 IMPLICIT_SOURCE_FILES += Makefiles
85 # PB want to add "-S" to its strip commands. I don't think so.
86 # For libraries, that's a good default, otherwise, if we want,
94 OPTIMIZE_BUILD_CFLAGS = $(CC_Optimize)
106 ifneq ($(Install_Source),)
107 $(_v) $(MAKE) installsrc SRCROOT=$(DSTROOT)$(Install_Source)
108 $(_v) $(CHOWN) -R $(INSTALL_AS_USER):$(INSTALL_AS_GROUP) $(DSTROOT)$(Install_Source)
109 $(_v) $(CHMOD) -R -w $(DSTROOT)$(Install_Source)
112 install-man: $(MANFILES)
113 ifneq ($(strip $(MAN0FILES)),)
114 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN0DIR)
115 $(_v) $(INSTALL_FILE) -c $(MAN1FILES) $(DSTROOT)$(MAN0DIR)
117 ifneq ($(strip $(MAN1FILES)),)
118 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN1DIR)
119 $(_v) $(INSTALL_FILE) -c $(MAN1FILES) $(DSTROOT)$(MAN1DIR)
121 ifneq ($(strip $(MAN2FILES)),)
122 $(_v) $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN2DIR)
123 $(_v) $(_v) $(INSTALL_FILE) -c $(MAN2FILES) $(DSTROOT)$(MAN2DIR)
125 ifneq ($(strip $(MAN3FILES)),)
126 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN3DIR)
127 $(_v) $(INSTALL_FILE) -c $(MAN3FILES) $(DSTROOT)$(MAN3DIR)
129 ifneq ($(strip $(MAN4FILES)),)
130 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN4DIR)
131 $(_v) $(INSTALL_FILE) -c $(MAN4FILES) $(DSTROOT)$(MAN4DIR)
133 ifneq ($(strip $(MAN5FILES)),)
134 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN5DIR)
135 $(_v) $(INSTALL_FILE) -c $(MAN5FILES) $(DSTROOT)$(MAN5DIR)
137 ifneq ($(strip $(MAN6FILES)),)
138 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN6DIR)
139 $(_v) $(INSTALL_FILE) -c $(MAN6FILES) $(DSTROOT)$(MAN6DIR)
141 ifneq ($(strip $(MAN7FILES)),)
142 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN7DIR)
143 $(_v) $(INSTALL_FILE) -c $(MAN7FILES) $(DSTROOT)$(MAN7DIR)
145 ifneq ($(strip $(MAN8FILES)),)
146 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN8DIR)
147 $(_v) $(INSTALL_FILE) -c $(MAN8FILES) $(DSTROOT)$(MAN8DIR)
149 ifneq ($(strip $(MAN9FILES)),)
150 $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN9DIR)
151 $(_v) $(INSTALL_FILE) -c $(MAN9FILES) $(DSTROOT)$(MAN9DIR)
158 ifeq ($(PROJTYPE),LIBRARY)
160 # Don't strip all symbols
163 # PB uses this recursively
164 INSTALL_PERMISSIONS = ugo+rX
166 # Create an object file list
168 echo $(OFILES) | $(FMT) -1 > $(OFILE_DIR)/$(NAME).ofileList
169 $(CHMOD) 444 $(OFILE_DIR)/$(NAME).ofileList
177 ifeq ($(PROJECT_TYPE),Framework)
179 # Don't strip all symbols
182 # PB uses this recursively
183 INSTALL_PERMISSIONS = ugo+rX
185 # PB creates this bogus ObjC file ($(DUMMY_SYMBOL_FILE)) and wants to link it
186 # into the framework. We don't want ObjC loading into clients of this framework,
187 # so we filter it our from the $(LOADABLES) list, and remove the info file that
188 # goes with it from the $(OTHER_INFO_FILES) list.
189 LOADABLES := $(patsubst $(DUMMY_SYMBOL).o,,$(LOADABLES))
190 OTHER_INFO_FILES := $(patsubst $(DUMMY_SYMBOL_INFO_FILE),,$(OTHER_INFO_FILES))
198 ifeq ($(PROJECT_TYPE),Loadable Bundle)
200 # Don't strip all symbols
203 # PB uses this recursively
204 INSTALL_PERMISSIONS = ugo+rX