Makefile revision 977
3db86aab554edbb4244c8d1a1c90f152eee768afstevel###############################################################################
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Makefile for X Consolidation packages
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Permission is hereby granted, free of charge, to any person obtaining a
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# copy of this software and associated documentation files (the "Software"),
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# to deal in the Software without restriction, including without limitation
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# the rights to use, copy, modify, merge, publish, distribute, sublicense,
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# and/or sell copies of the Software, and to permit persons to whom the
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Software is furnished to do so, subject to the following conditions:
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# The above copyright notice and this permission notice (including the next
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# paragraph) shall be included in all copies or substantial portions of the
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# DEALINGS IN THE SOFTWARE.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel###############################################################################
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# Heavily inspired by / borrowed from the ON usr/src/pkg/Makefile
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Please read the comments in it and the accompanying README in ON for many
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# details omitted here.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Major differences in the X implementation:
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# - X only supports building one repo, not redist + extra
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# - X only supports building packages on the same platform as the binaries,
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# no cross-platform packaging
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# - X has no bfu legacy to deal with
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# - ON has all manifests in one directory, X splits into current & legacy
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# - Integrates with X consolidation makefile/build system instead of ON's
3db86aab554edbb4244c8d1a1c90f152eee768afstevel### Include common definitions
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# We don't yet support building packages cross-architecture, but would
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# need this if we ever did. (See "Cross platform packaging notes" in
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# the ON usr/src/pkg/Makefile for what we'd have to do.)
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Map X makefile names to the ones used in the rules copied from ON
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# More to be updated if we ever decide to support building cross-platform
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Map the V=1 style of enabling more verbose build messages used in the
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# X.Org/automake builds to the macro used in the rules copied from ON
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# You can enable verbose output with either V=1 or PKGDEBUG=""
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Commands used in rules copied from ON
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# To suppress package dependency generation on any system, regardless
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# of how it was installed, set SUPPRESSPKGDEP=true in the build
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# environment.
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# The packages directory will contain the processed manifests as
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# direct build targets and subdirectories for package metadata extracted
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# incidentally during manifest processing.
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# Nothing underneath $(PDIR) should ever be managed by SCM.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# By default, PKGS will list all manifests. To build and/or publish a
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# subset of packages, override this on the command line or in the
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# build environment and then reference (implicitly or explicitly) the all
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# or install targets.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Track the synthetic manifests separately so we can properly express
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# build rules and dependencies. The synthetic and real packages use
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# different sets of transforms and macros for pkgmogrify.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# Any given package list may be empty, but we can only determine that
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# dynamically, so we always generate all lists.
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# The meanings of each package status are as follows:
3db86aab554edbb4244c8d1a1c90f152eee768afstevel# PKGSTAT meaning
PKGLISTS= \
# Base URL for ARC cases used in opensolaris.arc_url metadata
-e 'if ($$_ =~ m{name=pkg.fmri value=(\S+)}) {' \
$(PKGDEST):
# Automatically exclude all pkg-config uninstalled.pc files, since those