open-src/util/util-macros/Makefile
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 12 Mar 2012 14:39:48 -0700
changeset 1256 e56a6662414b
parent 1179 4ad971e180c3
child 1265 0b5cc5c013e4
permissions -rw-r--r--
7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
###############################################################################
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
1256
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
     3
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
#
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
# Permission is hereby granted, free of charge, to any person obtaining a
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     6
# copy of this software and associated documentation files (the "Software"),
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     7
# to deal in the Software without restriction, including without limitation
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     8
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
     9
# and/or sell copies of the Software, and to permit persons to whom the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    10
# Software is furnished to do so, subject to the following conditions:
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    11
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    12
# The above copyright notice and this permission notice (including the next
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    13
# paragraph) shall be included in all copies or substantial portions of the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    14
# Software.
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    15
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    17
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    18
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    19
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    20
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    21
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 911
diff changeset
    22
# DEALINGS IN THE SOFTWARE.
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
#
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    26
# Package name used in tarballs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    27
MODULE_NAME=util-macros
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
    29
# pkg(5) name we deliver the files in (override default)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
    30
MODULE_PKGNAME=developer/build/autoconf/xorg-macros
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
    31
MODULE_PKGNAME_SET=yes
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 963
diff changeset
    32
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
# Version number (used in path names)
1179
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1112
diff changeset
    34
MODULE_VERSION=1.15.0
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    36
# Checksums for upstream tarball
1179
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1112
diff changeset
    37
TARBALL_MD5  = 357efdfa69f3e092de3b7000b90f6f4a
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1112
diff changeset
    38
TARBALL_SHA1 = 1c4871ba4b4c6cac894b64489053d85e0a122e60
911
a3e7e197651c 6929667 Automate downloading and verification of tarballs used to build X gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 910
diff changeset
    39
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
# Patches to apply to source after unpacking, in order
598
48acf24353fc 6787718 Upgrade xorg-util-macros to 1.2.1
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    41
SOURCE_PATCHES=	
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
946
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    43
# Additional rules for generating sources
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    44
MODULE_ADD_SOURCE_TARGETS=source_fix_pkgname
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    45
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    46
# Need to autoreconf after running source_fix_pkgname
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    47
AUTORECONF=yes
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    48
910
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    49
# Additional install rules beyond what upstream installs
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    50
MODULE_ADD_INSTALL_TARGETS=install_libtool_fix
0a08683bf637 6928500 Race conditions in parallel make break X nightly builds
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    51
946
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    52
# xorg-macro pkg-config files are architecture independent, so install in share
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    53
MODTYPE_PKGCONFIG_DIR=$(PKGCONFIG_DIR_SHARE)
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    54
MODTYPE_PKGCONFIG_DIR_SET=yes
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    55
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
### Include common rulesets
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    57
include ../Makefile.inc
174
b20e7617ca8a 6568258 /tmp/.X11-pipe/X0 named pipe not being created by Xorg 7.2
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    58
946
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    59
# Install additional data files under xorg-macros instead of the
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    60
# too-generic "util-macros"
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    61
source_fix_pkgname: $(PATCHED_TARGET)
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    62
	$(PERL) -i.orig -p -e 's{util-macros}{xorg-macros}g' \
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    63
		$(SOURCE_DIR)/configure.ac
c4381a29a60a 6949653 Mass minor update to X.Org upstream release [April 2010 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 943
diff changeset
    64
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    65
# Libtool versions before 2.2.2 fail to work with LD=cc in 64 bit builds, 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    66
# so install fixed libtool m4 macros here as well, so that modules that
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    67
# run autoreconf get the fixed sources
1256
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    68
#
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    69
# S11U1 now has libtool 2.4.2, but not everyone has updated yet to a build
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    70
# with the new version, so for now, we check the version number before trying
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    71
# to apply the patch, to avoid failures on versions with the bug already fixed.
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    72
# This will be removed in the future, once everyone has had a chance to upgrade.
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    73
install_libtool_fix: $(TOOLS_ACLOCAL_DIR)/libtool.m4
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    74
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    75
$(TOOLS_ACLOCAL_DIR)/libtool.m4: $(TOOLS_ACLOCAL_DIR) libtool-64.patch
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    76
	-rm -f $(TOOLS_ACLOCAL_DIR)/libtool.m4
599
c195ef96916e 6787756 Use Solaris-bundled GNU tools where possible, instead of JDS CBE, when building X
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 598
diff changeset
    77
	SYSTEM_ACLOCAL_DIR=$$($(ACLOCAL_PATH) --print-ac-dir) ; \
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 479
diff changeset
    78
	cp $${SYSTEM_ACLOCAL_DIR}/libtool.m4 \
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    79
		$(TOOLS_ACLOCAL_DIR)/libtool.m4
1256
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    80
	@libtool_version=$$(libtool --version | \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    81
				awk '/^libtool / {print $$NF ; exit}') ; \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    82
	if [[ $${libtool_version%%.[0-9.]*} -lt 2 ]] ; then \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    83
		$(START_CMD_ECHO) ; \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    84
		gpatch -d $(TOOLS_ACLOCAL_DIR) < libtool-64.patch ; \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    85
	else \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    86
		print 'libtool version 2 in use, skipping libtool-64.patch' ; \
e56a6662414b 7153186 X build fails after libtool 1.5 -> 2.4 upgrade
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    87
	fi
963
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    88
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    89
# autoreconf fails if the aclocal include directories don't exist yet
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    90
$(AUTOCONF_TARGET): $(TOOLS_ACLOCAL_DIR) $(PROTODIR)$(X11_ACLOCAL_DIR)
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    91
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    92
$(TOOLS_ACLOCAL_DIR) $(PROTODIR)$(X11_ACLOCAL_DIR):
7a4fced80e83 6962316 X proto area should more closely match packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 962
diff changeset
    93
	mkdir -p $@