open-src/common/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Fri, 19 Dec 2008 17:40:06 -0800
changeset 599 c195ef96916e
parent 591 a2c6b61a92aa
child 606 068c11b419c9
permissions -rw-r--r--
6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
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
#
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Use subject to license terms.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# Permission is hereby granted, free of charge, to any person obtaining a
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
# copy of this software and associated documentation files (the
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
# "Software"), to deal in the Software without restriction, including
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
# without limitation the rights to use, copy, modify, merge, publish,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
# distribute, and/or sell copies of the Software, and to permit persons
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
# to whom the Software is furnished to do so, provided that the above
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
# copyright notice(s) and this permission notice appear in all copies of
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
# the Software and that both the above copyright notice(s) and this
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
# permission notice appear in supporting documentation.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
# 
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
# 
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
# Except as contained in this notice, the name of a copyright holder
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# shall not be used in advertising or otherwise to promote the sale, use
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# or other dealings in this Software without prior written authorization
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# of the copyright holder.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
#
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
    31
# @(#)Makefile.inc	1.97	08/12/19
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
#
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
### Default rules
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    35
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    36
# Which compiler to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    37
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
    38
$(MODTYPE_COMPILER_DEFAULT)	MODTYPE_COMPILER = $(DEFAULT_COMPILER)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    39
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
    40
$(MODULE_COMPILER_DEFAULT)	MODULE_COMPILER = $(MODTYPE_COMPILER)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    42
# Which make to use to build module
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    43
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
    44
$(MODTYPE_MAKE_DEFAULT)		MODTYPE_MAKE = $(MAKE)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    45
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
    46
