Makefile revision 1256
98N/A###############################################################################
98N/A#
943N/A# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
98N/A#
98N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
98N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
98N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
98N/A#
98N/A#
98N/A
98N/A# Package name used in tarballs
98N/AMODULE_NAME=util-macros
98N/A
98N/A# pkg(5) name we deliver the files in (override default)
98N/AMODULE_PKGNAME=developer/build/autoconf/xorg-macros
98N/AMODULE_PKGNAME_SET=yes
908N/A
98N/A# Version number (used in path names)
98N/AMODULE_VERSION=1.15.0
98N/A
98N/A# Checksums for upstream tarball
98N/ATARBALL_MD5 = 357efdfa69f3e092de3b7000b90f6f4a
98N/ATARBALL_SHA1 = 1c4871ba4b4c6cac894b64489053d85e0a122e60
98N/A
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES=
# Additional rules for generating sources
MODULE_ADD_SOURCE_TARGETS=source_fix_pkgname
# Need to autoreconf after running source_fix_pkgname
AUTORECONF=yes
# Additional install rules beyond what upstream installs
MODULE_ADD_INSTALL_TARGETS=install_libtool_fix
# xorg-macro pkg-config files are architecture independent, so install in share
MODTYPE_PKGCONFIG_DIR=$(PKGCONFIG_DIR_SHARE)
MODTYPE_PKGCONFIG_DIR_SET=yes
### Include common rulesets
include ../Makefile.inc
# Install additional data files under xorg-macros instead of the
# too-generic "util-macros"
source_fix_pkgname: $(PATCHED_TARGET)
$(PERL) -i.orig -p -e 's{util-macros}{xorg-macros}g' \
$(SOURCE_DIR)/configure.ac
# Libtool versions before 2.2.2 fail to work with LD=cc in 64 bit builds,
# so install fixed libtool m4 macros here as well, so that modules that
# run autoreconf get the fixed sources
#
# S11U1 now has libtool 2.4.2, but not everyone has updated yet to a build
# with the new version, so for now, we check the version number before trying
# to apply the patch, to avoid failures on versions with the bug already fixed.
# This will be removed in the future, once everyone has had a chance to upgrade.
install_libtool_fix: $(TOOLS_ACLOCAL_DIR)/libtool.m4
$(TOOLS_ACLOCAL_DIR)/libtool.m4: $(TOOLS_ACLOCAL_DIR) libtool-64.patch
-rm -f $(TOOLS_ACLOCAL_DIR)/libtool.m4
SYSTEM_ACLOCAL_DIR=$$($(ACLOCAL_PATH) --print-ac-dir) ; \
cp $${SYSTEM_ACLOCAL_DIR}/libtool.m4 \
$(TOOLS_ACLOCAL_DIR)/libtool.m4
@libtool_version=$$(libtool --version | \
awk '/^libtool / {print $$NF ; exit}') ; \
if [[ $${libtool_version%%.[0-9.]*} -lt 2 ]] ; then \
$(START_CMD_ECHO) ; \
gpatch -d $(TOOLS_ACLOCAL_DIR) < libtool-64.patch ; \
else \
print 'libtool version 2 in use, skipping libtool-64.patch' ; \
fi
# autoreconf fails if the aclocal include directories don't exist yet
$(AUTOCONF_TARGET): $(TOOLS_ACLOCAL_DIR) $(PROTODIR)$(X11_ACLOCAL_DIR)
$(TOOLS_ACLOCAL_DIR) $(PROTODIR)$(X11_ACLOCAL_DIR):
mkdir -p $@