open-src/common/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 09 Sep 2011 20:42:44 -0700
changeset 1207 996eb6e88a18
parent 1201 d6ebb7728565
child 1228 47726356aac9
permissions -rw-r--r--
7086641 X package manifests should move to pkgfmt version 2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
     3
# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
# Permission is hereby granted, free of charge, to any person obtaining a
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     6
# copy of this software and associated documentation files (the "Software"),
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     7
# to deal in the Software without restriction, including without limitation
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     8
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     9
# and/or sell copies of the Software, and to permit persons to whom the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    10
# Software is furnished to do so, subject to the following conditions:
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    11
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    12
# The above copyright notice and this permission notice (including the next
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    13
# paragraph) shall be included in all copies or substantial portions of the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    14
# Software.
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    15
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    17
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    18
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    19
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    20
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    21
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    22
# DEALINGS IN THE SOFTWARE.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    26
### Default rules
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    27
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    28
# Which compiler to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    29
MODTYPE_COMPILER_DEFAULT	= $(MODTYPE_COMPILER_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    30
$(MODTYPE_COMPILER_DEFAULT)	MODTYPE_COMPILER = $(DEFAULT_COMPILER)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    31
MODULE_COMPILER_DEFAULT		= $(MODULE_COMPILER_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    32
$(MODULE_COMPILER_DEFAULT)	MODULE_COMPILER = $(MODTYPE_COMPILER)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    34
# Which make to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    35
MODTYPE_MAKE_DEFAULT		= $(MODTYPE_MAKE_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    36
$(MODTYPE_MAKE_DEFAULT)		MODTYPE_MAKE = $(MAKE)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    37
MODULE_MAKE_DEFAULT		= $(MODULE_MAKE_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    38
$(MODULE_MAKE_DEFAULT)		MODULE_MAKE = $(MODTYPE_MAKE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    39
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    40
# Where to install files
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    41
MODTYPE_PREFIX_DEFAULT		= $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN))
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    42
$(MODTYPE_PREFIX_DEFAULT)	MODTYPE_PREFIX=$(X11_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    43
MODULE_PREFIX_DEFAULT		= $(MODULE_PREFIX_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    44
$(MODULE_PREFIX_DEFAULT)	MODULE_PREFIX=$(MODTYPE_PREFIX)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    46
# Where to install documentation files
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    47
MODTYPE_DOC_DIR_DEFAULT		= $(MODTYPE_DOC_DIR_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    48
$(MODTYPE_DOC_DIR_DEFAULT)	MODTYPE_DOC_DIR=$(MODULE_PREFIX)/share/doc/$(MODULE_NAME)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    49
MODULE_DOC_DIR_DEFAULT		= $(MODULE_DOC_DIR_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    50
$(MODULE_DOC_DIR_DEFAULT)	MODULE_DOC_DIR=$(MODTYPE_DOC_DIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    51
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    52
# Where to install pkgconfig files
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    53
MODTYPE_PKGCONFIG_DIR_DEFAULT	= $(MODTYPE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN))
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    54
$(MODTYPE_PKGCONFIG_DIR_DEFAULT) MODTYPE_PKGCONFIG_DIR=$(PKGCONFIG_DIR)
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    55
MODULE_PKGCONFIG_DIR_DEFAULT	= $(MODULE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN))
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    56
$(MODULE_PKGCONFIG_DIR_DEFAULT)	MODULE_PKGCONFIG_DIR=$(MODTYPE_PKGCONFIG_DIR)
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
    57
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    58
# Package files will be delivered in
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    59
MODTYPE_PKGHIER_DEFAULT		= $(MODTYPE_PKGHIER_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    60
$(MODTYPE_PKGHIER_DEFAULT)	MODTYPE_PKGHIER=x11/$(MODTYPE)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    61
MODULE_PKGTAIL_DEFAULT		= $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    62
$(MODULE_PKGTAIL_DEFAULT)	MODULE_PKGTAIL_CMD=print $(MODULE_NAME) | \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    63
						   tr '[:upper:]' '[:lower:]'
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    64
$(MODULE_PKGTAIL_DEFAULT)	MODULE_PKGTAIL=$(MODULE_PKGTAIL_CMD:sh)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    65
MODULE_PKGNAME_DEFAULT		= $(MODULE_PKGNAME_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    66
$(MODULE_PKGNAME_DEFAULT)	MODULE_PKGNAME=$(MODTYPE_PKGHIER)/$(MODULE_PKGTAIL)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    67
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    68
# Package manifest file
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    69
PKG_SRC_DIR			= $(TOP)/pkg
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    70
PKG_MANIFEST_DIR		= $(PKG_SRC_DIR)/manifests
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    71
PKG_LICENSE_DIR			= $(PKG_SRC_DIR)/license_files
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    72
MODULE_PKG_MANIFEST_NAME_CMD	= print $(MODULE_PKGNAME) | tr '/' '-'
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    73
MODULE_PKG_MANIFEST_NAME	= $(MODULE_PKG_MANIFEST_NAME_CMD:sh)
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
    74
MODULE_PKG_MANIFEST = $(PKG_MANIFEST_DIR)/$(MODULE_PKG_MANIFEST_NAME).p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    75
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    76
# Package classification - must be a valid value recognized by pkg gui
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    77
MODULE_PKGCLASS_DEFAULT		= $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    78
$(MODULE_PKGCLASS_DEFAULT)	MODULE_PKGCLASS=System/X11
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    79
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    80
# Directory created by unpacking source, if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    81
SOURCE_DIRNAME_DEFAULT		= $(SOURCE_DIRNAME_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    82
$(SOURCE_DIRNAME_DEFAULT)	SOURCE_DIRNAME=$(MODULE_NAME)-$(MODULE_VERSION)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    83
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
    84
BUILD_DIR_$(BUILD_TYPE) = build-$(BUILD_TYPE)
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    85
# Special cases for 32-bit & 64-bit directory names to allow building
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
    86
# both architectures in the same tree (serially - building both in
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    87
# parallel is likely to have race conditions)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    88
BUILD_DIR_32 = build-$(MACH32)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    89
BUILD_DIR_64 = build-$(MACH64)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    90
BUILD_DIR = $(BUILD_DIR_$(BUILD_TYPE))
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
    91
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    92
SOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME)
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
    93
SOURCE_DIR_32 = $(BUILD_DIR_32)/$(SOURCE_DIRNAME)
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
    94
SOURCE_DIR_64 = $(BUILD_DIR_64)/$(SOURCE_DIRNAME)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    95
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    96
# Set default tarball if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    97
SOURCE_TARBALL_NAME_DEFAULT	= $(SOURCE_TARBALL_NAME_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    98
$(SOURCE_TARBALL_NAME_DEFAULT)	SOURCE_TARBALL_NAME=$(SOURCE_DIRNAME).tar.bz2
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    99
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   100
# Tarballs for most modules built here are found in the X.Org archives/repos
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   101
# in a directory with the same name as what we use in our tree
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   102
SOURCE_TARBALL_DIR_DEFAULT	= $(SOURCE_TARBALL_DIR_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   103
$(SOURCE_TARBALL_DIR_DEFAULT)	SOURCE_TARBALL_DIR=$(MODTYPE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   104
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   105
# Set default download location if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   106
SOURCE_URL_DEFAULT		= $(SOURCE_URL_SET:yes=$(POUND_SIGN))
1123
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   107
$(SOURCE_URL_DEFAULT)		SOURCE_URL=$(SOURCE_URL_$(UPSTREAM_PROJECT))
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   108
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   109
# Set default git repo location if not set in module makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   110
GIT_URL_DEFAULT		= $(GIT_URL_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   111
$(GIT_URL_DEFAULT)	GIT_URL=$(XORG_GIT_URL)/$(SOURCE_TARBALL_DIR)/$(MODULE_NAME).git
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   112
1097
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   113
# Set default build type to 64-bit if not set in module makefile
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
   114
BUILD_TYPES_DEFAULT	= $(BUILD_TYPES_SET:yes=$(POUND_SIGN))
1097
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   115
$(BUILD_TYPES_DEFAULT)	BUILD_TYPES=64
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
   116
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   117
# Set default rules if not set in module/modtype Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   118
SOURCE_TARGETS_DEFAULT		= $(SOURCE_TARGETS_SET:yes=$(POUND_SIGN))
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   119
$(SOURCE_TARGETS_DEFAULT)	SOURCE_TARGETS=$(UNPACK_TARGET) \
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   120
					$(MODTYPE_ADD_SOURCE_TARGETS) \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   121
					$(MODULE_ADD_SOURCE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   122
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   123
CONFIGURE_TARGETS_DEFAULT	= $(CONFIGURE_TARGETS_SET:yes=$(POUND_SIGN))
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   124
$(CONFIGURE_TARGETS_DEFAULT)	CONFIGURE_TARGETS=default_configure \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   125
					$(MODTYPE_ADD_CONFIGURE_TARGETS) \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   126
					$(MODULE_ADD_CONFIGURE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   127
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   128
BUILD_TARGETS_DEFAULT		= $(BUILD_TARGETS_SET:yes=$(POUND_SIGN))
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   129
$(BUILD_TARGETS_DEFAULT)	BUILD_TARGETS=default_build \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   130
					$(MODTYPE_ADD_BUILD_TARGETS) \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   131
					$(MODULE_ADD_BUILD_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   132
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   133
INSTALL_TARGETS_DEFAULT		= $(INSTALL_TARGETS_SET:yes=$(POUND_SIGN))
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   134
$(INSTALL_TARGETS_DEFAULT)	INSTALL_TARGETS=default_install \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   135
					$(MODTYPE_ADD_INSTALL_TARGETS) \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   136
					$(MODULE_ADD_INSTALL_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   137
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   138
# Additional flags to pass to make in 32-bit & 64-bit builds
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   139
BUILD_32_FLAGS= ARCH_FLAGS="$(ARCH32_FLAGS)" \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   140
	$(MODTYPE_BUILD_32_FLAGS) $(MODULE_BUILD_32_FLAGS)
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   141
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   142
BUILD_64_FLAGS= ARCH_FLAGS="$(ARCH64_FLAGS)" \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   143
	$(MODTYPE_BUILD_64_FLAGS) $(MODULE_BUILD_64_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   144
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   145
all: $(BUILD_TYPES:%=build_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   146
all_%: build_%
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   147
1097
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   148
# We always want to clean 32 & 64 bit subdirs, plus any special ones
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   149
# But if we just add clean_32 & clean_64, then make complains when they
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   150
# end up having multiple targets, so we remove them if they're in the list
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   151
# generated from $(BUILD_TYPES)
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   152
CLEAN_RULES_1 = $(BUILD_TYPES:%=clean_%)
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   153
CLEAN_RULES_2 = $(CLEAN_RULES_1:clean_32=)
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   154
CLEAN_RULES_3 = $(CLEAN_RULES_2:clean_64=)
243d7ed7a10c 6991718 Removal of 32-bit X servers [PSARC/2010/382]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1088
diff changeset
   155
CLEAN_RULES =  clean_32 clean_64 $(CLEAN_RULES_3)
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   156
clean: $(CLEAN_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   157
.PARALLEL: $(CLEAN_RULES)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   158
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   159
# Remove directories with both styles of naming
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   160
$(CLEAN_RULES):
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   161
	-rm -rf $(BUILD_DIR_$(@:clean_%=%)) $(@:clean_%=build_%) $(@:clean_%=build-%)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   162
822
2a89ea3c59be 6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   163
# Tell dmake not to remove and create source in parallel
2a89ea3c59be 6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   164
.NOPARALLEL: clean source
2a89ea3c59be 6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   165
.NOPARALLEL: clean_$(BUILD_TYPE) source_$(BUILD_TYPE)
2a89ea3c59be 6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 810
diff changeset
   166
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   167
SOURCE_RULES = $(BUILD_TYPES:%=source_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   168
source: $(SOURCE_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   169
.PARALLEL: $(SOURCE_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   170
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   171
source-gen: $(SOURCE_TARGETS)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   172
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   173
$(SOURCE_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   174
	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:source_%=%)" source-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   175
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   176
CONFIGURE_RULES = $(BUILD_TYPES:%=configure_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   177
configure: $(CONFIGURE_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   178
.PARALLEL: $(CONFIGURE_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   179
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   180
configure-gen: source-gen $(CONFIGURE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   181
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   182
$(CONFIGURE_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   183
	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:configure_%=%)" \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   184
	 $(BUILD_$(@:configure_%=%)_FLAGS) configure-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   185
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   186
BUILD_RULES = $(BUILD_TYPES:%=build_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   187
build: $(BUILD_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   188
.PARALLEL: $(BUILD_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   189
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   190
build-gen: configure-gen $(BUILD_TARGETS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   191
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   192
$(BUILD_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   193
	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:build_%=%)" \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   194
	 $(BUILD_$(@:build_%=%)_FLAGS) build-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   195
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   196
INSTALL_RULES = $(BUILD_TYPES:%=install_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   197
install: $(INSTALL_RULES)
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   198
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   199
install-gen: build-gen $(INSTALL_TARGETS) install_metadata 
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   200
install-gen: install_pkgconfig_uninstalled install_X11_compat_links
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   201
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   202
$(INSTALL_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   203
	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:install_%=%)" \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   204
	 $(BUILD_$(@:install_%=%)_FLAGS) install-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   205
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   206
$(PROTODIR)$(MODULE_DOC_DIR):
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   207
	mkdir -p $@
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   208
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   209
DEBUG_BUILD_FLAGS = BUILD_DEBUG=yes
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   210
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   211
# Allow adding "debug-" prefix to rules like build_32, install, etc.
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   212
debug-%:
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   213
	$(MAKE) $(MAKEFLAGS) $(@:debug-%=%) $(DEBUG_BUILD_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   214
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   215
# Allow debug_XX to run "make all_XX" with debug flags (including without _XX)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   216
debug%:
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   217
	$(MAKE) $(MAKEFLAGS) $(@:debug%=all%) $(DEBUG_BUILD_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   218
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   219
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   220
### Source tarballs & downloading if necessary
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   221
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   222
SOURCE_TARBALL=$(TARBALLDIR)/$(SOURCE_TARBALL_NAME)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   223
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   224
# Allow downloading from local archive/mirror
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   225
# TARBALL_ARCHIVE is now set in Makefile.options
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   226
ARCHIVE_URL=$(TARBALL_ARCHIVE)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME)
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   227
1088
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   228
GIT_CLONE_DIR=$(MODULE_NAME)-git
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   229
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   230
# Download if SOURCE_TARBALL_NAME is not set to NONE and the file either
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   231
# doesn't exist or is empty
705
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   232
# If MODULE_VERSION is git, checkout source from git repo instead of
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   233
# a tarball
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   234
download: $(SOURCE_TARBALL)
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   235
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   236
$(SOURCE_TARBALL): $(TARBALLDIR)
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   237
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   238
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   239
	    if [[ ! -d $(GIT_CLONE_DIR) ]] ; then \
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   240
		$(START_CMD_ECHO) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   241
		$(GIT) clone $(GIT_URL) $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   242
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   243
		    cd $(GIT_CLONE_DIR) && $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   244
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   245
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   246
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   247
	    if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   248
		if [[ ! -z "$(TARBALL_ARCHIVE)" ]] ; then \
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   249
		    URL='$(ARCHIVE_URL)' ; \
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   250
		else \
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   251
		    URL='$(SOURCE_URL)' ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   252
		fi ; \
1061
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   253
		$(START_CMD_ECHO) ; \
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   254
		$(WGET) -O '$(SOURCE_TARBALL)' "$${URL}" || \
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   255
		    ( status=$$? ; rm -f '$(SOURCE_TARBALL)' ; \
017c158a2f25 7010818 make download in the X gate should not leave empty files when it fails
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1056
diff changeset
   256
		      exit $${status} ) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   257
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   258
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   259
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   260
CHECKSUM_TARGET = .checksum_done.$(MODULE_VERSION)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   261
check-checksums: $(CHECKSUM_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   262
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   263
$(CHECKSUM_TARGET): $(SOURCE_TARBALL)
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   264
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   265
	if [[ "$(MODULE_VERSION)" != "git" && \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   266
	      "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   267
	    ACTUAL_MD5="$$(digest -a md5 $(SOURCE_TARBALL))" ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   268
	    if [[ "$${ACTUAL_MD5}" != "${TARBALL_MD5}" ]] ; then \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   269
		print -u2 "ERROR: MD5 sum mismatch on ${SOURCE_TARBALL}\n" \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   270
			"$${ACTUAL_MD5} != ${TARBALL_MD5}" ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   271
		exit 1; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   272
	    fi ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   273
	    ACTUAL_SHA1="$$(digest -a sha1 ${SOURCE_TARBALL})" ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   274
	    if [[ "$${ACTUAL_SHA1}" != "${TARBALL_SHA1}" ]] ; then \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   275
		print -u2 "ERROR: SHA1 sum mismatch on ${SOURCE_TARBALL}\n" \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   276
			"$${ACTUAL_SHA1} != ${TARBALL_SHA1}" ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   277
		exit 1; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   278
	    fi ; \
1179
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   279
	    if [[ -n "${TARBALL_SHA256}" ]] ; then \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   280
		ACTUAL_SHA256="$$(digest -a sha256 ${SOURCE_TARBALL})" ; \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   281
	    	if [[ "$${ACTUAL_SHA256}" != "${TARBALL_SHA256}" ]] ; then \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   282
			print -u2 \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   283
			  "ERROR: SHA256 sum mismatch on ${SOURCE_TARBALL}\n" \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   284
			  "$${ACTUAL_SHA256} !=\n ${TARBALL_SHA256}" ; \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   285
			exit 1; \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   286
	 	fi ; \
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1176
diff changeset
   287
	    fi ; \
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   288
	fi
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   289
	touch $(CHECKSUM_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   290
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   291
clean: clean-checksums
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   292
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   293
clean-checksums:
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   294
	-rm -f .checksum_done.*
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   295
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   296
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   297
# Submit a tarball to the archive
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   298
ARCHIVE_SUBMIT=/ws/x11/tarballs/bin/archive-tarballs
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   299
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   300
archive-tarball:
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   301
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   302
	if [[ "$(MODULE_VERSION)" != "git" && \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   303
	      "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   304
		$(ARCHIVE_SUBMIT) \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   305
		 --modtype='$(SOURCE_TARBALL_DIR)' \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   306
		 --tarball='$(SOURCE_TARBALL_NAME)' \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   307
		 --url='$(SOURCE_URL)' \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   308
		 --md5='$(TARBALL_MD5)' \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   309
		 --sha1='$(TARBALL_SHA1)' ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   310
	fi
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   311
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   312
$(TARBALLDIR):
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   313
	mkdir -p $(TARBALLDIR)
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   314
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   315
# Update a git cloned repo
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   316
git-update:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   317
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   318
	    if [[ -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   319
		cd $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   320
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   321
		    $(GIT) checkout master && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   322
		    $(GIT) fetch && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   323
		    $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   324
		else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   325
		    $(GIT) fetch ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   326
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   327
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   328
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   329
1088
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   330
# Create a local git repo from tarball and patches, to ease generating
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   331
# patches for submission to upstream git or rebasing to new tarballs
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   332
git-import:
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   333
	mkdir $(GIT_CLONE_DIR)
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   334
	cd $(GIT_CLONE_DIR) && git init
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   335
	$(MAKE) BUILD_DIR="$(GIT_CLONE_DIR)" SOURCE_DIR="$(GIT_CLONE_DIR)" \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   336
		ADD_TAR_FLAGS="--strip-components=1" init_source
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   337
	cd $(GIT_CLONE_DIR) && git add . && \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   338
		git commit -a -m 'Initialized from $(SOURCE_TARBALL_NAME)' \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   339
		&& git tag '$(MODULE_NAME)-$(MODULE_VERSION)'
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   340
	@for f in $(SOURCE_PATCHES) ; do \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   341
	    p=$${f%,*} ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   342
	    print '=================' $$p ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   343
	    if head -n 1 $$p | \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   344
	       ggrep -Eq '^From .* Mon Sep 17 00:00:00 2001' ; then \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   345
		(cd $(GIT_CLONE_DIR) ; $(START_CMD_ECHO) ; git am $(PWD)/$$p) ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   346
	    else \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   347
		rm -f $(GIT_CLONE_DIR)/$(PATCHED_TARGET_FILE) ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   348
		$(MAKE) SOURCE_PATCHES="$$f" BUILD_DIR="$(GIT_CLONE_DIR)" \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   349
			SOURCE_DIR="$(GIT_CLONE_DIR)" patched_source ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   350
		printf '%s\n\n' "$${p%.patch}" > git.comments ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   351
	    	gawk '/^--- /		{exit} \
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   352
		      /^diff -/		{exit} \
1088
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   353
		      {print}' $$p >> git.comments ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   354
		(cd $(GIT_CLONE_DIR) ; $(START_CMD_ECHO) ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   355
		 git commit -a --file=$(PWD)/git.comments ) ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   356
		rm git.comments ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   357
	   fi ; \
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   358
	done
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   359
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   360
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   361
### Unpack source and apply patches
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   362
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   363
SOURCE_DEPS = $(SOURCE_TARBALL) $(CHECKSUM_TARGET) \
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   364
	$(MODTYPE_SOURCE_DEPS) $(MODULE_SOURCE_DEPS)
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   365
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   366
# Step 1: Initialize source dir with upstream sources
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   367
# - if there's a tarball, unpack it.
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   368
# - if using a git master, copy it.
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   369
SOURCE_INIT_TARGET_FILE=.source.init.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   370
SOURCE_INIT_TARGET=$(SOURCE_DIR)/$(SOURCE_INIT_TARGET_FILE)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   371
init_source: $(SOURCE_INIT_TARGET)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   372
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   373
$(SOURCE_INIT_TARGET): $(SOURCE_DEPS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   374
	mkdir -p $(BUILD_DIR)
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   375
	@ if [[ "$(SOURCE_TARBALL_NAME)" == "NONE" ]] ; then \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   376
	  $(START_CMD_ECHO); mkdir -p $(SOURCE_DIR) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   377
	else \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   378
	  if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   379
	    SOURCE_CMD='gtar --exclude=.git* -cf - $(GIT_CLONE_DIR)' ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   380
	  else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   381
	    UNCOMP_CMD="$(SOURCE_UNCOMPRESS)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   382
	    SOURCE_CMD="$${UNCOMP_CMD:-bzcat} $(SOURCE_TARBALL)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   383
	  fi ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   384
	  $(START_CMD_ECHO) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   385
	  $${SOURCE_CMD} | \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   386
		gtar --directory="$(BUILD_DIR)" $(ADD_TAR_FLAGS) -xf -  ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   387
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   388
	touch $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   389
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   390
# Step 2: Add in any additional local sources from $(ADDITIONAL_SOURCE_DIR)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   391
# (done after init source to avoid races in directory/file creation)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   392
SOURCE_ADD_TARGET_FILE=.source.add.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   393
SOURCE_ADD_TARGET=$(SOURCE_DIR)/$(SOURCE_ADD_TARGET_FILE)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   394
add_source: $(SOURCE_ADD_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   395
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   396
$(SOURCE_ADD_TARGET): $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   397
	@if [[ "$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   398
	  if [[ ! -x $(LNDIR) ]] ; then \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   399
	    (cd $(TOP)/open-src/util/lndir && $(MAKE) $(MAKEFLAGS) install) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   400
	  fi ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   401
	  $(START_CMD_ECHO) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   402
	  cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   403
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   404
	touch $(SOURCE_ADD_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   405
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   406
# Step 3: Apply any local patches (may be done in parallel to add_source,
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   407
# but must come after init_source is finished)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   408
#
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   409
# SOURCE_PATCHES is a list in the format: filename[,flags]
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   410
# $${p/*,} is ksh93 syntax to remove the comma and everything before it in $p
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   411
# $${p%,*} is ksh93 syntax to remove the comma and everything after it in $p
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   412
PATCHED_TARGET_FILE=.patches.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   413
PATCHED_TARGET=$(SOURCE_DIR)/$(PATCHED_TARGET_FILE)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   414
patched_source: $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   415
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   416
$(PATCHED_TARGET): $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   417
	@ if [[ "$(SOURCE_PATCHES)" != "" ]] ; then \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   418
	    for p in $(SOURCE_PATCHES) x ; do \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   419
	        if [[ "$$p" != "x" ]] ; then \
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   420
		    patch_file="$${p%,*}" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   421
		    if [[ "$$p" =~ "," ]] ; then \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   422
			patch_flags="$${p/*,}" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   423
		    else \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   424
			patch_flags="-p0" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   425
		    fi ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   426
		    ($(START_CMD_ECHO) ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   427
		     gpatch -d $(SOURCE_DIR) $${patch_flags} < "$${patch_file}" ) ; \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   428
		fi ; \
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   429
	    done ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   430
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   431
	touch $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   432
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   433
# Step 4: Apply common Solaris changes to man pages in $(SUNTOUCHED_MANPAGES)
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   434
FIXED_MAN_SUFFIX=mantouch.done
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   435
FIXED_MAN_TARGET=$(SUNTOUCHED_MANPAGES:%=$(SOURCE_DIR)/%.$(FIXED_MAN_SUFFIX))
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   436
fixed_man: $(FIXED_MAN_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   437
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   438
COMMON_SUNTOUCH_MAN_FLAGS  = -a '{Availability, $(MODULE_PKGNAME)}'
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   439
COMMON_SUNTOUCH_MAN_FLAGS += -a '{Interface Stability, $(MODULE_STABILITY)}' 
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   440
COMMON_SUNTOUCH_MAN_FLAGS += -r '{__distroname__, $(DISTRO_NAME)}'
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   441
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   442
DEFAULT_SUNTOUCH_MAN_FLAGS = \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   443
	$(COMMON_SUNTOUCH_MAN_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   444
	$(MODTYPE_SUNTOUCH_MAN_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   445
	$(MODULE_SUNTOUCH_MAN_FLAGS)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   446
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   447
SUNTOUCH_MAN_FLAGS_DEFAULT	= $(SUNTOUCH_MAN_FLAGS_SET:yes=$(POUND_SIGN))
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   448
$(SUNTOUCH_MAN_FLAGS_DEFAULT)	SUNTOUCH_MAN_FLAGS = $(DEFAULT_SUNTOUCH_MAN_FLAGS)
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   449
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   450
$(FIXED_MAN_TARGET): $(PATCHED_TARGET) $(SOURCE_ADD_TARGET)
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   451
	$(PERL) $(TOP)/open-src/common/suntouch-manpages.pl $(SUNTOUCH_MAN_FLAGS) \
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   452
		$(@:%.$(FIXED_MAN_SUFFIX)=%)
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   453
	touch $@
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   454
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   455
# Step 5: Apply common Solaris changes to pkg-config *.pc files listed in
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   456
# $(FIX_PC_FILES)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   457
SOURCE_PC_FILES = $(FIX_PC_FILES:%=$(SOURCE_DIR)/%)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   458
ORIG_PC_FILES = $(SOURCE_PC_FILES:%=%.orig)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   459
FIXED_PC_TARGET = $(ORIG_PC_FILES)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   460
fixed_pc: $(FIXED_PC_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   461
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   462
FIX_PC_OPS= \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   463
	-e 's|-L\$${libdir}|-L\$${libdir} -R\$${libdir}|;' \
965
c096efd79ce7 6962789 Fix a number of library runpath and unneededed linking issues in X gate
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
   464
	-e 's|-R\$${libdir}( .*)? -R\$${libdir}|-R\$${libdir}$$1|g;' \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   465
	$(MODTYPE_FIX_PC_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   466
	$(MODULE_FIX_PC_FLAGS)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   467
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   468
$(ORIG_PC_FILES): $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   469
	$(PERL) -i.orig -p $(FIX_PC_OPS) $(@:.orig=)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   470
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   471
# Tie them all together
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   472
UNPACK_TARGETS = $(SOURCE_INIT_TARGET) $(PATCHED_TARGET) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   473
	$(SOURCE_ADD_TARGET) $(FIXED_MAN_TARGET) $(FIXED_PC_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   474
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   475
default_source: $(UNPACK_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   476
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   477
$(UNPACK_TARGET): $(SOURCE_DEPS) $(UNPACK_TARGETS)
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   478
	touch $(UNPACK_TARGET)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   479
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   480
### Run configure scripts
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   481
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   482
# Include Xorg autoconf macros when rebuilding configure scripts
599
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   483
# and use automake 1.10 instead of the older 1.9.
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   484
ACLOCAL_PATH=/usr/bin/aclocal-1.10
599
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   485
ACLOCAL_INCLUDES = -I $(PROTODIR)$(X11_ACLOCAL_DIR) \
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   486
	-I $(TOOLS_ACLOCAL_DIR) \
1045
8ee6fcfdbd89 7002660 Remove workaround for 6785384 from X build
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   487
	-I /usr/share/aclocal -I /usr/share/aclocal-1.10
599
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   488
AUTOMAKE_PATH=/usr/bin/automake-1.10
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   489
AUTORECONF_ENV= ACLOCAL="$(ACLOCAL_PATH) $(ACLOCAL_INCLUDES)" \
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   490
	AUTOMAKE="$(AUTOMAKE_PATH)"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   491
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   492
# Dependencies for running configure to make a Makefile
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   493
CONFIGURE_DEPS = $(SOURCE_TARGETS) \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   494
	$(MODTYPE_CONFIGURE_DEPS) $(MODULE_CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   495
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   496
# Command line options to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   497
DEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \
1056
7ab8c847a602 7009232 X11R7.6 Update: Documentation modules
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1045
diff changeset
   498
	--without-xmlto --without-asciidoc --without-fop \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   499
	--mandir='$${prefix}/share/man' --localstatedir=/var
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   500
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   501
CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   502
	$(MODTYPE_CONFIG_OPTS) $(MODULE_CONFIG_OPTS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   503
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   504
# Environment variable options to GNU autoconf configure script
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   505
$(USE_DEFAULT_CONFIG_CPPFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_CPPFLAGS= \
494
549ab2aae6ae 6735203 open-src Makefile cleanup & enhancements (fix Studio 11 builds)
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
   506
	-I$(PROTODIR)$(X11_INCLUDES_DIR) \
549ab2aae6ae 6735203 open-src Makefile cleanup & enhancements (fix Studio 11 builds)
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
   507
	-I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   508
$(USE_DEFAULT_CONFIG_LDFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_LDFLAGS= \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   509
	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   510
	-L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 536
diff changeset
   511
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   512
DEFAULT_PKG_CONFIG_PATH=$(TOP)/open-src/common/pc-files/$(BUILD_DIR):$(PROTODIR)$(PKGCONFIG_DIR):$(PROTODIR)$(PKGCONFIG_DIR_SHARE):$(PKGCONFIG_DIR):$(PKGCONFIG_DIR_SHARE)
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   513
1111
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   514
# Most upstream software is written by developers using bash as /bin/sh, so
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   515
# we run configure scripts with that to minimize problems and work around
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   516
# some ksh93 bugs we've hit
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   517
CONFIG_SHELL_DEFAULT		= $(CONFIG_SHELL_SET:yes=$(POUND_SIGN))
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   518
$(CONFIG_SHELL_DEFAULT)		CONFIG_SHELL = /usr/bin/bash
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   519
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   520
# Set USE_DEFAULT_CONFIG_ENV=no in a Makefile to not use this default
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   521
# autoconfig environment
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   522
$(USE_DEFAULT_CONFIG_ENV:no=$(POUND_SIGN))	DEFAULT_CONFIG_ENV = \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   523
    CC="$(CC)" CXX="$(CXX)" \
1176
22a62d074ec1 7073286 freeglut libraries not built with required flags like -xregs=no%appl
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   524
    LD="$(CC) $(ARCH_FLAGS) $(LDFLAGS)" \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   525
    CFLAGS="$(MODTYPE_CFLAGS) $(MODULE_CFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   526
    CXXFLAGS="$(MODTYPE_CXXFLAGS) $(MODULE_CXXFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   527
    CPPFLAGS="$(DEFAULT_CONFIG_CPPFLAGS) $(MODTYPE_CPPFLAGS) $(MODULE_CPPFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   528
    LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   529
    PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
1147
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   530
    PERL="$(PERL)" \
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   531
    PYTHON="$(PYTHON)" PYTHONPATH="$(PYTHON_PATH)" \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   532
    INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
1111
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   533
    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(CONFIG_SHELL)"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   534
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   535
CONFIG_ENV = $(DEFAULT_CONFIG_ENV) $(MODTYPE_CONFIG_ENV) $(MODULE_CONFIG_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   536
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   537
# File created by running configure - defaults to the top-level Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   538
# in a source directory unless AUTOCONF_TARGET_SET=yes is set
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   539
AUTOCONF_TARGET_DEFAULT = $(AUTOCONF_TARGET_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   540
$(AUTOCONF_TARGET_DEFAULT)	AUTOCONF_TARGET=$(SOURCE_DIR)/Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   541
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   542
$(AUTOCONF_TARGET): $(CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   543
	cd $(SOURCE_DIR) ; \
705
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   544
	if [[ "$(AUTORECONF)" = "yes" || "$(MODULE_VERSION)" = "git" ]] ; then \
599
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 591
diff changeset
   545
	     $(AUTORECONF_ENV) autoreconf -v --install --force ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   546
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   547
	chmod a+x configure ; \
1111
582653852b4c 7035299 clean up CONFIG_SHELL in X makefiles
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   548
	$(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(CONFIG_OPTS) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   549
	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
1147
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   550
	    $(PERL) $(TOP)/open-src/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   551
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   552
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   553
default_configure: $(AUTOCONF_TARGET)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   554
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   555
### Default rules for common build pattern
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   556
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   557
LD_OPTIONS = -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   558
	$(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   559
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   560
# MKDIRPROG - Workaround parallel build race condition
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   561
#		in older upstream packaged install-sh
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   562
536
25f17a95d600 6748141 SUNWxwfnt, SUNWxwcft, SUNWxwoft installs fail due to libfont.so.1: open failed
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 494
diff changeset
   563
BUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)' \
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   564
	PROTODIR='$(PROTODIR)' \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   565
	MAKE='$(MODULE_MAKE)' \
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   566
	MKDIRPROG='mkdir -p' \
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   567
	PYTHONPATH="$(PYTHON_PATH)" \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   568
	$(MODTYPE_BUILD_ENV) $(MODULE_BUILD_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   569
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   570
DEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   571
	$(MODTYPE_BUILD_MAKEFLAGS) $(MODULE_BUILD_MAKEFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   572
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   573
# Dependencies for make build step
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   574
BUILD_DEPS = $(SOURCE_TARGETS) $(CONFIGURE_TARGETS) $(MODTYPE_BUILD_DEPS) $(MODULE_BUILD_DEPS) $(MODULE_MAKE)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   575
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   576
DEFAULT_BUILD_COMMAND = cd @DIR@ ; \
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   577
	$(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   578
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   579
default_build: $(BUILD_DEPS)
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   580
	$(DEFAULT_BUILD_COMMAND:@DIR@=$(SOURCE_DIR))
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   581
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   582
build-in-subdir:
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   583
	$(DEFAULT_BUILD_COMMAND:@DIR@=$(subdir)) $(subdir_cmd)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   584
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   585
INSTALL_ENV = $(BUILD_ENV) \
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   586
	INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   587
	$(MODTYPE_INSTALL_ENV) $(MODULE_INSTALL_ENV)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   588
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   589
DEFAULT_INSTALL_MAKEFLAGS= -e DESTDIR=$(PROTODIR) \
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   590
	pkgconfigdir=$(MODULE_PKGCONFIG_DIR) \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   591
	$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   592
	$(MODTYPE_INSTALL_MAKEFLAGS) $(MODULE_INSTALL_MAKEFLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   593
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   594
# Dependencies for make install step
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   595
INSTALL_DEPS = $(BUILD_TARGETS) $(MODTYPE_INSTALL_DEPS) $(MODULE_INSTALL_DEPS)
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   596
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   597
DEFAULT_INSTALL_COMMAND = cd @DIR@ ; \
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1124
diff changeset
   598
	$(INSTALL_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   599
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   600
default_install: $(INSTALL_DEPS)
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   601
	$(DEFAULT_INSTALL_COMMAND:@DIR@=$(SOURCE_DIR)) install
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   602
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   603
install-in-subdir:
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   604
	$(DEFAULT_INSTALL_COMMAND:@DIR@=$(subdir)) $(subdir_cmd) \
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   605
		$(install_subdir_cmd)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   606
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   607
# Adjust paths in pkg-config files for -uninstalled variants used during build
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   608
UNINSTALLED_PC_OPS= \
705
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   609
	-e 'BEGIN {use Cwd; $$protodir=Cwd::realpath("$(PROTODIR)");}' \
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   610
	-e 's|(-[LI]\s*)\$$|$$1$$protodir\$$|g;' \
24ca414edbff 6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
   611
	-e 's|^sdkdir=|sdkdir=$$protodir|g;' \
837
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 822
diff changeset
   612
	-e 's|$$protodir\$${sdkdir}|\$${sdkdir}|g;' \
ee480af8e87c 6896574 Font repackaging and upgrade to X11R7.5 fonts
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 822
diff changeset
   613
	$(MODTYPE_ADD_UNINSTALLED_PC_OPS) $(MODULE_ADD_UNINSTALLED_PC_OPS)
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   614
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   615
INSTALL_PCU_DEPS_DEFAULT	= $(INSTALL_PCU_DEPS_SET:yes=$(POUND_SIGN))
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   616
$(INSTALL_PCU_DEPS_DEFAULT)	INSTALL_PCU_DEPS = $(INSTALL_TARGETS)
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   617
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   618
install_pkgconfig_uninstalled: $(INSTALL_PCU_DEPS)
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   619
	@ if [[ ! -z "$(FIX_PC_FILES)" ]] ; then \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   620
	    cd $(SOURCE_DIR) ; \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   621
	    for pcin in $(FIX_PC_FILES:.in=) ; do \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   622
		pc="$${pcin%%+(.pc|.in)}" ; \
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   623
		pcu="$${pc##*/}-uninstalled.pc" ; \
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   624
		($(START_CMD_ECHO) ; \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   625
		 rm -f $(PROTODIR)$(MODULE_PKGCONFIG_DIR)/$${pcu} ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   626
		 $(PERL) -p $(UNINSTALLED_PC_OPS) $$pc.pc > \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   627
		    $(PROTODIR)$(MODULE_PKGCONFIG_DIR)/$${pcu} ) ; \
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   628
	    done ; \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   629
	fi
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   630
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   631
# Add links if needed from /usr/X11/* to new locations in /usr/*
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   632
X11_BINCOMPAT_DIR = $(PROTODIR)/usr/X11/bin
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   633
X11_BINCOMPAT_LINKS = $(MODULE_X11_BINCOMPAT_LINKS:%=$(X11_BINCOMPAT_DIR)/%)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   634
X11_LIBCOMPAT_DIR = $(PROTODIR)/usr/X11/lib$(ARCHLIBSUBDIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   635
X11_LIBCOMPAT_LINKS = $(MODULE_X11_LIBCOMPAT_LINKS:%=$(X11_LIBCOMPAT_DIR)/%)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   636
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   637
$(X11_BINCOMPAT_DIR) $(X11_LIBCOMPAT_DIR):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   638
	mkdir -p $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   639
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   640
$(X11_BINCOMPAT_LINKS): $(X11_BINCOMPAT_DIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   641
	@rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   642
	ln -s ../../bin/$(@F) $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   643
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   644
$(X11_LIBCOMPAT_LINKS): $(X11_LIBCOMPAT_DIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   645
	@rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   646
	@if [[ -z "$(ARCHLIBSUBDIR)" ]] ; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   647
	    TARGETDIR=../../lib ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   648
	else \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   649
	    TARGETDIR=../../../lib$(ARCHLIBSUBDIR) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   650
	fi ; $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   651
	ln -s $${TARGETDIR}/$(@F) $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   652
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   653
install_X11_compat_links: $(X11_BINCOMPAT_LINKS) $(X11_LIBCOMPAT_LINKS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   654
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   655
# Set comments in ELF binaries to help identify versions/builds
1071
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   656
$(BUILD_DEBUG:yes=)			DEBUG_ELF_COMMENTS=(DEBUG)
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   657
$(BUILD_DEBUG:yes=)			DEBUG_ELF_COMMENTS_FLAGS=-b -B 'hg id'
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   658
$(BUILD_DEBUG:yes=$(POUND_SIGN))	DEBUG_ELF_COMMENTS=
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   659
$(BUILD_DEBUG:yes=$(POUND_SIGN))	DEBUG_ELF_COMMENTS_FLAGS=
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   660
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   661
ELF_COMMENTS = $(MODULE_NAME) $(MODULE_VERSION)
1071
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   662
ELF_COMMENTS += $(DEBUG_ELF_COMMENTS)
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   663
ELF_COMMENTS += $(MODTYPE_ELF_COMMENTS)$(MODULE_ELF_COMMENTS)
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   664
1071
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   665
ELF_COMMENTS_FLAGS = -M '$(ELF_COMMENTS)'
79918bb93075 7019195 stop embedding hg id/tag & build date in mcs information in X
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1061
diff changeset
   666
ELF_COMMENTS_FLAGS += $(DEBUG_ELF_COMMENTS_FLAGS)
994
ebd9341332ef 6975153 libfreetype.so.6 does not contain correct mcs version info
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   667
ELF_COMMENTS_FLAGS += $(MODTYPE_ELF_COMMENTS_FLAGS) $(MODULE_ELF_COMMENTS_FLAGS)
ebd9341332ef 6975153 libfreetype.so.6 does not contain correct mcs version info
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   668
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   669
set-elf-comments: $(BUILD_TARGETS:set-elf-comments=)
1147
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   670
	$(PERL) $(TOP)/open-src/common/set-elf-comments.pl \
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   671
	 $(ELF_COMMENTS_FLAGS) $(SOURCE_DIR)
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   672
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   673
# Help generate templates for package manifests
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   674
DEFAULT_LICENSE=$(PKG_LICENSE_DIR)/cr_Oracle $(PKG_LICENSE_DIR)/lic_X11
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   675
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   676
MANIFEST_DEST=$(PWD)/tmp-proto-$(MACH)
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   677
MANIFEST_TMP=$(PWD)/tmp.p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   678
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   679
MANIFEST_TARGETS_DEFAULT	= $(MANIFEST_TARGETS_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   680
$(MANIFEST_TARGETS_DEFAULT)	MANIFEST_TARGETS=$(MODULE_PKG_MANIFEST)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   681
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   682
manifest: $(MANIFEST_TARGETS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   683
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   684
manifest-per-type: $(MODULE_PKG_MANIFEST)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   685
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   686
MANIFEST_INSTALL_RULES = PROTOTOOLSDIR="$(PROTODIR)" \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   687
	PROTODIR="$(MANIFEST_DEST)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   688
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   689
$(MANIFEST_DEST): install
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   690
	/usr/xpg4/bin/make $(MAKEFLAGS) install $(MANIFEST_INSTALL_RULES) \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   691
		|| (rm -rf $(MANIFEST_DEST) ; exit 1)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   692
1207
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1201
diff changeset
   693
$(MANIFEST_TMP): $(MANIFEST_DEST)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   694
	$(PERL) $(TOP)/open-src/common/pkg-manifest-generate.pl \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   695
		input_manifest='$(MODULE_PKG_MANIFEST)' \
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1162
diff changeset
   696
		exception_manifest='$(PKG_SRC_DIR)/exceptions-validate_pkg.p5m' \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   697
		manifest_license='$(PKG_LICENSE_DIR)/cr_Oracle' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   698
		manifest_license='$(PKG_LICENSE_DIR)/lic_X11' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   699
		pkg_name='$(MODULE_PKGNAME)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   700
		source_dir='$(SOURCE_DIRNAME)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   701
		arch_64='$(ARCH64)' subdir_64='$(SUBDIR64)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   702
		proto_area='$(MANIFEST_DEST)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   703
		pkgfmt='$(PKGFMT)' \
1088
1c99106ccbe0 6983602 Xorg 1.9 integration [PSARC/2011/008]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   704
		version='__version:$(MODULE_NAME)__' \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   705
		> $(MANIFEST_TMP)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   706
	-rm -rf $(MANIFEST_DEST)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   707
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   708
$(MODULE_PKG_MANIFEST): $(MANIFEST_TMP) $(PKG_MANIFEST_DIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   709
	mv -f $(MANIFEST_TMP) $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   710
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   711
$(PKG_MANIFEST_DIR):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   712
	mkdir -p $(PKG_MANIFEST_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   713
1201
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   714
### Doc tools
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   715
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   716
# Convert DocBook/XML to HTML (since Solaris doesn't bundle the xmlto tool
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   717
# used by most upstream code to do this)
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   718
XML_TO_HTML  = /usr/bin/xsltproc --nonet --xinclude
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   719
XML_TO_HTML += --stringparam html.stylesheet $(X11_SGML_DIR)/xorg.css
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   720
XML_TO_HTML += --stringparam current.docid $(@F:.html=)
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   721
XML_TO_HTML += --stringparam collect.xref.targets no
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   722
XML_TO_HTML += --path "$(PROTODIR)$(X11_SGML_DIR) $(MODULE_XML_PATH)"
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   723
XML_TO_HTML += $(TOP)/open-src/doc/xorg-sgml-doctools/xmltohtml.xsl
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   724
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   725
# Convert HTML to text (also normally done by xmlto upstream)
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   726
HTML_TO_TEXT = /usr/bin/w3m -dump -O UTF-8
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   727
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   728
.SUFFIXES: .xml .html .txt
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   729
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   730
.xml.html:
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   731
	$(XML_TO_HTML) $< > $@
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   732
	@ if [[ ! -s $@ ]] ; then print "xml to html failed" ; exit 1 ; fi
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   733
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   734
.html.txt:
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   735
	$(HTML_TO_TEXT) $< > $@
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   736
	@ if [[ ! -s $@ ]] ; then print "html to text failed" ; exit 1 ; fi
d6ebb7728565 6489124 docs needed for Xserver dtrace provider
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
   737
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   738
### Other tools/dependencies needed to build
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   739
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   740
# Some modules (such as FreeType 2) require GNU make
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   741
$(GNUMAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   742
	@print -n "Building with GNU make from $$(whence gmake): "
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   743
	@$(GNUMAKE) --version
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   744
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   745
$(MAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   746
	@print "Building with make from $$(whence $(MAKE))"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   747
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   748
# Some modules use lndir to merge in sources from Sun specific directories
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   749
$(LNDIR):
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   750
	(cd $(TOP)/open-src/util/lndir && $(MAKE) $(MAKEFLAGS) install)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   751
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   752
### Useful rules for maintaining patch sets
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   753
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   754
# regenerate patches against new baseline to reduce messages about hunks
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   755
# having fuzz or offsets when applying patches - new patches will be in new/
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   756
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   757
regen-patches:
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   758
	CUR_LIST=""
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   759
	rm -rf tmp-regen
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   760
	$(MAKE) SOURCE_PATCHES="$(CUR_LIST)" BUILD_DIR=tmp-regen patched_source
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   761
	mkdir -p new
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   762
	for f in $(SOURCE_PATCHES) ; do \
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   763
	    p=$${f%,*} ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   764
	    print '=================' $$p ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   765
	    rm -rf prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   766
	    mv tmp-regen prev ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   767
	    $(MAKE) SOURCE_PATCHES="$${CUR_LIST} $$f" BUILD_DIR=tmp-regen patched_source ; \
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   768
	    find tmp-regen -name '*.orig' -exec rm {} \+ ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   769
	    gawk '/^--- /	{exit} \
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   770
		  /^diff -/	{exit} \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   771
			 	{print}' $$p > new/$$p ; \
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   772
	    LC_COLLATE=C git diff --no-color ./prev ./tmp-regen \
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   773
		| sed -e 's% a/\./prev/$(SOURCE_DIRNAME)/% a/%' -e 's% b/\./tmp-regen/$(SOURCE_DIRNAME)/% b/%' \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   774
		| grep -v '^Common subdirectories:' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   775
		| grep -v '^Only in ' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   776
		>> new/$$p ; \
1124
7bc7e624f965 7042476 Xorg 1.10 & associated module updates [PSARC/2011/214]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1123
diff changeset
   777
	    CUR_LIST="$${CUR_LIST} new/$$p,-p1" ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   778
	done
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   779
	rm -rf tmp-regen
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   780
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   781
# Allows running "make list-patches" to get a list of all patches we
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   782
# currently apply in our builds
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   783
list-patches:
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   784
	@if [[ "$(SOURCE_PATCHES)" != "" ]] ; then \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   785
	    THIS_MODULE="$${PWD##*/open-src/}" ; \
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   786
	    for p in $(SOURCE_PATCHES) x ; do \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   787
		if [[ "$$p" != "x" ]] ; then \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   788
	            print "$${THIS_MODULE}/$${p%,*}" ;  \
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   789
		fi ; \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   790
	    done ; \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   791
	fi
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 599
diff changeset
   792
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   793
### Metadata used in packaging
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   794
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   795
MODULE_PKG_METADATA_DIR	= $(PROTOMETA)/$(MODULE_PKG_MANIFEST_NAME)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   796
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   797
$(MODULE_PKG_METADATA_DIR):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   798
	mkdir -p $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   799
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   800
METADATA_TARGETS = $(MODULE_PKG_METADATA_DIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   801
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   802
# Base URL for ARC cases used in opensolaris.arc_url metadata
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   803
# Set to '$(ARC_URL)' here, resolved by pkgmogrify to the URL
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   804
# set in pkg/Makefile during the package building process
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   805
ARC_URL_BASE = $$(ARC_URL)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   806
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   807
# Metadata about upstream
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   808
UPSTREAM_NONE		= NONE
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   809
UPSTREAM_NONE_SET	= yes
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   810
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   811
UPSTREAM_xorg		= X.Org Foundation
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   812
UPSTREAM_URL_xorg	= http://www.x.org/
1123
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   813
SOURCE_URL_xorg		= $(XORG_RELEASES_URL)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME)
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   814
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   815
UPSTREAM_xcb		= The XCB Project
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   816
UPSTREAM_URL_xcb	= http://xcb.freedesktop.org/
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   817
SOURCE_URL_xcb		= http://xcb.freedesktop.org/dist/$(SOURCE_TARBALL_NAME)
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   818
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   819
UPSTREAM_PROJECT_DEFAULT	= $(UPSTREAM_PROJECT_SET:yes=$(POUND_SIGN))
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   820
$(UPSTREAM_PROJECT_DEFAULT)	UPSTREAM_PROJECT = xorg
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   821
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   822
UPSTREAM_DEFAULT	= $(UPSTREAM_SET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   823
$(UPSTREAM_DEFAULT) UPSTREAM = $(UPSTREAM_$(SOURCE_TARBALL_NAME))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   824
$(UPSTREAM_DEFAULT) UPSTREAM_SET_YET = $(UPSTREAM_$(SOURCE_TARBALL_NAME)_SET)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   825
$(UPSTREAM_DEFAULT) UPSTREAM_NOTFOUND = $(UPSTREAM_SET_YET:yes=$(POUND_SIGN))
1123
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   826
$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM = $(UPSTREAM_$(UPSTREAM_PROJECT))
4678f8c1d429 7042918 Update xcb-util to version 0.3.8 [PSARC/2011/215]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1111
diff changeset
   827
$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM_URL = $(UPSTREAM_URL_$(UPSTREAM_PROJECT))
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   828
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   829
## Attributes files
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   830
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   831
ATTRDATA_FILE_NAME	= attributes_$(MODULE_NAME).p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   832
ATTRDATA_FILE		= $(MODULE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   833
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   834
METADATA_TARGETS += $(ATTRDATA_FILE)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   835
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   836
# $${MODVERS//\.+(0)(\d)/.\2} - ksh93 pattern substitution to remove leading
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   837
# 0's from package version number components, to meet pkg(5) fmri requirements
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   838
%/$(ATTRDATA_FILE_NAME): %
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   839
	-rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   840
	@if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   841
	    $(START_CMD_ECHO) ; \
1162
9045745b7172 7062962 X pkg attribute name changes underscored by desire for consistency
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   842
	    print 'set name=info.source-url value="$(SOURCE_URL)"' >> $@ ; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   843
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   844
	@if [[ "$(UPSTREAM)" != "NONE" ]] ; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   845
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   846
	    print 'set name=info.upstream value="$(UPSTREAM)"' >> $@ ; \
1162
9045745b7172 7062962 X pkg attribute name changes underscored by desire for consistency
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   847
	    print 'set name=info.upstream-url value="$(UPSTREAM_URL)"' >> $@ ; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   848
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   849
	@if [[ ! -z "$(MODULE_ARC_CASES)" ]] ; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   850
	    $(START_CMD_ECHO) ; \
1162
9045745b7172 7062962 X pkg attribute name changes underscored by desire for consistency
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   851
	    print 'set name=org.opensolaris.arc-caseid' \
9045745b7172 7062962 X pkg attribute name changes underscored by desire for consistency
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   852
		'$(MODULE_ARC_CASES:%=value="%")' >> $@ ;  \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   853
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   854
	@if [[ ! -z "$(MODULE_PKGCLASS)" ]] ; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   855
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   856
	    print 'set name=info.classification' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   857
		'value="org.opensolaris.category.2008:$(MODULE_PKGCLASS)"' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   858
		>> $@ ;  \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   859
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   860
	@ MODVERS="$(MODULE_VERSION)" ; $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   861
	printf '<transform set -> edit value __version:$(MODULE_NAME)__ %s>\n' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   862
	       "$${MODVERS//\.+(0)(\d)/.\2}" >> $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   863
	$(MODTYPE_ATTRDATA_COMMANDS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   864
	$(MODULE_ATTRDATA_COMMANDS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   865
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   866
## License files
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   867
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   868
# Default license file name is COPYING (X.Org & GNU autoconf default)
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   869
# For other license file names, set LICENSE_FILE to the file name
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   870
# and set LICENSE_FILE_SET=yes
387
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   871
# A file in the same directory as the Makefile takes precedence
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   872
# over one that is delivered in the package.
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   873
LICENSE_FILE_DEFAULT	= $(LICENSE_FILE_SET:yes=$(POUND_SIGN))
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   874
$(LICENSE_FILE_DEFAULT)	LICENSE_FILE=COPYING
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   875
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   876
# Default is the MIT/X11 license
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   877
MIT_LICENSE_NAME = MIT License ($(MODULE_NAME))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   878
MIT_LICENSE_FILE = $(PKG_SRC_DIR)/license_files/lic_X11
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   879
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   880
MODULE_LICENSE_DEFAULT		= $(MODULE_LICENSE_SET:yes=$(POUND_SIGN))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   881
$(MODULE_LICENSE_DEFAULT)	MODULE_LICENSE = $(MIT_LICENSE_NAME)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   882
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   883
# Some packages contain only code that Oracle owns all the rights to.
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   884
# For these, Makefile.options.oracle.com chooses to omit the license
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   885
# notice when Oracle is building its distros.   Everyone else gets the
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   886
# notice required by open source license Oracle released the code under.
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   887
LICENSE_CHOICE_DEFAULT		= $(LICENSE_CHOICE_SET:yes=$(POUND_SIGN))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   888
$(LICENSE_CHOICE_DEFAULT)	LICENSE_CHOICE=open
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   889
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   890
ORACLE_LICENSE_NAME_open	= $(MIT_LICENSE_NAME)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   891
ORACLE_LICENSE_APPEND_open	= $(MIT_LICENSE_FILE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   892
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   893
ORACLE_LICENSE_NAME_Oracle	= Oracle Copyright Notice ($(MODULE_NAME))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   894
ORACLE_LICENSE_APPEND_Oracle 	= # Nothing to append to copyright notice
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   895
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   896
ORACLE_LICENSE_NAME 		= $(ORACLE_LICENSE_NAME_$(LICENSE_CHOICE))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   897
ORACLE_LICENSE_PREPEND	 	= # Nothing to prepend to copyright notice
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   898
ORACLE_LICENSE_APPEND		= $(ORACLE_LICENSE_APPEND_$(LICENSE_CHOICE))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   899
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   900
# Use default license info unless MODULE_LICENSE = "Oracle"
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   901
LICENSE_NAME			= $(MODULE_LICENSE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   902
LICENSE_PREPEND 		= $(MODULE_LICENSE_PREPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   903
LICENSE_APPEND 			= $(MODULE_LICENSE_APPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   904
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   905
LICENSE_OVERRIDE_1		= $(POUND_SIGN)$(MODULE_LICENSE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   906
LICENSE_OVERRIDE		= $(LICENSE_OVERRIDE_1:$(POUND_SIGN)Oracle%=)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   907
$(LICENSE_OVERRIDE)		LICENSE_NAME = $(ORACLE_LICENSE_NAME)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   908
$(LICENSE_OVERRIDE)		LICENSE_PREPEND = $(ORACLE_LICENSE_PREPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   909
$(LICENSE_OVERRIDE)		LICENSE_APPEND = $(ORACLE_LICENSE_APPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   910
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   911
LICENSE_FILE_NAME = license_$(MODULE_NAME)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   912
LICENSE_FILE_DEST = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   913
LICENSE_ATTR_FILE = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME).p5m
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   914
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   915
install_license: $(LICENSE_FILE_DEST)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   916
METADATA_TARGETS += $(LICENSE_FILE_DEST)
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   917
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   918
%/$(LICENSE_FILE_NAME): % $(SOURCE_TARGETS)
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   919
	@ $(START_CMD_ECHO) ; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   920
	if [[ -f "$(LICENSE_FILE)" ]] ; then \
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   921
	    license_to_copy="$(LICENSE_FILE)" ; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   922
	elif [[ -f "$(SOURCE_DIR)/$(LICENSE_FILE)" ]] ; then \
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   923
	    license_to_copy="$(SOURCE_DIR)/$(LICENSE_FILE)" ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   924
	fi ; \
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   925
	if [[ -n "$${license_to_copy}" ]] ; then \
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   926
	    cat $(LICENSE_PREPEND) "$${license_to_copy}" $(LICENSE_APPEND) > "$@" ; \
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1097
diff changeset
   927
	    print 'license $(LICENSE_FILE_NAME) license="$(LICENSE_NAME)"' > "[email protected]" ; \
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 354
diff changeset
   928
	fi
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   929
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   930
install_metadata: $(METADATA_TARGETS)