$(MODULE_MAKE_DEFAULT)		MODULE_MAKE = $(MODTYPE_MAKE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    48
# Where to install files
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    49
MODTYPE_PREFIX_DEFAULT		= $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    50
$(MODULE_PREFIX_DEFAULT)	MODTYPE_PREFIX=$(X11_DIR)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    51
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
    52
$(MODULE_PREFIX_DEFAULT)	MODULE_PREFIX=$(MODTYPE_PREFIX)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    53
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    54
# 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
    55
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
    56
$(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
    57
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    58
SOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    59
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    60
# 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
    61
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
    62
$(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
    63
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    64
# 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
    65
# 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
    66
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
    67
$(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
    68
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    69
# 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
    70
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
    71
$(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
    72
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    73
# 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
    74
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
    75
$(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
    76
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    77
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    78
BUILD_DIR_32 = build_32
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    79
BUILD_DIR_64 = build_64
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    80
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    81
# 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
    82
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
    83
$(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
    84
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    85
# 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
    86
SOURCE_TARGETS_DEFAULT		= $(SOURCE_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
    87
$(SOURCE_TARGETS_DEFAULT)	SOURCE_TARGETS=default_source \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
    88
					$(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
    89
					$(MODULE_ADD_SOURCE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    90
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    91
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
    92
$(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
    93
					$(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
    94
					$(MODULE_ADD_CONFIGURE_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    95
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
    96
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
    97
$(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
    98
					$(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
    99
					$(MODULE_ADD_BUILD_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   100
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   101
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
   102
$(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
   103
					$(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
   104
					$(MODULE_ADD_INSTALL_TARGETS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   105
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   106
# Additional flags to pass to make in 32-bit & 64-bit builds
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   107
BUILD_32_FLAGS= BUILD_DIR=$(BUILD_DIR_32) ARCH_FLAGS="$(ARCH32_FLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   108
	$(MODTYPE_BUILD_32_FLAGS) $(MODULE_BUILD_32_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   109
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   110
BUILD_64_FLAGS= BUILD_DIR=$(BUILD_DIR_64) ARCH_FLAGS="$(ARCH64_FLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   111
	$(MODTYPE_BUILD_64_FLAGS) $(MODULE_BUILD_64_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   112
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   113
all: $(BUILD_TYPES:%=source_%) $(BUILD_TYPES:%=build_%)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   114
all_32: source_32 configure_32 build_32
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   115
all_64: source_64 configure_64 build_64
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   116
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   117
clean:: $(BUILD_TYPES:%=clean_%)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   118
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   119
clean_32::
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   120
	-rm -rf $(BUILD_DIR_32)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   121
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   122
clean_64::
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   123
	-rm -rf $(BUILD_DIR_64)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   124
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   125
source: $(BUILD_TYPES:%=source_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   126
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   127
source_gen:: $(SOURCE_TARGETS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   128
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   129
source_32: $(BUILD_DIR_32)/.unpack_done
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   130
$(BUILD_DIR_32)/.unpack_done:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   131
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_32) source_gen
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
source_64: $(BUILD_DIR_64)/.unpack_done
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   134
$(BUILD_DIR_64)/.unpack_done:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   135
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_64) source_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   136
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   137
configure: $(BUILD_TYPES:%=configure_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   138
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   139
configure_gen: $(CONFIGURE_TARGETS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   140
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   141
configure_32:: 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   142
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) configure_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   143
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   144
configure_64::
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   145
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/$(SUBDIR64) ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) configure_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   146
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   147
build: $(BUILD_TYPES:%=build_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   148
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   149
build_gen: $(BUILD_TARGETS)
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   150
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   151
build_32::
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   152
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) build_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   153
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   154
build_64::
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   155
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/$(SUBDIR64) ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) build_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   156
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   157
install: $(BUILD_TYPES:%=install_%)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   158
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   159
install_gen:: $(INSTALL_TARGETS) install_license
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
   160
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   161
install_32:: build_32
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   162
	$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) install_gen
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   163
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   164
install_64:: build_64
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   165
	$(MAKE) $(MAKEFLAGS) LIBSUBDIR=/64 ARCHLIBSUBDIR=/$(SUBDIR64) $(BUILD_64_FLAGS) install_gen
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   166
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   167
DEBUG_BUILD_FLAGS = BUILD_DEBUG=yes
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   168
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   169
debug:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   170
	$(MAKE) $(MAKEFLAGS) all $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   171
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   172
debug_32:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   173
	$(MAKE) $(MAKEFLAGS) all_32 $(DEBUG_BUILD_FLAGS) 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   174
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   175
debug_64:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   176
	$(MAKE) $(MAKEFLAGS) all_64 $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   177
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   178
debug-install:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   179
	$(MAKE) $(MAKEFLAGS) install $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   180
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   181
debug-install_32:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   182
	$(MAKE) $(MAKEFLAGS) install_32 $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   183
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   184
debug-install_64:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   185
	$(MAKE) $(MAKEFLAGS) install $(DEBUG_BUILD_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   186
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   187
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   188
### Source tarballs & downloading if necessary
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   189
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   190
SOURCE_TARBALL=$(TARBALLDIR)/$(SOURCE_TARBALL_NAME)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   191
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   192
GIT_CLONE_DIR=$(MODULE_NAME)-$(MODULE_VERSION)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   193
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   194
# 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
   195
# doesn't exist or is empty
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   196
# If MODULE_VERSION is xgit, checkout source from git repo instead of
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   197
# a tarball
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   198
download:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   199
	@case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; set -x ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   200
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   201
	    if [[ ! -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   202
		$(GIT) clone $(GIT_URL) $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   203
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   204
		    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
   205
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   206
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   207
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   208
	    if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   209
		if [[ ! -s $(SOURCE_TARBALL) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   210
		    $(WGET) -O $(SOURCE_TARBALL) $(SOURCE_URL) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   211
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   212
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   213
	fi
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
# Update a git cloned repo
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   216
git-update:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   217
	if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   218
	    if [[ -d $(GIT_CLONE_DIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   219
		cd $(GIT_CLONE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   220
		if [[ ! -z "$(GIT_BRANCH)" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   221
		    $(GIT) checkout master && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   222
		    $(GIT) fetch && \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   223
		    $(GIT) checkout $(GIT_BRANCH) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   224
		else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   225
		    $(GIT) fetch ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   226
		fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   227
	    fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   228
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   229
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   230
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   231
### Unpack source and apply patches
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   232
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   233
FIX_PC_OPS= \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   234
	-e 's|-L\$${libdir}|-L\$${libdir} -R\$${libdir}|;' \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   235
	-e 's|Requires.private: .*$$||;'
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   236
354
c5722f7db2ea 6671721 Update libXt to opensrc verion 1.0.5 from X.org [build fixes]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 341
diff changeset
   237
#	-e 's|(Requires: .*)\bx11\b|$$1|;' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   238
#	-e 's|^prefix=@prefix@|prefix=\$$\{top_builddir\}@prefix@|'
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   239
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   240
SUNTOUCH_MAN_FLAGS = \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   241
	-a '{Availability, $(SUN_PACKAGE)}' \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   242
	-a '{Interface Stability, $(MODULE_STABILITY)}' \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   243
	$(MODTYPE_SUNTOUCH_MAN_FLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   244
	$(MODULE_SUNTOUCH_MAN_FLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   245
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   246
default_source: $(MODULE_SOURCE_DEPS) $(MODTYPE_SOURCE_DEPS)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   247
	mkdir -p $(BUILD_DIR)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   248
	@ if [[ "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   249
	  if [[ "$(MODULE_VERSION)" = "git" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   250
	    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
   251
	  else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   252
	    UNCOMP_CMD="$(SOURCE_UNCOMPRESS)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   253
	    SOURCE_CMD="$${UNCOMP_CMD:-bzcat} $(SOURCE_TARBALL)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   254
	  fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   255
	  print "$${SOURCE_CMD} | (cd $(BUILD_DIR) ; gtar -xf - )" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   256
	  $${SOURCE_CMD} | (cd $(BUILD_DIR) ; gtar -xf - ) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   257
	else \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   258
	  print "mkdir -p $(SOURCE_DIR)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   259
	  mkdir -p $(SOURCE_DIR) ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   260
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   261
	if [[ "$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   262
	  if [[ ! -x $(LNDIR) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   263
	    (cd $(TOP)/util/lndir && $(MAKE) $(MAKEFLAGS) install) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   264
	  fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   265
	  print "cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   266
	  (cd $(SOURCE_DIR) && $(LNDIR) ../../$(ADDITIONAL_SOURCE_DIR) ) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   267
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   268
	if [[ "$(SOURCE_PATCHES)" != "" ]] ; then \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   269
	    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
   270
	        if [[ "$$p" != "x" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   271
		    PATCH_CMD="$$(print $$p | awk -F, '{if (NF > 1) FLAGS = $$2; else FLAGS="-p0" ; printf "gpatch -d $(SOURCE_DIR) %s < %s\n", FLAGS, $$1}')" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   272
		    print "$${PATCH_CMD}" ; \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   273
		    eval $${PATCH_CMD} ; \
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   274
		fi ; \
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   275
	    done ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   276
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   277
	if [[ "$(SUNTOUCHED_MANPAGES)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   278
	    print "/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   279
		$(SUNTOUCH_MAN_FLAGS) $(SUNTOUCHED_MANPAGES)" ; \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   280
	    (cd $(SOURCE_DIR) && \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   281
		/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   282
		$(SUNTOUCH_MAN_FLAGS) $(SUNTOUCHED_MANPAGES) ) ; \
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   283
	fi ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   284
	if [[ "$(FIX_PC_FILES)" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   285
	    print "/usr/perl5/bin/perl -i.orig -p \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   286
			$(FIX_PC_OPS) $(FIX_PC_FILES)" ; \
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 47
diff changeset
   287
	    (cd $(SOURCE_DIR) && \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   288
		/usr/perl5/bin/perl -i.orig -p \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   289
			$(FIX_PC_OPS) $(FIX_PC_FILES) ); \
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 47
diff changeset
   290
	fi
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   291
	touch $(BUILD_DIR)/$(UNPACK_FILE)
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   292
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   293
### 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
   294
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   295
# 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
   296
# and use automake 1.10 instead of the older 1.9.
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
   297
# /opt/jdsbld/share/aclocal is needed to get the nls.m4 from CBEgettext
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
   298
# due to: 6785384 SUNWgnu-gettext does not include autoconf m4 files
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
   299
ACLOCAL_PATH=/usr/bin/aclocal-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
   300
ACLOCAL_INCLUDES = -I $(PROTODIR)$(X11_ACLOCAL_DIR) \
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
   301
	-I /usr/share/aclocal -I /usr/share/aclocal-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
   302
	-I /opt/jdsbld/share/aclocal
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
   303
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
   304
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
   305
	AUTOMAKE="$(AUTOMAKE_PATH)"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   306
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   307
# Dependencies for running configure to make a Makefile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   308
CONFIGURE_DEPS = $(UNPACK_TARGET) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   309
	$(MODTYPE_CONFIGURE_DEPS) $(MODULE_CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   310
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   311
# 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
   312
DEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   313
	--mandir='$${prefix}/share/man' --localstatedir=/var \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   314
	--disable-libtool-lock
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   315
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   316
CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   317
	$(MODTYPE_CONFIG_OPTS) $(MODULE_CONFIG_OPTS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   318
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   319
# 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
   320
$(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
   321
	-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
   322
	-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
   323
$(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
   324
	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   325
	-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
   326
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 536
diff changeset
   327
DEFAULT_PKG_CONFIG_PATH=$(TOP)/common/pc-files/$(BUILD_DIR):$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig:/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
191
8c3443e72486 6583543 Can't build X with JDS CBE 1.6
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 156
diff changeset
   328
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   329
# 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
   330
# autoconfig environment
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   331
$(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
   332
    CC="$(CC)" CXX="$(CXX)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   333
    LD="$(CC) $(LDFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   334
    CFLAGS="$(MODTYPE_CFLAGS) $(MODULE_CFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   335
    CXXFLAGS="$(MODTYPE_CXXFLAGS) $(MODULE_CXXFLAGS)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   336
    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
   337
    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
   338
    PKG_CONFIG_PATH="$(DEFAULT_PKG_CONFIG_PATH)" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   339
    INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p" \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   340
    MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(SHELL)"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   341
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   342
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
   343
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   344
# 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
   345
# 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
   346
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
   347
$(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
   348
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   349
$(AUTOCONF_TARGET): $(CONFIGURE_DEPS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   350
	cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   351
	if [[ "$(AUTORECONF)" = "yes" ]] ; 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
   352
	     $(AUTORECONF_ENV) autoreconf -v --install --force ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   353
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   354
	chmod a+x configure ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   355
	$(CONFIG_ENV) $(SHELL) ./configure $(CONFIG_OPTS) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   356
	if [[ "$(DELIBTOOLIZE)" = "yes" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   357
	    $(TOP)/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) . ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   358
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   359
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   360
default_configure:: $(AUTOCONF_TARGET)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   361
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   362
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   363
### Remove libtool from build process when needed
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   364
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   365
delibtoolize:
341
0a1eb61fd56e 6668846 Upgrade libX11 to X11R7 version
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 291
diff changeset
   366
	$(TOP)/common/delibtoolize.pl $(DELIBTOOLIZE_FLAGS) $(SOURCE_DIR)
291
604d0a133b7a Fix libXmu makefile to work when manually partially building the tree
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 254
diff changeset
   367
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   368
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   369
### Generate mapfiles to limit/version exported symbols in libraries
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   370
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   371
SPEC2MAP=       /usr/lib/abi/spec2map
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   372
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   373
SPECMAP=	mapfile.vers.$(LIBNAME)
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   374
SPECFILE=	spec/$(LIBNAME).spec 
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   375
VERSFILE=	spec/versions
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   376
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   377
$(BUILD_DIR_32)/$(SPECMAP): $(SPECFILE) $(VERSFILE)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   378
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_32) MACH=$(MACH32) spec_gen
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   379
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   380
$(BUILD_DIR_64)/$(SPECMAP): $(SPECFILE) $(VERSFILE)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   381
	$(MAKE) $(MAKEFLAGS) BUILD_DIR=$(BUILD_DIR_64) MACH=$(MACH64) spec_gen
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   382
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   383
spec_gen:
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   384
	$(SPEC2MAP) -a $(MACH) -v $(VERSFILE) -p -l $(LIBNAME) \
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   385
	 -o $(BUILD_DIR)/$(SPECMAP) $(SPECFILE)
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   386
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   387
### Default rules for common build pattern
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   388
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   389
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
   390
	$(MODTYPE_LD_OPTIONS) $(MODULE_LD_OPTIONS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   391
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
   392
BUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)' \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   393
	$(MODTYPE_BUILD_ENV) $(MODULE_BUILD_ENV)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   394
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   395
DEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   396
	$(MODTYPE_BUILD_MAKEFLAGS) $(MODULE_BUILD_MAKEFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   397
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   398
default_build:: $(UNPACK_TARGET) $(CONFIGURE_TARGETS) $(MODTYPE_BUILD_DEPS) $(MODULE_BUILD_DEPS) $(MODULE_MAKE)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   399
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   400
	 $(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
   401
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   402
print_default_build_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   403
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   404
	print "MAKE='$(MODULE_MAKE)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   405
	print "MAKE_FLAGS='$(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS)'"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   406
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   407
build-in-subdir:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   408
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   409
	 $(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
   410
	 $(subdir_cmd) )
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   411
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   412
DEFAULT_INSTALL_MAKEFLAGS= -e DESTDIR=$(PROTODIR) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   413
	pkgconfigdir=/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   414
	$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   415
	$(MODTYPE_INSTALL_MAKEFLAGS) $(MODULE_INSTALL_MAKEFLAGS) \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   416
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   417
# 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
   418
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
   419
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   420
default_install:: $(INSTALL_DEPS)
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   421
	(cd $(SOURCE_DIR) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   422
	 $(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
   423
	 install)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   424
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   425
print_default_install_flags:
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   426
	@print "BUILD_ENV='$(BUILD_ENV)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   427
	print "MAKE='$(MODULE_MAKE)'" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   428
	print "MAKE_FLAGS='$(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS)'"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   429
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   430
install-in-subdir: 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   431
	(cd $(subdir) ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   432
	 $(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
   433
	 $(subdir_cmd))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   434
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   435
# 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
   436
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
   437
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
   438
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   439
set-elf-comments:
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   440
	$(TOP)/common/set-elf-comments.pl -B $(TOP)/../packages/pkgversion \
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   441
	 -M '$(ELF_COMMENTS)' $(SOURCE_DIR)
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 587
diff changeset
   442
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   443
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   444
### Other tools/dependencies needed to build
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   445
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   446
# 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
   447
$(GNUMAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   448
	@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
   449
	@$(GNUMAKE) --version
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   450
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   451
$(MAKE):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   452
	@print "Building with make from $$(whence $(MAKE))"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   453
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   454
# 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
   455
$(LNDIR):
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   456
	(cd $(TOP)/util/lndir && $(MAKE) $(MAKEFLAGS) install)
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   457
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   458
# Some modules use these tools to convert DocBook docs to text or html
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   459
$(DOCBOOK2HTML) $(DOCBOOK2TEXT):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   460
	cd $(TOP)/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
   461
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   462
$(XORG_DEFS_ENT):
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   463
	cd $(TOP)/doc/xorg-sgml-doctools && $(MAKE) $(MAKEFLAGS) install
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   464
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   465
# Almost everything depends on the headers in xproto
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   466
$(XPROTO_DEP):
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   467
	@print "$(XPROTO_DEP) not found..."
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   468
	@print "Installing dependency proto/x11proto"
253
88e5aa1fb5f9 6632519 X proto source dirs should be renamed
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 241
diff changeset
   469
	(cd $(TOP)/proto/x11proto ; make install)
40
bec81b174839 6454339 Xorg modularization: libXau 1.0.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 24
diff changeset
   470
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   471
### Useful rules for maintaining patch sets
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   472
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   473
# 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
   474
# 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
   475
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   476
regen-patches: 
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   477
	CUR_LIST=""
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   478
	rm -rf tmp-regen
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   479
	make SOURCE_PATCHES="$(CUR_LIST)" BUILD_DIR=tmp-regen source_gen
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   480
	mkdir -p new
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   481
	for f in $(SOURCE_PATCHES) ; do \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   482
	    p=$$(print $$f | sed 's/,.*$$//') ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   483
	    print '=================' $$p ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   484
	    rm -rf prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   485
	    mv tmp-regen prev ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   486
	    $(MAKE) SOURCE_PATCHES="$${CUR_LIST} $$f" BUILD_DIR=tmp-regen source_gen ; \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   487
	    awk '/^--- /	{exit} \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   488
		 /^diff -u/	{exit} \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   489
			 	{print}' $$p > new/$$p ; \
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 90
diff changeset
   490
	    gdiff -urp -x '*~' -x '*.orig' ./prev ./tmp-regen \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   491
		| sed -e 's% \./prev$(SOURCE_DIR)/% %' -e 's% \./tmp-regen$(SOURCE_DIR)/% %' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   492
		| grep -v '^Common subdirectories:' \
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   493
		| grep -v '^Only in ' \
90
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   494
		>> new/$$p ; \
aa93b75745de 6509458 Xorg modularization: libXpm & xpm apps
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
   495
	    CUR_LIST="$${CUR_LIST} new/$$p" ; \
47
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   496
	done
d59efbadf28b 4869280 Update xscreensaver to 5.0
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 40
diff changeset
   497
	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
   498
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
   499
### Licensing files
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
   500
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
   501
# 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
   502
# 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
   503
# and set LICENSE_FILE_SET=yes
387
5ce4f3ae3e65 6681709 Copyright update project for Xorg
Jay Cotton <Jay.Cotton@Sun.COM>
parents: 359
diff changeset
   504
# 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
   505
# over one that is delivered in the package.
587
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   506
# For additional license files, set EXTRA_LICENSE_FILES to a list of
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   507
# licenses to copy
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
   508
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
   509
$(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
   510
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
   511
install_license:
587
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   512
	@ THIS_MODULE="$$(echo $(PWD) | sed 's|.*/open-src/||')" ; \
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   513
	PS4="" ; set -x ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   514
	if [[ -f $(LICENSE_FILE) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   515
	    LICENSE_TO_COPY="$(LICENSE_FILE)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   516
	elif [[ -f $(SOURCE_DIR)/$(LICENSE_FILE) ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   517
	    LICENSE_TO_COPY="$(SOURCE_DIR)/$(LICENSE_FILE)" ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   518
	fi ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   519
	if [[ "$${LICENSE_TO_COPY}" != "" ]] ; then \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   520
	    mkdir -p $(LICENSE_DEST)/$${THIS_MODULE}/ ; \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   521
	    cp -pf $${LICENSE_TO_COPY} \
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 460
diff changeset
   522
		$(LICENSE_DEST)/$${THIS_MODULE}/COPYING ; \
587
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   523
	fi ; \
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   524
	if [[ "$(EXTRA_LICENSES)" != "" ]] ; then \
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   525
	    mkdir -p $(LICENSE_DEST)/$${THIS_MODULE}/ ; \
78873c9efc05 6773351 SUNWxorg-docs doesn't need to have all the Xorg server license notices
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 561
diff changeset
   526
	    cp -pf $(EXTRA_LICENSES) $(LICENSE_DEST)/$${THIS_MODULE} ; \
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
   527
	fi