open-src/common/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed, 24 Nov 2010 14:28:13 -0800
changeset 1045 8ee6fcfdbd89
parent 1003 a4d17d6bc179
child 1056 7ab8c847a602
permissions -rw-r--r--
7002660 Remove workaround for 6785384 from X build
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
#
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
     3
# Copyright (c) 2002, 2010, 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)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
    74
MODULE_PKG_MANIFEST = $(PKG_MANIFEST_DIR)/$(MODULE_PKG_MANIFEST_NAME).mf
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))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   107
$(SOURCE_URL_DEFAULT)		SOURCE_URL=$(XORG_RELEASES_URL)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME)
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
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
   113
# Set default build type to 32-bit if not set in module makefile
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))
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
   115
$(BUILD_TYPES_DEFAULT)	BUILD_TYPES=32
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
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   148
CLEAN_RULES = $(BUILD_TYPES:%=clean_%)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   149
clean: $(CLEAN_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   150
.PARALLEL: $(CLEAN_RULES)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   151
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   152
# 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
   153
$(CLEAN_RULES):
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   154
	-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
   155
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
   156
# 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
   157
.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
   158
.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
   159
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   160
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
   161
source: $(SOURCE_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   162
.PARALLEL: $(SOURCE_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   163
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   164
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
   165
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   166
$(SOURCE_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   167
	$(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
   168
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   169
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
   170
configure: $(CONFIGURE_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   171
.PARALLEL: $(CONFIGURE_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   172
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   173
configure-gen: source-gen $(CONFIGURE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   174
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   175
$(CONFIGURE_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   176
	$(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
   177
	 $(BUILD_$(@:configure_%=%)_FLAGS) configure-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   178
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   179
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
   180
build: $(BUILD_RULES)
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   181
.PARALLEL: $(BUILD_RULES)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   182
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   183
build-gen: configure-gen $(BUILD_TARGETS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   184
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   185
$(BUILD_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   186
	$(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
   187
	 $(BUILD_$(@:build_%=%)_FLAGS) build-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   188
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   189
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
   190
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
   191
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   192
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
   193
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
   194
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   195
$(INSTALL_RULES):
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   196
	$(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
   197
	 $(BUILD_$(@:install_%=%)_FLAGS) install-gen
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   198
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   199
$(PROTODIR)$(MODULE_DOC_DIR):
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   200
	mkdir -p $@
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   201
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   202
DEBUG_BUILD_FLAGS = BUILD_DEBUG=yes
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   203
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   204
# 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
   205
debug-%:
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   206
	$(MAKE) $(MAKEFLAGS) $(@:debug-%=%) $(DEBUG_BUILD_FLAGS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   207
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   208
# 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
   209
debug%:
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   210
	$(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
   211
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   212
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   213
### Source tarballs & downloading if necessary
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   214
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   215
SOURCE_TARBALL=$(TARBALLDIR)/$(SOURCE_TARBALL_NAME)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   216
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   217
# Allow downloading from local archive/mirror
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   218
# 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
   219
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
   220
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   221
GIT_CLONE_DIR=$(MODULE_NAME)-$(MODULE_VERSION)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   222
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   223
# 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
   224
# 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
   225
# 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
   226
# 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
   227
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
   228
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   229
$(SOURCE_TARBALL): $(TARBALLDIR)
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   230
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; $(START_CMD_ECHO) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   231
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   232
	    if [[ ! -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   233
		$(GIT) clone $(GIT_URL) $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   234
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   235
		    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
   236
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   237
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   238
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   239
	    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
   240
		if [[ ! -z "$(TARBALL_ARCHIVE)" ]] ; then \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   241
		    $(WGET) -O $(SOURCE_TARBALL) $(ARCHIVE_URL) ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   242
		else \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   243
		    $(WGET) -O $(SOURCE_TARBALL) $(SOURCE_URL) ; \
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
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   247
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   248
CHECKSUM_TARGET = .checksum_done.$(MODULE_VERSION)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   249
check-checksums: $(CHECKSUM_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   250
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   251
$(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
   252
	@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
   253
	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
   254
	      "$(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
   255
	    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
   256
	    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
   257
		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
   258
			"$${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
   259
		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
   260
	    fi ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   261
	    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
   262
	    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
   263
		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
   264
			"$${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
   265
		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
   266
	    fi ; \
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   267
	fi
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   268
	touch $(CHECKSUM_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   269
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   270
clean: clean-checksums
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   271
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   272
clean-checksums:
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   273
	-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
   274
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   275
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   276
# 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
   277
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
   278
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   279
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
   280
	@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
   281
	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
   282
	      "$(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
   283
		$(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
   284
		 --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
   285
		 --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
   286
		 --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
   287
		 --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
   288
		 --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
   289
	fi
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
   290
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   291
$(TARBALLDIR):
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   292
	mkdir -p $(TARBALLDIR)
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   293
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   294
# Update a git cloned repo
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   295
git-update:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   296
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   297
	    if [[ -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   298
		cd $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   299
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   300
		    $(GIT) checkout master && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   301
		    $(GIT) fetch && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   302
		    $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   303
		else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   304
		    $(GIT) fetch ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   305
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   306
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   307
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   308
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   309
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   310
### Unpack source and apply patches
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   311
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   312
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
   313
	$(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
   314
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   315
# 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
   316
# - if there's a tarball, unpack it.
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   317
# - if using a git master, copy it.
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   318
SOURCE_INIT_TARGET_FILE=.source.init.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   319
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
   320
init_source: $(SOURCE_INIT_TARGET)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   321
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 957
diff changeset
   322
$(SOURCE_INIT_TARGET): $(SOURCE_DEPS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   323
	mkdir -p $(BUILD_DIR)
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   324
	@ if [[ "$(SOURCE_TARBALL_NAME)" == "NONE" ]] ; then \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   325
	  $(START_CMD_ECHO); mkdir -p $(SOURCE_DIR) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   326
	else \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   327
	  if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   328
	    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
   329
	  else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   330
	    UNCOMP_CMD="$(SOURCE_UNCOMPRESS)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   331
	    SOURCE_CMD="$${UNCOMP_CMD:-bzcat} $(SOURCE_TARBALL)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   332
	  fi ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   333
	  $(START_CMD_ECHO) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   334
	  $${SOURCE_CMD} | \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   335
		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
   336
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   337
	touch $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   338
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   339
# 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
   340
# (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
   341
SOURCE_ADD_TARGET_FILE=.source.add.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   342
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
   343
add_source: $(SOURCE_ADD_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   344
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   345
$(SOURCE_ADD_TARGET): $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   346
	@if [[ "$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   347
	  if [[ ! -x $(LNDIR) ]] ; then \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   348
	    (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
   349
	  fi ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   350
	  $(START_CMD_ECHO) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   351
	  cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR) ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   352
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   353
	touch $(SOURCE_ADD_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   354
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   355
# 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
   356
# 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
   357
#
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   358
# 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
   359
# $${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
   360
# $${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
   361
PATCHED_TARGET_FILE=.patches.done
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   362
PATCHED_TARGET=$(SOURCE_DIR)/$(PATCHED_TARGET_FILE)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   363
patched_source: $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   364
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   365
$(PATCHED_TARGET): $(SOURCE_INIT_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   366
	@ if [[ "$(SOURCE_PATCHES)" != "" ]] ; then \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   367
	    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
   368
	        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
   369
		    patch_file="$${p%,*}" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   370
		    if [[ "$$p" =~ "," ]] ; then \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   371
			patch_flags="$${p/*,}" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   372
		    else \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   373
			patch_flags="-p0" ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   374
		    fi ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   375
		    ($(START_CMD_ECHO) ; \
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   376
		     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
   377
		fi ; \
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   378
	    done ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   379
	fi
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   380
	touch $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   381
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   382
# 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
   383
FIXED_MAN_SUFFIX=mantouch.done
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   384
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
   385
fixed_man: $(FIXED_MAN_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   386
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   387
COMMON_SUNTOUCH_MAN_FLAGS = \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   388
	-a '{Availability, $(MODULE_PKGNAME)}' \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   389
	-a '{Interface Stability, $(MODULE_STABILITY)}'
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   390
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   391
DEFAULT_SUNTOUCH_MAN_FLAGS = \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   392
	$(COMMON_SUNTOUCH_MAN_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   393
	$(MODTYPE_SUNTOUCH_MAN_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   394
	$(MODULE_SUNTOUCH_MAN_FLAGS)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   395
947
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   396
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
   397
$(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
   398
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   399
$(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
   400
	$(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
   401
		$(@:%.$(FIXED_MAN_SUFFIX)=%)
ef9da9d336f5 6950022 X man page cleanups
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 935
diff changeset
   402
	touch $@
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   403
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   404
# 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
   405
# $(FIX_PC_FILES)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   406
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
   407
ORIG_PC_FILES = $(SOURCE_PC_FILES:%=%.orig)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   408
FIXED_PC_TARGET = $(ORIG_PC_FILES)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   409
fixed_pc: $(FIXED_PC_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   410
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   411
FIX_PC_OPS= \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   412
	-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
   413
	-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
   414
	-e 's|Requires.private: .*$$||;' \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   415
	$(MODTYPE_FIX_PC_FLAGS) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   416
	$(MODULE_FIX_PC_FLAGS)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   417
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   418
$(ORIG_PC_FILES): $(PATCHED_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   419
	$(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
   420
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   421
# Tie them all together
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   422
UNPACK_TARGETS = $(SOURCE_INIT_TARGET) $(PATCHED_TARGET) \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   423
	$(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
   424
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   425
default_source: $(UNPACK_TARGET)
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   426
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   427
$(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
   428
	touch $(UNPACK_TARGET)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   429
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   430
### 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
   431
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   432
# 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
   433
# 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
   434
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
   435
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
   436
	-I $(TOOLS_ACLOCAL_DIR) \
1045
8ee6fcfdbd89 7002660 Remove workaround for 6785384 from X build
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1003
diff changeset
   437
	-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
   438
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
   439
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
   440
	AUTOMAKE="$(AUTOMAKE_PATH)"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   441
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   442
# 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
   443
CONFIGURE_DEPS = $(SOURCE_TARGETS) \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   444
	$(MODTYPE_CONFIGURE_DEPS) $(MODULE_CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   445
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   446
# 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
   447
DEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \
999
c88b52baf4f4 6977519 Mass minor update to X upstream releases [August 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 994
diff changeset
   448
	--without-xmlto --without-asciidoc \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   449
	--mandir='$${prefix}/share/man' --localstatedir=/var
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   450
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   451
CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   452
	$(MODTYPE_CONFIG_OPTS) $(MODULE_CONFIG_OPTS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   453
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   454
# 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
   455
$(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
   456
	-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
   457
	-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
   458
$(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
   459
	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   460
	-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
   461
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   462
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
   463
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   464
# 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
   465
# autoconfig environment
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   466
$(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
   467
    CC="$(CC)" CXX="$(CXX)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   468
    LD="$(CC) $(LDFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   469
    CFLAGS="$(MODTYPE_CFLAGS) $(MODULE_CFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   470
    CXXFLAGS="$(MODTYPE_CXXFLAGS) $(MODULE_CXXFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   471
    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
   472
    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
   473
    PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   474
    INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   475
    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(SHELL)"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   476
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   477
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
   478
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   479
# 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
   480
# 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
   481
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
   482
$(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
   483
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   484
$(AUTOCONF_TARGET): $(CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   485
	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
   486
	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
   487
	     $(AUTORECONF_ENV) autoreconf -v --install --force ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   488
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   489
	chmod a+x configure ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   490
	$(CONFIG_ENV) $(SHELL) ./configure $(CONFIG_OPTS) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   491
	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   492
	    $(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
   493
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   494
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   495
default_configure: $(AUTOCONF_TARGET)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   496
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   497
957
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   498
# Additional rule used in xserver/Makefile.inc & driver/Makefile.inc to
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   499
# edit the Makefiles generated by configure to override module subdirs 
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   500
# for 64-bit x86 modules to be modules/xxx/amd64, not modules/amd64/xxx
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   501
FIXEDMODS_TARGET = $(AUTOCONF_TARGET).fixedmods
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   502
CONFIGURE_FIXEDMODS_/amd64 = $(FIXEDMODS_TARGET)
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   503
CONFIGURE_FIXEDMODS_TARGET = $(CONFIGURE_FIXEDMODS_$(SERVERMOD_subdir))
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   504
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   505
fix-moduledirs: $(CONFIGURE_FIXEDMODS_TARGET)
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   506
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   507
FIXEDMODS_SUBSTS = \
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   508
-e 's{\$$\(moduledir\)/(\w+|\$$\(\w+\))}{$(X11_SERVERMODS_DIR)/$$1$(SERVERMOD_subdir)}g;' \
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   509
-e 's{$(X11_SERVERMODS_DIR)$(SERVERMOD_subdir)/([^\s/]+)}{$(X11_SERVERMODS_DIR)/$$1$(SERVERMOD_subdir)}g;'
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   510
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   511
$(FIXEDMODS_TARGET): $(AUTOCONF_TARGET)
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   512
	find $(SOURCE_DIR) -name Makefile | \
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   513
	 xargs $(PERL) -i.orig -p $(FIXEDMODS_SUBSTS)
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   514
c2f4cfc53173 6955153 RPATH and RUNPATH violations in xorg package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 947
diff changeset
   515
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   516
### Default rules for common build pattern
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   517
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   518
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
   519
	$(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   520
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   521
# 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
   522
#		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
   523
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
   524
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
   525
	PROTODIR='$(PROTODIR)' \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   526
	MAKE='$(MODULE_MAKE)' \
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   527
	MKDIRPROG='mkdir -p' \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   528
	$(MODTYPE_BUILD_ENV) $(MODULE_BUILD_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   529
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   530
DEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   531
	$(MODTYPE_BUILD_MAKEFLAGS) $(MODULE_BUILD_MAKEFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   532
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   533
# 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
   534
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
   535
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   536
default_build: $(BUILD_DEPS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   537
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   538
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   539
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   540
print_default_build_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   541
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   542
	print "MAKE='$(MODULE_MAKE)'" ; \
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   543
	print "MAKEFLAGS='$(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS)'"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   544
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   545
build-in-subdir:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   546
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   547
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   548
	 $(subdir_cmd) )
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   549
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   550
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
   551
	pkgconfigdir=$(MODULE_PKGCONFIG_DIR) \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   552
	$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   553
	$(MODTYPE_INSTALL_MAKEFLAGS) $(MODULE_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   554
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   555
# 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
   556
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
   557
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   558
default_install: $(INSTALL_DEPS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   559
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   560
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   561
	 install)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   562
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   563
print_default_install_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   564
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   565
	print "MAKE='$(MODULE_MAKE)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   566
	print "MAKE_FLAGS='$(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS)'"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   567
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   568
install-in-subdir:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   569
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   570
	 $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   571
	 $(subdir_cmd))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   572
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
   573
# 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
   574
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
   575
	-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
   576
	-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
   577
	-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
   578
	-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
   579
	$(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
   580
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   581
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
   582
$(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
   583
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
   584
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
   585
	@ 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
   586
	    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
   587
	    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
   588
		pc="$${pcin%%+(.pc|.in)}" ; \
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   589
		pcu="$${pc##*/}-uninstalled.pc" ; \
851
d428083dbbdd 6905171 X11R7.5 / Xorg 1.7.3 integration
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 837
diff changeset
   590
		($(START_CMD_ECHO) ; \
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   591
		 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
   592
		 $(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
   593
		    $(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
   594
	    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
   595
	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
   596
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   597
# 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
   598
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
   599
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
   600
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
   601
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
   602
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   603
$(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
   604
	mkdir -p $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   605
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   606
$(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
   607
	@rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   608
	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
   609
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   610
$(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
   611
	@rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   612
	@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
   613
	    TARGETDIR=../../lib ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   614
	else \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   615
	    TARGETDIR=../../../lib$(ARCHLIBSUBDIR) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   616
	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
   617
	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
   618
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   619
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
   620
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   621
# Set comments in ELF binaries to help identify versions/builds
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   622
ELF_COMMENTS = $(MODULE_NAME) $(MODULE_VERSION)
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   623
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
   624
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
   625
$(BUILD_DEBUG:yes=)			DEBUG_ELF_COMMENTS=(DEBUG)
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
   626
$(BUILD_DEBUG:yes=$(POUND_SIGN))	DEBUG_ELF_COMMENTS=
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
   627
ELF_COMMENTS += $(DEBUG_ELF_COMMENTS)
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
   628
994
ebd9341332ef 6975153 libfreetype.so.6 does not contain correct mcs version info
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   629
ELF_COMMENTS_FLAGS = -B 'hg id' -M '$(ELF_COMMENTS)'
ebd9341332ef 6975153 libfreetype.so.6 does not contain correct mcs version info
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   630
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
   631
810
6f94d3da0552 6889793 enable parallel builds of the X consolidation
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 705
diff changeset
   632
set-elf-comments: $(BUILD_TARGETS:set-elf-comments=)
994
ebd9341332ef 6975153 libfreetype.so.6 does not contain correct mcs version info
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 970
diff changeset
   633
	$(TOP)/open-src/common/set-elf-comments.pl $(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
   634
	 $(SOURCE_DIR)
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   635
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   636
# 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
   637
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
   638
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   639
MANIFEST_DEST=$(PWD)/tmp-proto-$(MACH)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   640
MANIFEST_TMP=$(PWD)/tmp.mf
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   641
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   642
PKGFMT=/usr/bin/pkgfmt
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
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
   645
$(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
   646
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   647
manifest: $(MANIFEST_TARGETS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   648
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   649
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
   650
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   651
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
   652
	PROTODIR="$(MANIFEST_DEST)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   653
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   654
$(MANIFEST_DEST): install
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   655
	/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
   656
		|| (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
   657
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   658
$(MANIFEST_TMP): $(MANIFEST_DEST) $(PKGFMT)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   659
	$(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
   660
		input_manifest='$(MODULE_PKG_MANIFEST)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   661
		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
   662
		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
   663
		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
   664
		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
   665
		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
   666
		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
   667
		pkgfmt='$(PKGFMT)' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   668
		> $(MANIFEST_TMP)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   669
	-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
   670
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   671
$(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
   672
	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
   673
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   674
$(PKG_MANIFEST_DIR):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   675
	mkdir -p $(PKG_MANIFEST_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   676
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   677
### Other tools/dependencies needed to build
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   678
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   679
# 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
   680
$(GNUMAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   681
	@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
   682
	@$(GNUMAKE) --version
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   683
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   684
$(MAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   685
	@print "Building with make from $$(whence $(MAKE))"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   686
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   687
# 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
   688
$(LNDIR):
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   689
	(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
   690
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   691
# Some modules use these tools to convert DocBook docs to text or html
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
   692
$(DOCBOOK2HTML) + $(DOCBOOK2TEXT):
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   693
	cd $(TOP)/open-src/doc/docbook-utils && $(MAKE) $(MAKEFLAGS) install
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   694
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   695
$(XORG_DEFS_ENT):
967
efbd0ee6805d 6963229 build race conditions and other makefile issues
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 965
diff changeset
   696
	cd $(TOP)/open-src/doc/xorg-sgml-doctools && $(MAKE) $(MAKEFLAGS) install
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   697
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   698
### Useful rules for maintaining patch sets
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   699
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   700
# 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
   701
# 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
   702
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   703
regen-patches:
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   704
	CUR_LIST=""
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   705
	rm -rf tmp-regen
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   706
	$(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
   707
	mkdir -p new
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   708
	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
   709
	    p=$${f%,*} ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   710
	    print '=================' $$p ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   711
	    rm -rf prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   712
	    mv tmp-regen prev ; \
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   713
	    $(MAKE) SOURCE_PATCHES="$${CUR_LIST} $$f" BUILD_DIR=tmp-regen patched_source ; \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   714
	    gawk '/^--- /	{exit} \
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   715
		  /^diff -u/	{exit} \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   716
			 	{print}' $$p > new/$$p ; \
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   717
	    gdiff -urp -x '*~' -x '*.orig' ./prev ./tmp-regen \
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   718
		| sed -e 's% \./prev/$(SOURCE_DIRNAME)/% %' -e 's% \./tmp-regen/$(SOURCE_DIRNAME)/% %' \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   719
		| grep -v '^Common subdirectories:' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   720
		| grep -v '^Only in ' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   721
		>> new/$$p ; \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   722
	    CUR_LIST="$${CUR_LIST} new/$$p" ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   723
	done
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   724
	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
   725
935
f812f9863e75 6941861 Collected X gate build fixes
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 922
diff changeset
   726
# 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
   727
# 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
   728
list-patches:
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   729
	@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
   730
	    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
   731
	    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
   732
		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
   733
	            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
   734
		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
   735
	    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
   736
	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
   737
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   738
### 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
   739
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   740
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
   741
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   742
$(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
   743
	mkdir -p $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   744
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   745
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
   746
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   747
# 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
   748
# 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
   749
# 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
   750
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
   751
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   752
# Metadata about upstream
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   753
UPSTREAM_NONE		= NONE
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   754
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
   755
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   756
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
   757
UPSTREAM_URL_xorg	= http://www.x.org/
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   758
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   759
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
   760
$(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
   761
$(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
   762
$(UPSTREAM_DEFAULT) UPSTREAM_NOTFOUND = $(UPSTREAM_SET_YET:yes=$(POUND_SIGN))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   763
$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM = $(UPSTREAM_xorg)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   764
$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM_URL = $(UPSTREAM_URL_xorg)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   765
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   766
## Attributes files
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   767
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   768
ATTRDATA_FILE_NAME	= attributes_$(MODULE_NAME).mf
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   769
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
   770
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   771
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
   772
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   773
# $${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
   774
# 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
   775
%/$(ATTRDATA_FILE_NAME): %
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   776
	-rm -f $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   777
	@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
   778
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   779
	    print 'set name=info.source_url value="$(SOURCE_URL)"' >> $@ ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   780
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   781
	@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
   782
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   783
	    print 'set name=info.upstream value="$(UPSTREAM)"' >> $@ ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   784
	    print 'set name=info.upstream_url value="$(UPSTREAM_URL)"' >> $@ ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   785
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   786
	@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
   787
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   788
	    print 'set name=opensolaris.arc_url' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   789
		'$(MODULE_ARC_CASES:%=value="$(ARC_URL_BASE)%/")' >> $@ ;  \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   790
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   791
	@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
   792
	    $(START_CMD_ECHO) ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   793
	    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
   794
		'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
   795
		>> $@ ;  \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   796
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   797
	@ 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
   798
	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
   799
	       "$${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
   800
	$(MODTYPE_ATTRDATA_COMMANDS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   801
	$(MODULE_ATTRDATA_COMMANDS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   802
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   803
## 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
   804
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
   805
# 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
   806
# 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
   807
# and set LICENSE_FILE_SET=yes
387
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   808
# 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
   809
# 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
   810
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
   811
$(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
   812
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   813
# Default is the MIT/X11 license
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   814
MIT_LICENSE_NAME = MIT License ($(MODULE_NAME))
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   815
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
   816
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   817
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
   818
$(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
   819
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   820
# 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
   821
# 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
   822
# 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
   823
# 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
   824
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
   825
$(LICENSE_CHOICE_DEFAULT)	LICENSE_CHOICE=open
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   826
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   827
ORACLE_LICENSE_NAME_open	= $(MIT_LICENSE_NAME)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   828
ORACLE_LICENSE_APPEND_open	= $(MIT_LICENSE_FILE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   829
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   830
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
   831
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
   832
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   833
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
   834
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
   835
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
   836
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   837
# 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
   838
LICENSE_NAME			= $(MODULE_LICENSE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   839
LICENSE_PREPEND 		= $(MODULE_LICENSE_PREPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   840
LICENSE_APPEND 			= $(MODULE_LICENSE_APPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   841
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   842
LICENSE_OVERRIDE_1		= $(POUND_SIGN)$(MODULE_LICENSE)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   843
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
   844
$(LICENSE_OVERRIDE)		LICENSE_NAME = $(ORACLE_LICENSE_NAME)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   845
$(LICENSE_OVERRIDE)		LICENSE_PREPEND = $(ORACLE_LICENSE_PREPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   846
$(LICENSE_OVERRIDE)		LICENSE_APPEND = $(ORACLE_LICENSE_APPEND)
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   847
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   848
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
   849
LICENSE_FILE_DEST = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   850
LICENSE_ATTR_FILE = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME).mf
922
db66e53f0c94 6933880 Simplify building the same X workspace on sparc & x86
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 920
diff changeset
   851
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   852
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
   853
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
   854
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   855
%/$(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
   856
	@ $(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
   857
	if [[ -f "$(LICENSE_FILE)" ]] ; then \
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   858
	    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
   859
	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
   860
	    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
   861
	fi ; \
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   862
	if [[ -n "$${license_to_copy}" ]] ; then \
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   863
	    cat $(LICENSE_PREPEND) "$${license_to_copy}" $(LICENSE_APPEND) > "$@" ; \
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 999
diff changeset
   864
	    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
   865
	fi
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   866
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 967
diff changeset
   867
install_metadata: $(METADATA_TARGETS)