2 # Makefile for Apple Release Control (GNU source projects)
4 # Wilfredo Sanchez | wsanchez@apple.com
5 # Copyright (c) 1997-1999 Apple Computer, Inc.
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@
27 # Set these variables as needed, then include this file, then:
29 # Install_Prefix [ $(USRDIR) ]
30 # Install_Man [ $(MANDIR) ]
31 # Install_Info [ $(SHAREDIR)/info ]
32 # Install_HTML [ <depends> ]
33 # Install_Source [ $(NSSOURCEDIR)/Commands/$(ProjectName) ]
34 # Configure [ $(Sources)/configure ]
35 # Extra_Configure_Flags
37 # Passed_Targets [ check ]
39 # Additional variables inherited from ReleaseControl/Common.make
42 ifndef CoreOSMakefiles
43 CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
46 Passed_Targets += check
48 include $(CoreOSMakefiles)/ReleaseControl/Common.make
54 Sources = $(SRCROOT)/$(Project)
55 ConfigStamp = $(BuildDirectory)/configure-stamp
57 Workaround_3678855 = /BogusHTMLInstallationDir
60 Install_Prefix = $(USRDIR)
63 Install_Man = $(MANDIR)
66 Install_Info = $(SHAREDIR)/info
69 ifeq "$(UserType)" "Developer"
70 Install_HTML = $(Workaround_3678855)
72 Install_HTML = $(NSDOCUMENTATIONDIR)/$(ToolType)/$(ProjectName)
76 Install_Source = $(NSSOURCEDIR)/$(ToolType)/$(ProjectName)
79 RC_Install_Prefix = $(DSTROOT)$(Install_Prefix)
80 RC_Install_Man = $(DSTROOT)$(Install_Man)
81 RC_Install_Info = $(DSTROOT)$(Install_Info)
82 RC_Install_HTML = $(DSTROOT)$(Install_HTML)
83 ifneq ($(Install_Source),)
84 RC_Install_Source = $(DSTROOT)$(Install_Source)
88 Configure = $(Sources)/configure
91 Environment += TEXI2HTML="$(TEXI2HTML) -subdir ."
93 Configure_Flags = --prefix="$(Install_Prefix)" \
94 --mandir="$(Install_Man)" \
95 --infodir="$(Install_Info)" \
96 $(Extra_Configure_Flags)
98 Install_Flags = prefix="$(RC_Install_Prefix)" \
99 mandir="$(RC_Install_Man)" \
100 infodir="$(RC_Install_Info)" \
101 htmldir="$(RC_Install_HTML)" \
102 $(Extra_Install_Flags)
104 Install_Target = install-strip
110 .PHONY: configure almostclean
113 ifneq ($(GnuNoInstall),YES)
114 @echo "Installing $(Project)..."
115 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $(Install_Flags) $(Install_Target)
116 $(_v) $(FIND) $(DSTROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
117 $(_v) $(FIND) $(SYMROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
118 ifneq ($(GnuNoChown),YES)
119 $(_v)- $(CHOWN) -R $(Install_User):$(Install_Group) $(DSTROOT) $(SYMROOT)
122 ifdef GnuAfterInstall
123 $(_v) $(MAKE) $(GnuAfterInstall)
125 $(_v) if [ -d "$(DSTROOT)$(Workaround_3678855)" ]; then \
126 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SYSTEM_DEVELOPER_TOOLS_DOC_DIR)"; \
127 $(MV) "$(DSTROOT)$(Workaround_3678855)" \
128 "$(DSTROOT)$(SYSTEM_DEVELOPER_TOOLS_DOC_DIR)/$(ProjectName)"; \
132 ifneq ($(GnuNoBuild),YES)
133 @echo "Building $(Project)..."
134 $(_v) $(MAKE) -C $(BuildDirectory) $(Environment)
137 configure:: lazy_install_source $(ConfigStamp)
140 $(_v) $(RM) $(ConfigStamp)
141 $(_v) $(MAKE) configure
144 ifneq ($(GnuNoConfigure),YES)
145 @echo "Configuring $(Project)..."
146 $(_v) $(MKDIR) $(BuildDirectory)
147 $(_v) cd $(BuildDirectory) && $(Environment) $(Configure) $(Configure_Flags)
152 ifneq ($(GnuNoClean),YES)
153 @echo "Cleaning $(Project)..."
154 $(_v) $(MAKE) -C $(BuildDirectory) clean