Makefile.inc revision 1273
0N/A# -*- Makefile -*- rules commonly shared among X consolidation open source dirs 1273N/A# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 0N/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: 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# 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. 493N/A# Which compiler to use to build module 493N/AMODTYPE_COMPILER_DEFAULT = $(MODTYPE_COMPILER_SET:yes=$(POUND_SIGN)) 493N/A$(MODTYPE_COMPILER_DEFAULT) MODTYPE_COMPILER = $(DEFAULT_COMPILER) 493N/AMODULE_COMPILER_DEFAULT = $(MODULE_COMPILER_SET:yes=$(POUND_SIGN)) 493N/A$(MODULE_COMPILER_DEFAULT) MODULE_COMPILER = $(MODTYPE_COMPILER) 493N/A# Which make to use to build module 493N/AMODTYPE_MAKE_DEFAULT = $(MODTYPE_MAKE_SET:yes=$(POUND_SIGN)) 493N/A$(MODTYPE_MAKE_DEFAULT) MODTYPE_MAKE = $(MAKE) 493N/AMODULE_MAKE_DEFAULT = $(MODULE_MAKE_SET:yes=$(POUND_SIGN)) 493N/A$(MODULE_MAKE_DEFAULT) MODULE_MAKE = $(MODTYPE_MAKE) 493N/A# Where to install files 493N/AMODTYPE_PREFIX_DEFAULT = $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN)) 851N/A$(MODTYPE_PREFIX_DEFAULT) MODTYPE_PREFIX=$(X11_DIR) 493N/AMODULE_PREFIX_DEFAULT = $(MODULE_PREFIX_SET:yes=$(POUND_SIGN)) 493N/A$(MODULE_PREFIX_DEFAULT) MODULE_PREFIX=$(MODTYPE_PREFIX) 970N/A# Where to install documentation files 970N/AMODTYPE_DOC_DIR_DEFAULT = $(MODTYPE_DOC_DIR_SET:yes=$(POUND_SIGN)) 970N/A$(MODTYPE_DOC_DIR_DEFAULT) MODTYPE_DOC_DIR=$(MODULE_PREFIX)/share/doc/$(MODULE_NAME) 970N/AMODULE_DOC_DIR_DEFAULT = $(MODULE_DOC_DIR_SET:yes=$(POUND_SIGN)) 970N/A$(MODULE_DOC_DIR_DEFAULT) MODULE_DOC_DIR=$(MODTYPE_DOC_DIR) 851N/A# Where to install pkgconfig files 851N/AMODTYPE_PKGCONFIG_DIR_DEFAULT = $(MODTYPE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN)) 851N/A$(MODTYPE_PKGCONFIG_DIR_DEFAULT) MODTYPE_PKGCONFIG_DIR=$(PKGCONFIG_DIR) 851N/AMODULE_PKGCONFIG_DIR_DEFAULT = $(MODULE_PKGCONFIG_DIR_SET:yes=$(POUND_SIGN)) 851N/A$(MODULE_PKGCONFIG_DIR_DEFAULT) MODULE_PKGCONFIG_DIR=$(MODTYPE_PKGCONFIG_DIR) 970N/A# Package files will be delivered in 970N/AMODTYPE_PKGHIER_DEFAULT = $(MODTYPE_PKGHIER_SET:yes=$(POUND_SIGN)) 970N/A$(MODTYPE_PKGHIER_DEFAULT) MODTYPE_PKGHIER=x11/$(MODTYPE) 970N/AMODULE_PKGTAIL_DEFAULT = $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN)) 970N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL_CMD=print $(MODULE_NAME) | \ 970N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL=$(MODULE_PKGTAIL_CMD:sh) 970N/AMODULE_PKGNAME_DEFAULT = $(MODULE_PKGNAME_SET:yes=$(POUND_SIGN)) 970N/A$(MODULE_PKGNAME_DEFAULT) MODULE_PKGNAME=$(MODTYPE_PKGHIER)/$(MODULE_PKGTAIL) 970N/APKG_SRC_DIR = $(TOP)/pkg 970N/APKG_MANIFEST_DIR = $(PKG_SRC_DIR)/manifests 970N/APKG_LICENSE_DIR = $(PKG_SRC_DIR)/license_files 970N/AMODULE_PKG_MANIFEST_NAME_CMD = print $(MODULE_PKGNAME) | tr '/' '-' 970N/AMODULE_PKG_MANIFEST_NAME = $(MODULE_PKG_MANIFEST_NAME_CMD:sh) 1105N/AMODULE_PKG_MANIFEST = $(PKG_MANIFEST_DIR)/$(MODULE_PKG_MANIFEST_NAME).p5m 970N/A# Package classification - must be a valid value recognized by pkg gui 970N/AMODULE_PKGCLASS_DEFAULT = $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN)) 970N/A$(MODULE_PKGCLASS_DEFAULT) MODULE_PKGCLASS=System/X11 493N/A# Directory created by unpacking source, if not set in module makefile 493N/ASOURCE_DIRNAME_DEFAULT = $(SOURCE_DIRNAME_SET:yes=$(POUND_SIGN)) 493N/A$(SOURCE_DIRNAME_DEFAULT) SOURCE_DIRNAME=$(MODULE_NAME)-$(MODULE_VERSION) 935N/ABUILD_DIR_$(BUILD_TYPE) = build-$(BUILD_TYPE) 922N/A# Special cases for 32-bit & 64-bit directory names to allow building 935N/A# both architectures in the same tree (serially - building both in 922N/A# parallel is likely to have race conditions) 922N/ABUILD_DIR_32 = build-$(MACH32) 922N/ABUILD_DIR_64 = build-$(MACH64) 922N/ABUILD_DIR = $(BUILD_DIR_$(BUILD_TYPE)) 493N/ASOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME) 606N/ASOURCE_DIR_32 = $(BUILD_DIR_32)/$(SOURCE_DIRNAME) 606N/ASOURCE_DIR_64 = $(BUILD_DIR_64)/$(SOURCE_DIRNAME) 493N/A# Set default tarball if not set in module makefile 493N/ASOURCE_TARBALL_NAME_DEFAULT = $(SOURCE_TARBALL_NAME_SET:yes=$(POUND_SIGN)) 493N/A$(SOURCE_TARBALL_NAME_DEFAULT) SOURCE_TARBALL_NAME=$(SOURCE_DIRNAME).tar.bz2 493N/A# Tarballs for most modules built here are found in the X.Org archives/repos 493N/A# in a directory with the same name as what we use in our tree 493N/ASOURCE_TARBALL_DIR_DEFAULT = $(SOURCE_TARBALL_DIR_SET:yes=$(POUND_SIGN)) 493N/A$(SOURCE_TARBALL_DIR_DEFAULT) SOURCE_TARBALL_DIR=$(MODTYPE) 493N/A# Set default download location if not set in module makefile 493N/ASOURCE_URL_DEFAULT = $(SOURCE_URL_SET:yes=$(POUND_SIGN)) 1123N/A$(SOURCE_URL_DEFAULT) SOURCE_URL=$(SOURCE_URL_$(UPSTREAM_PROJECT)) 493N/A# Set default git repo location if not set in module makefile 493N/AGIT_URL_DEFAULT = $(GIT_URL_SET:yes=$(POUND_SIGN)) 493N/A$(GIT_URL_DEFAULT) GIT_URL=$(XORG_GIT_URL)/$(SOURCE_TARBALL_DIR)/$(MODULE_NAME).git 1097N/A# Set default build type to 64-bit if not set in module makefile 156N/ABUILD_TYPES_DEFAULT = $(BUILD_TYPES_SET:yes=$(POUND_SIGN)) 1097N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES=64 493N/A# Set default rules if not set in module/modtype Makefile 493N/ASOURCE_TARGETS_DEFAULT = $(SOURCE_TARGETS_SET:yes=$(POUND_SIGN)) 935N/A$(SOURCE_TARGETS_DEFAULT) SOURCE_TARGETS=$(UNPACK_TARGET) \ 493N/ACONFIGURE_TARGETS_DEFAULT = $(CONFIGURE_TARGETS_SET:yes=$(POUND_SIGN)) 591N/A$(CONFIGURE_TARGETS_DEFAULT) CONFIGURE_TARGETS=default_configure \ 493N/ABUILD_TARGETS_DEFAULT = $(BUILD_TARGETS_SET:yes=$(POUND_SIGN)) 591N/A$(BUILD_TARGETS_DEFAULT) BUILD_TARGETS=default_build \ 493N/AINSTALL_TARGETS_DEFAULT = $(INSTALL_TARGETS_SET:yes=$(POUND_SIGN)) 591N/A$(INSTALL_TARGETS_DEFAULT) INSTALL_TARGETS=default_install \ 493N/A# Additional flags to pass to make in 32-bit & 64-bit builds 922N/ABUILD_32_FLAGS= ARCH_FLAGS="$(ARCH32_FLAGS)" \ 922N/ABUILD_64_FLAGS= ARCH_FLAGS="$(ARCH64_FLAGS)" \ 922N/Aall: $(BUILD_TYPES:%=build_%) 1097N/A# We always want to clean 32 & 64 bit subdirs, plus any special ones 1097N/A# But if we just add clean_32 & clean_64, then make complains when they 1097N/A# end up having multiple targets, so we remove them if they're in the list 1097N/A# generated from $(BUILD_TYPES) 1097N/ACLEAN_RULES_1 = $(BUILD_TYPES:%=clean_%) 1097N/ACLEAN_RULES_2 = $(CLEAN_RULES_1:clean_32=) 1097N/ACLEAN_RULES_3 = $(CLEAN_RULES_2:clean_64=) 1097N/ACLEAN_RULES = clean_32 clean_64 $(CLEAN_RULES_3) 922N/A.PARALLEL: $(CLEAN_RULES) 922N/A# Remove directories with both styles of naming 822N/A# Tell dmake not to remove and create source in parallel 822N/A.NOPARALLEL: clean source 822N/A.NOPARALLEL: clean_$(BUILD_TYPE) source_$(BUILD_TYPE) 922N/ASOURCE_RULES = $(BUILD_TYPES:%=source_%) 922N/A.PARALLEL: $(SOURCE_RULES) 922N/Asource-gen: $(SOURCE_TARGETS) 922N/ACONFIGURE_RULES = $(BUILD_TYPES:%=configure_%) 922N/Aconfigure: $(CONFIGURE_RULES) 922N/A.PARALLEL: $(CONFIGURE_RULES) 922N/Aconfigure-gen: source-gen $(CONFIGURE_TARGETS) 922N/ABUILD_RULES = $(BUILD_TYPES:%=build_%) 922N/A.PARALLEL: $(BUILD_RULES) 922N/Abuild-gen: configure-gen $(BUILD_TARGETS) 922N/AINSTALL_RULES = $(BUILD_TYPES:%=install_%) 922N/Ainstall: $(INSTALL_RULES) 970N/Ainstall-gen: build-gen $(INSTALL_TARGETS) install_metadata 970N/Ainstall-gen: install_pkgconfig_uninstalled install_X11_compat_links 963N/A$(PROTODIR)$(MODULE_DOC_DIR): 493N/ADEBUG_BUILD_FLAGS = BUILD_DEBUG=yes 922N/A# Allow adding "debug-" prefix to rules like build_32, install, etc. 922N/A# Allow debug_XX to run "make all_XX" with debug flags (including without _XX) 493N/A### Source tarballs & downloading if necessary 493N/ASOURCE_TARBALL=$(TARBALLDIR)/$(SOURCE_TARBALL_NAME) 911N/A# Allow downloading from local archive/mirror 1003N/A# TARBALL_ARCHIVE is now set in Makefile.options 911N/AARCHIVE_URL=$(TARBALL_ARCHIVE)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME) 1088N/AGIT_CLONE_DIR=$(MODULE_NAME)-git 493N/A# Download if SOURCE_TARBALL_NAME is not set to NONE and the file either 493N/A# doesn't exist or is empty 705N/A# If MODULE_VERSION is git, checkout source from git repo instead of 911N/Adownload: $(SOURCE_TARBALL) 911N/A$(SOURCE_TARBALL): $(TARBALLDIR) 493N/A if [[
"$(MODULE_VERSION)" =
"git" ]] ;
then \
493N/A if [[
! -d $(GIT_CLONE_DIR) ]] ; then \ 493N/A if [[
! -z "$(GIT_BRANCH)" ]] ; then \ 493N/A if [[
"$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \ 911N/A if [[
! -z "$(TARBALL_ARCHIVE)" ]] ; then \ 935N/ACHECKSUM_TARGET = .checksum_done.$(MODULE_VERSION) 935N/Acheck-checksums: $(CHECKSUM_TARGET) 935N/A$(CHECKSUM_TARGET): $(SOURCE_TARBALL) 911N/A if [[
"$(MODULE_VERSION)" != "git" && \ 911N/A "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \ 911N/A if [[
"$${ACTUAL_MD5}" != "${TARBALL_MD5}" ]] ; then \ 911N/A print -
u2 "ERROR: MD5 sum mismatch on ${SOURCE_TARBALL}\n" \
911N/A "$${ACTUAL_MD5} != ${TARBALL_MD5}" ; \
911N/A if [[
"$${ACTUAL_SHA1}" != "${TARBALL_SHA1}" ]] ; then \ 911N/A print -
u2 "ERROR: SHA1 sum mismatch on ${SOURCE_TARBALL}\n" \
911N/A "$${ACTUAL_SHA1} != ${TARBALL_SHA1}" ; \
1179N/A if [[ -n
"${TARBALL_SHA256}" ]] ;
then \
1179N/A if [[
"$${ACTUAL_SHA256}" != "${TARBALL_SHA256}" ]] ; then \ 1179N/A "ERROR: SHA256 sum mismatch on ${SOURCE_TARBALL}\n" \
1179N/A "$${ACTUAL_SHA256} !=\n ${TARBALL_SHA256}" ; \
911N/A# Submit a tarball to the archive 911N/AARCHIVE_SUBMIT=/ws/x11/tarballs/bin/archive-tarballs 911N/A if [[
"$(MODULE_VERSION)" != "git" && \ 911N/A "$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \ 493N/A# Update a git cloned repo 493N/A if [[
"$(MODULE_VERSION)" =
"git" ]] ;
then \
493N/A if [[
! -z "$(GIT_BRANCH)" ]] ; then \ 1088N/A# Create a local git repo from tarball and patches, to ease generating 1088N/A# patches for submission to upstream git or rebasing to new tarballs 1088N/A print '=================' $$p ; \
0N/A### Unpack source and apply patches 963N/ASOURCE_DEPS = $(SOURCE_TARBALL) $(CHECKSUM_TARGET) \ 935N/A# Step 1: Initialize source dir with upstream sources 935N/A# - if there's a tarball, unpack it. 935N/A# - if using a git master, copy it. 935N/ASOURCE_INIT_TARGET_FILE=.source.init.done 935N/ASOURCE_INIT_TARGET=$(SOURCE_DIR)/$(SOURCE_INIT_TARGET_FILE) 935N/Ainit_source: $(SOURCE_INIT_TARGET) 963N/A$(SOURCE_INIT_TARGET): $(SOURCE_DEPS) 935N/A @
if [[
"$(SOURCE_TARBALL_NAME)" ==
"NONE" ]] ;
then \
493N/A if [[
"$(MODULE_VERSION)" =
"git" ]] ;
then \
935N/A# Step 2: Add in any additional local sources from $(ADDITIONAL_SOURCE_DIR) 935N/A# (done after init source to avoid races in directory/file creation) 935N/ASOURCE_ADD_TARGET_FILE=.source.add.done 935N/ASOURCE_ADD_TARGET=$(SOURCE_DIR)/$(SOURCE_ADD_TARGET_FILE) 935N/Aadd_source: $(SOURCE_ADD_TARGET) 935N/A$(SOURCE_ADD_TARGET): $(SOURCE_INIT_TARGET) 935N/A @
if [[
"$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \ 493N/A if [[
! -x $(LNDIR) ]] ; then \ 935N/A# Step 3: Apply any local patches (may be done in parallel to add_source, 935N/A# but must come after init_source is finished) 935N/A# SOURCE_PATCHES is a list in the format: filename[,flags] 935N/A# $${p/*,} is ksh93 syntax to remove the comma and everything before it in $p 935N/A# $${p%,*} is ksh93 syntax to remove the comma and everything after it in $p 935N/APATCHED_TARGET_FILE=.patches.done 935N/APATCHED_TARGET=$(SOURCE_DIR)/$(PATCHED_TARGET_FILE) 935N/Apatched_source: $(PATCHED_TARGET) 935N/A$(PATCHED_TARGET): $(SOURCE_INIT_TARGET) 935N/A @
if [[
"$(SOURCE_PATCHES)" != "" ]] ; then \ 493N/A if [[
"$$p" != "x" ]] ; then \ 922N/A if [[
"$$p" =~
"," ]] ;
then \
935N/A# Step 4: Apply common Solaris changes to man pages in $(SUNTOUCHED_MANPAGES) 947N/AFIXED_MAN_SUFFIX=mantouch.done 947N/AFIXED_MAN_TARGET=$(SUNTOUCHED_MANPAGES:%=$(SOURCE_DIR)/%.$(FIXED_MAN_SUFFIX)) 935N/Afixed_man: $(FIXED_MAN_TARGET) 1124N/ACOMMON_SUNTOUCH_MAN_FLAGS = -a '{Availability, $(MODULE_PKGNAME)}' 1124N/ACOMMON_SUNTOUCH_MAN_FLAGS += -a '{Interface Stability, $(MODULE_STABILITY)}' 1124N/ACOMMON_SUNTOUCH_MAN_FLAGS += -r '{__distroname__, $(DISTRO_NAME)}' 947N/ADEFAULT_SUNTOUCH_MAN_FLAGS = \ 947N/ASUNTOUCH_MAN_FLAGS_DEFAULT = $(SUNTOUCH_MAN_FLAGS_SET:yes=$(POUND_SIGN)) 947N/A$(SUNTOUCH_MAN_FLAGS_DEFAULT) SUNTOUCH_MAN_FLAGS = $(DEFAULT_SUNTOUCH_MAN_FLAGS) 947N/A$(FIXED_MAN_TARGET): $(PATCHED_TARGET) $(SOURCE_ADD_TARGET) 935N/A# Step 5: Apply common Solaris changes to pkg-config *.pc files listed in 935N/ASOURCE_PC_FILES = $(FIX_PC_FILES:%=$(SOURCE_DIR)/%) 935N/AORIG_PC_FILES = $(SOURCE_PC_FILES:%=%.orig) 935N/AFIXED_PC_TARGET = $(ORIG_PC_FILES) 935N/Afixed_pc: $(FIXED_PC_TARGET) 935N/A -e
's|-L\$${libdir}|-L\$${libdir} -R\$${libdir}|;' \
965N/A -e
's|-R\$${libdir}( .*)? -R\$${libdir}|-R\$${libdir}$$1|g;' \
935N/A$(ORIG_PC_FILES): $(PATCHED_TARGET) 935N/AUNPACK_TARGETS = $(SOURCE_INIT_TARGET) $(PATCHED_TARGET) \ 935N/Adefault_source: $(UNPACK_TARGET) 935N/A$(UNPACK_TARGET): $(SOURCE_DEPS) $(UNPACK_TARGETS) 493N/A### Run configure scripts 191N/A# Include Xorg autoconf macros when rebuilding configure scripts 599N/A# and use automake 1.10 instead of the older 1.9. 935N/AACLOCAL_PATH=/usr/bin/aclocal-1.10 599N/AACLOCAL_INCLUDES = -I $(PROTODIR)$(X11_ACLOCAL_DIR) \ 599N/AAUTOMAKE_PATH=/usr/bin/automake-1.10 599N/AAUTORECONF_ENV= ACLOCAL="$(ACLOCAL_PATH) $(ACLOCAL_INCLUDES)" \ 493N/A# Dependencies for running configure to make a Makefile 922N/ACONFIGURE_DEPS = $(SOURCE_TARGETS) \ 493N/A# Command line options to GNU autoconf configure script 493N/ADEFAULT_CONFIG_OPTS = --prefix=$(MODULE_PREFIX) \ 493N/ACONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) \ 493N/A# Environment variable options to GNU autoconf configure script 493N/A$(USE_DEFAULT_CONFIG_CPPFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_CPPFLAGS= \ 493N/A$(USE_DEFAULT_CONFIG_LDFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_LDFLAGS= \ 967N/ADEFAULT_PKG_CONFIG_PATH=$(TOP)/open-src/common/pc-files/$(BUILD_DIR):$(PROTODIR)$(PKGCONFIG_DIR):$(PROTODIR)$(PKGCONFIG_DIR_SHARE):$(PKGCONFIG_DIR):$(PKGCONFIG_DIR_SHARE) 1111N/A# Most upstream software is written by developers using bash as /bin/sh, so 1111N/A# we run configure scripts with that to minimize problems and work around 1111N/ACONFIG_SHELL_DEFAULT = $(CONFIG_SHELL_SET:yes=$(POUND_SIGN)) 1111N/A$(CONFIG_SHELL_DEFAULT) CONFIG_SHELL = /usr/bin/bash 493N/A# Set USE_DEFAULT_CONFIG_ENV=no in a Makefile to not use this default 493N/A# autoconfig environment 493N/A$(USE_DEFAULT_CONFIG_ENV:no=$(POUND_SIGN)) DEFAULT_CONFIG_ENV = \ 1176N/A LD=
"$(CC) $(ARCH_FLAGS) $(LDFLAGS)" \
493N/A CPPFLAGS=
"$(DEFAULT_CONFIG_CPPFLAGS) $(MODTYPE_CPPFLAGS) $(MODULE_CPPFLAGS)" \
493N/A LDFLAGS=
"$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)" \
493N/ACONFIG_ENV = $(DEFAULT_CONFIG_ENV) $(MODTYPE_CONFIG_ENV) $(MODULE_CONFIG_ENV) 493N/A# File created by running configure - defaults to the top-level Makefile 493N/A# in a source directory unless AUTOCONF_TARGET_SET=yes is set 493N/AAUTOCONF_TARGET_DEFAULT = $(AUTOCONF_TARGET_SET:yes=$(POUND_SIGN)) 493N/A$(AUTOCONF_TARGET_DEFAULT) AUTOCONF_TARGET=$(SOURCE_DIR)/Makefile 493N/A$(AUTOCONF_TARGET): $(CONFIGURE_DEPS) 705N/A if [[
"$(AUTORECONF)" =
"yes" ||
"$(MODULE_VERSION)" =
"git" ]] ;
then \
493N/A if [[
"$(DELIBTOOLIZE)" =
"yes" ]] ;
then \
910N/Adefault_configure: $(AUTOCONF_TARGET) 493N/A### Default rules for common build pattern 493N/ALD_OPTIONS = -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) \ 810N/A# MKDIRPROG - Workaround parallel build race condition 810N/A# in older upstream packaged install-sh 536N/ABUILD_ENV = LD_OPTIONS='$(LD_OPTIONS)' \ 493N/ADEFAULT_BUILD_MAKEFLAGS=$(MODTYPE_MAKEFLAGS) $(MODULE_MAKEFLAGS) \ 922N/A# Dependencies for make build step 922N/ABUILD_DEPS = $(SOURCE_TARGETS) $(CONFIGURE_TARGETS) $(MODTYPE_BUILD_DEPS) $(MODULE_BUILD_DEPS) $(MODULE_MAKE) 1124N/ADEFAULT_BUILD_COMMAND = cd @DIR@ ; \ 1124N/Adefault_build: $(BUILD_DEPS) 1132N/AINSTALL_ENV = $(BUILD_ENV) \ 493N/ADEFAULT_INSTALL_MAKEFLAGS= -e DESTDIR=$(PROTODIR) \ 591N/A# Dependencies for make install step 591N/AINSTALL_DEPS = $(BUILD_TARGETS) $(MODTYPE_INSTALL_DEPS) $(MODULE_INSTALL_DEPS) 1124N/ADEFAULT_INSTALL_COMMAND = cd @DIR@ ; \ 1124N/Adefault_install: $(INSTALL_DEPS) 606N/A# Adjust paths in pkg-config files for -uninstalled variants used during build 705N/A -e
'BEGIN {use Cwd; $$protodir=Cwd::realpath("$(PROTODIR)");}' \
705N/A -e
's|(-[LI]\s*)\$$|$$1$$protodir\$$|g;' \
705N/A -e
's|^sdkdir=|sdkdir=$$protodir|g;' \
837N/A -e
's|$$protodir\$${sdkdir}|\$${sdkdir}|g;' \
910N/AINSTALL_PCU_DEPS_DEFAULT = $(INSTALL_PCU_DEPS_SET:yes=$(POUND_SIGN)) 910N/A$(INSTALL_PCU_DEPS_DEFAULT) INSTALL_PCU_DEPS = $(INSTALL_TARGETS) 910N/Ainstall_pkgconfig_uninstalled: $(INSTALL_PCU_DEPS) 606N/A @
if [[
! -z "$(FIX_PC_FILES)" ]] ; then \ 970N/A# Add links if needed from /usr/X11/* to new locations in /usr/* 970N/AX11_BINCOMPAT_DIR = $(PROTODIR)/usr/X11/bin 970N/AX11_BINCOMPAT_LINKS = $(MODULE_X11_BINCOMPAT_LINKS:%=$(X11_BINCOMPAT_DIR)/%) 970N/AX11_LIBCOMPAT_DIR = $(PROTODIR)/usr/X11/lib$(ARCHLIBSUBDIR) 970N/AX11_LIBCOMPAT_LINKS = $(MODULE_X11_LIBCOMPAT_LINKS:%=$(X11_LIBCOMPAT_DIR)/%) 970N/A$(X11_BINCOMPAT_DIR) $(X11_LIBCOMPAT_DIR): 970N/A$(X11_BINCOMPAT_LINKS): $(X11_BINCOMPAT_DIR) 970N/A$(X11_LIBCOMPAT_LINKS): $(X11_LIBCOMPAT_DIR) 970N/A @
if [[ -z
"$(ARCHLIBSUBDIR)" ]] ;
then \
970N/Ainstall_X11_compat_links: $(X11_BINCOMPAT_LINKS) $(X11_LIBCOMPAT_LINKS) 591N/A# Set comments in ELF binaries to help identify versions/builds 1071N/A$(BUILD_DEBUG:yes=) DEBUG_ELF_COMMENTS=(DEBUG) 1071N/A$(BUILD_DEBUG:yes=) DEBUG_ELF_COMMENTS_FLAGS=-b -B 'hg id' 1071N/A$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_ELF_COMMENTS= 1071N/A$(BUILD_DEBUG:yes=$(POUND_SIGN)) DEBUG_ELF_COMMENTS_FLAGS= 591N/AELF_COMMENTS = $(MODULE_NAME) $(MODULE_VERSION) 1071N/AELF_COMMENTS += $(DEBUG_ELF_COMMENTS) 591N/AELF_COMMENTS += $(MODTYPE_ELF_COMMENTS)$(MODULE_ELF_COMMENTS) 1071N/AELF_COMMENTS_FLAGS = -M '$(ELF_COMMENTS)' 1071N/AELF_COMMENTS_FLAGS += $(DEBUG_ELF_COMMENTS_FLAGS) 994N/AELF_COMMENTS_FLAGS += $(MODTYPE_ELF_COMMENTS_FLAGS) $(MODULE_ELF_COMMENTS_FLAGS) 810N/Aset-elf-comments: $(BUILD_TARGETS:set-elf-comments=) 970N/A# Help generate templates for package manifests 970N/ADEFAULT_LICENSE=$(PKG_LICENSE_DIR)/cr_Oracle $(PKG_LICENSE_DIR)/lic_X11 970N/AMANIFEST_DEST=$(PWD)/tmp-proto-$(MACH) 970N/AMANIFEST_TARGETS_DEFAULT = $(MANIFEST_TARGETS_SET:yes=$(POUND_SIGN)) 970N/A$(MANIFEST_TARGETS_DEFAULT) MANIFEST_TARGETS=$(MODULE_PKG_MANIFEST) 970N/Amanifest: $(MANIFEST_TARGETS) 970N/Amanifest-per-type: $(MODULE_PKG_MANIFEST) 970N/AMANIFEST_INSTALL_RULES = PROTOTOOLSDIR="$(PROTODIR)" \ 970N/A$(MANIFEST_DEST): install 1207N/A$(MANIFEST_TMP): $(MANIFEST_DEST) 970N/A$(MODULE_PKG_MANIFEST): $(MANIFEST_TMP) $(PKG_MANIFEST_DIR) 1201N/A# Convert DocBook/XML to HTML (since Solaris doesn't bundle the xmlto tool 1201N/A# used by most upstream code to do this) 1201N/AXML_TO_HTML = /usr/bin/xsltproc --nonet --xinclude 1201N/AXML_TO_HTML += --stringparam html.stylesheet $(X11_SGML_DIR)/xorg.css 1201N/AXML_TO_HTML += --stringparam current.docid $(@F:.html=) 1201N/AXML_TO_HTML += --stringparam collect.xref.targets no 1201N/AXML_TO_HTML += --path "$(PROTODIR)$(X11_SGML_DIR) $(MODULE_XML_PATH)" 1201N/AXML_TO_HTML += $(TOP)/open-src/doc/xorg-sgml-doctools/xmltohtml.xsl 1201N/A# Convert HTML to text (also normally done by xmlto upstream) 1201N/AHTML_TO_TEXT = /usr/bin/w3m -dump -O UTF-8 1201N/A @
if [[
! -s $@ ]] ; then print "xml to html failed" ; exit 1 ; fi 1201N/A @
if [[
! -s $@ ]] ; then print "html to text failed" ; exit 1 ; fi 493N/A### Other tools/dependencies needed to build 0N/A# Some modules (such as FreeType 2) require GNU make 493N/A @
print -n
"Building with GNU make from $$(whence gmake): " 493N/A @
print "Building with make from $$(whence $(MAKE))" 90N/A# Some modules use lndir to merge in sources from Sun specific directories 47N/A### Useful rules for maintaining patch sets 47N/A# regenerate patches against new baseline to reduce messages about hunks 47N/A# having fuzz or offsets when applying patches - new patches will be in new/ 493N/A print '=================' $$p ; \
1124N/A |
sed -e
's% a/\./prev/$(SOURCE_DIRNAME)/% a/%' -e
's% b/\./tmp-regen/$(SOURCE_DIRNAME)/% b/%' \
935N/A# Allows running "make list-patches" to get a list of all patches we 606N/A# currently apply in our builds 922N/A @
if [[
"$(SOURCE_PATCHES)" != "" ]] ; then \ 606N/A if [[
"$$p" != "x" ]] ; then \ 970N/A print "$${THIS_MODULE}/$${p%,*}" ; \
970N/A### Metadata used in packaging 970N/AMODULE_PKG_METADATA_DIR = $(PROTOMETA)/$(MODULE_PKG_MANIFEST_NAME) 970N/A$(MODULE_PKG_METADATA_DIR): 970N/AMETADATA_TARGETS = $(MODULE_PKG_METADATA_DIR) 970N/A# Base URL for ARC cases used in opensolaris.arc_url metadata 970N/A# Set to '$(ARC_URL)' here, resolved by pkgmogrify to the URL 970N/A# set in pkg/Makefile during the package building process 970N/AARC_URL_BASE = $$(ARC_URL) 970N/A# Metadata about upstream 970N/AUPSTREAM_xorg = X.Org Foundation 970N/AUPSTREAM_URL_xorg = http://www.x.org/ 1123N/ASOURCE_URL_xorg = $(XORG_RELEASES_URL)/$(SOURCE_TARBALL_DIR)/$(SOURCE_TARBALL_NAME) 1123N/AUPSTREAM_xcb = The XCB Project 1123N/AUPSTREAM_URL_xcb = http://xcb.freedesktop.org/ 1123N/ASOURCE_URL_xcb = http://xcb.freedesktop.org/dist/$(SOURCE_TARBALL_NAME) 1123N/AUPSTREAM_PROJECT_DEFAULT = $(UPSTREAM_PROJECT_SET:yes=$(POUND_SIGN)) 1123N/A$(UPSTREAM_PROJECT_DEFAULT) UPSTREAM_PROJECT = xorg 970N/AUPSTREAM_DEFAULT = $(UPSTREAM_SET:yes=$(POUND_SIGN)) 970N/A$(UPSTREAM_DEFAULT) UPSTREAM = $(UPSTREAM_$(SOURCE_TARBALL_NAME)) 970N/A$(UPSTREAM_DEFAULT) UPSTREAM_SET_YET = $(UPSTREAM_$(SOURCE_TARBALL_NAME)_SET) 970N/A$(UPSTREAM_DEFAULT) UPSTREAM_NOTFOUND = $(UPSTREAM_SET_YET:yes=$(POUND_SIGN)) 1123N/A$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM = $(UPSTREAM_$(UPSTREAM_PROJECT)) 1123N/A$(UPSTREAM_NOTFOUND) $(SOURCE_URL_DEFAULT) UPSTREAM_URL = $(UPSTREAM_URL_$(UPSTREAM_PROJECT)) 1105N/AATTRDATA_FILE_NAME = attributes_$(MODULE_NAME).p5m 970N/AATTRDATA_FILE = $(MODULE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME) 970N/AMETADATA_TARGETS += $(ATTRDATA_FILE) 970N/A# $${MODVERS//\.+(0)(\d)/.\2} - ksh93 pattern substitution to remove leading 970N/A# 0's from package version number components, to meet pkg(5) fmri requirements 970N/A%/$(ATTRDATA_FILE_NAME): % 970N/A @
if [[
"$(SOURCE_TARBALL_NAME)" != "NONE" ]] ; then \ 1162N/A print 'set name=info.source-url value="$(SOURCE_URL)"' >> $@ ; \
970N/A @
if [[
"$(UPSTREAM)" != "NONE" ]] ; then \ 970N/A print 'set name=info.upstream value="$(UPSTREAM)"' >> $@ ; \
1162N/A print 'set name=info.upstream-url value="$(UPSTREAM_URL)"' >> $@ ; \
970N/A @
if [[
! -z "$(MODULE_ARC_CASES)" ]] ; then \ 1162N/A print 'set name=org.opensolaris.arc-caseid' \
1162N/A '$(MODULE_ARC_CASES:%=value="%")' >> $@ ; \
970N/A @
if [[
! -z "$(MODULE_PKGCLASS)" ]] ; then \ 970N/A print 'set name=info.classification' \
970N/A 'value="org.opensolaris.category.2008:$(MODULE_PKGCLASS)"' \
970N/A printf '<transform set -> edit value __version:$(MODULE_NAME)__ %s>\n' \
970N/A "$${MODVERS//\.+(0)(\d)/.\2}" >> $@
355N/A# Default license file name is COPYING (X.Org & GNU autoconf default) 355N/A# For other license file names, set LICENSE_FILE to the file name 355N/A# and set LICENSE_FILE_SET=yes 387N/A# A file in the same directory as the Makefile takes precedence 387N/A# over one that is delivered in the package. 355N/ALICENSE_FILE_DEFAULT = $(LICENSE_FILE_SET:yes=$(POUND_SIGN)) 355N/A$(LICENSE_FILE_DEFAULT) LICENSE_FILE=COPYING 1003N/A# Default is the MIT/X11 license 1003N/AMIT_LICENSE_NAME = MIT License ($(MODULE_NAME)) 1003N/AMIT_LICENSE_FILE = $(PKG_SRC_DIR)/license_files/lic_X11 1003N/AMODULE_LICENSE_DEFAULT = $(MODULE_LICENSE_SET:yes=$(POUND_SIGN)) 1003N/A$(MODULE_LICENSE_DEFAULT) MODULE_LICENSE = $(MIT_LICENSE_NAME) 1003N/A# Some packages contain only code that Oracle owns all the rights to. 1003N/A# For these, Makefile.options.oracle.com chooses to omit the license 1003N/A# notice when Oracle is building its distros. Everyone else gets the 1003N/A# notice required by open source license Oracle released the code under. 1003N/ALICENSE_CHOICE_DEFAULT = $(LICENSE_CHOICE_SET:yes=$(POUND_SIGN)) 1003N/A$(LICENSE_CHOICE_DEFAULT) LICENSE_CHOICE=open 1003N/AORACLE_LICENSE_NAME_open = $(MIT_LICENSE_NAME) 1003N/AORACLE_LICENSE_APPEND_open = $(MIT_LICENSE_FILE) 1003N/AORACLE_LICENSE_NAME_Oracle = Oracle Copyright Notice ($(MODULE_NAME)) 1003N/AORACLE_LICENSE_APPEND_Oracle = # Nothing to append to copyright notice 1003N/AORACLE_LICENSE_NAME = $(ORACLE_LICENSE_NAME_$(LICENSE_CHOICE)) 1003N/AORACLE_LICENSE_PREPEND = # Nothing to prepend to copyright notice 1003N/AORACLE_LICENSE_APPEND = $(ORACLE_LICENSE_APPEND_$(LICENSE_CHOICE)) 1003N/A# Use default license info unless MODULE_LICENSE = "Oracle" 1003N/ALICENSE_NAME = $(MODULE_LICENSE) 1003N/ALICENSE_PREPEND = $(MODULE_LICENSE_PREPEND) 1003N/ALICENSE_APPEND = $(MODULE_LICENSE_APPEND) 1003N/ALICENSE_OVERRIDE_1 = $(POUND_SIGN)$(MODULE_LICENSE) 1003N/ALICENSE_OVERRIDE = $(LICENSE_OVERRIDE_1:$(POUND_SIGN)Oracle%=) 1003N/A$(LICENSE_OVERRIDE) LICENSE_NAME = $(ORACLE_LICENSE_NAME) 1003N/A$(LICENSE_OVERRIDE) LICENSE_PREPEND = $(ORACLE_LICENSE_PREPEND) 1003N/A$(LICENSE_OVERRIDE) LICENSE_APPEND = $(ORACLE_LICENSE_APPEND) 970N/ALICENSE_FILE_NAME = license_$(MODULE_NAME) 970N/ALICENSE_FILE_DEST = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME) 1105N/ALICENSE_ATTR_FILE = $(MODULE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME).p5m 970N/Ainstall_license: $(LICENSE_FILE_DEST) 970N/AMETADATA_TARGETS += $(LICENSE_FILE_DEST) 970N/A%/$(LICENSE_FILE_NAME): % $(SOURCE_TARGETS) 970N/A if [[ -f
"$(LICENSE_FILE)" ]] ;
then \
970N/A elif [[ -f
"$(SOURCE_DIR)/$(LICENSE_FILE)" ]] ;
then \
1003N/A if [[ -n
"$${license_to_copy}" ]] ;
then \
1105N/A print 'license $(LICENSE_FILE_NAME) license="$(LICENSE_NAME)"' >
"$@.p5m" ; \
970N/Ainstall_metadata: $(METADATA_TARGETS)