]> git.saurik.com Git - apple/coreosmakefiles.git/blame - ReleaseControl/GNUSource.make
CoreOSMakefiles-18.tar.gz
[apple/coreosmakefiles.git] / ReleaseControl / GNUSource.make
CommitLineData
fdbff003
A
1##
2# Makefile for Apple Release Control (GNU source projects)
3#
4# Wilfredo Sanchez | wsanchez@apple.com
5# Copyright (c) 1997-1999 Apple Computer, Inc.
6#
7# @APPLE_LICENSE_HEADER_START@
8#
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
15# this file.
16#
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
23# under the License.
24#
25# @APPLE_LICENSE_HEADER_END@
26##
27# Set these variables as needed, then include this file, then:
28#
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
36# Extra_Install_Flags
37# Passed_Targets [ check ]
38#
39# Additional variables inherited from ReleaseControl/Common.make
40##
41
42ifndef CoreOSMakefiles
43CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
44endif
45
46Passed_Targets += check
47
48include $(CoreOSMakefiles)/ReleaseControl/Common.make
49
50##
51# My variables
52##
53
54Sources = $(SRCROOT)/$(Project)
55ConfigStamp = $(BuildDirectory)/configure-stamp
56
57ifndef Install_Prefix
58Install_Prefix = $(USRDIR)
59endif
60ifndef Install_Man
61Install_Man = $(MANDIR)
62endif
63ifndef Install_Info
64Install_Info = $(SHAREDIR)/info
65endif
66ifndef Install_HTML
67ifeq "$(UserType)" "Developer"
68Install_HTML = $(NSDEVELOPERDIR)/Documentation/$(ToolType)/$(ProjectName)
69else
70Install_HTML = $(NSDOCUMENTATIONDIR)/$(ToolType)/$(ProjectName)
71endif
72endif
73ifndef Install_Source
74Install_Source = $(NSSOURCEDIR)/$(ToolType)/$(ProjectName)
75endif
76
77RC_Install_Prefix = $(DSTROOT)$(Install_Prefix)
78RC_Install_Man = $(DSTROOT)$(Install_Man)
79RC_Install_Info = $(DSTROOT)$(Install_Info)
80RC_Install_HTML = $(DSTROOT)$(Install_HTML)
81ifneq ($(Install_Source),)
82RC_Install_Source = $(DSTROOT)$(Install_Source)
83endif
84
85ifndef Configure
86Configure = $(Sources)/configure
87endif
88
89Environment += TEXI2HTML="$(TEXI2HTML) -subdir ."
90
91Configure_Flags = --prefix="$(Install_Prefix)" \
92 --mandir="$(Install_Man)" \
93 --infodir="$(Install_Info)" \
94 $(Extra_Configure_Flags)
95
96Install_Flags = prefix="$(RC_Install_Prefix)" \
97 mandir="$(RC_Install_Man)" \
98 infodir="$(RC_Install_Info)" \
99 htmldir="$(RC_Install_HTML)" \
100 $(Extra_Install_Flags)
101
102Install_Target = install-strip
103
104##
105# Targets
106##
107
108.PHONY: configure almostclean
109
110install:: build
111ifneq ($(GnuNoInstall),YES)
112 @echo "Installing $(Project)..."
113 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $(Install_Flags) $(Install_Target)
114 $(_v) $(FIND) $(DSTROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
115 $(_v) $(FIND) $(SYMROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
116ifneq ($(GnuNoChown),YES)
117 $(_v)- $(CHOWN) -R $(Install_User).$(Install_Group) $(DSTROOT) $(SYMROOT)
118endif
119endif
120ifdef GnuAfterInstall
121 $(_v) $(MAKE) $(GnuAfterInstall)
122endif
123
124build:: configure
125ifneq ($(GnuNoBuild),YES)
126 @echo "Building $(Project)..."
127 $(_v) $(MAKE) -C $(BuildDirectory) $(Environment)
128endif
129
130configure:: lazy_install_source $(ConfigStamp)
131
132reconfigure::
133 $(_v) $(RM) $(ConfigStamp)
134 $(_v) $(MAKE) configure
135
136$(ConfigStamp):
137ifneq ($(GnuNoConfigure),YES)
138 @echo "Configuring $(Project)..."
139 $(_v) $(MKDIR) $(BuildDirectory)
140 $(_v) cd $(BuildDirectory) && $(Environment) $(Configure) $(Configure_Flags)
141endif
142 $(_v) touch $@
143
144almostclean::
145ifneq ($(GnuNoClean),YES)
146 @echo "Cleaning $(Project)..."
147 $(_v) $(MAKE) -C $(BuildDirectory) clean
148endif