pkg/Makefile
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 23 Sep 2011 14:56:26 -0700
changeset 1215 924b7feb31b8
parent 1207 996eb6e88a18
permissions -rw-r--r--
7091272 Missing reference of .so in /usr/man/man3xi man pages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
###############################################################################
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
# Makefile for X Consolidation packages
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
#
1072
88d1d779286d 7010623 X11R7.6 Update: Library modules
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1057
diff changeset
     5
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
# Permission is hereby granted, free of charge, to any person obtaining a
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
# copy of this software and associated documentation files (the "Software"),
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
# to deal in the Software without restriction, including without limitation
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
# and/or sell copies of the Software, and to permit persons to whom the
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
# Software is furnished to do so, subject to the following conditions:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
# The above copyright notice and this permission notice (including the next
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
# paragraph) shall be included in all copies or substantial portions of the
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
# Software.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
# DEALINGS IN THE SOFTWARE.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
###############################################################################
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
# Heavily inspired by / borrowed from the ON usr/src/pkg/Makefile
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
# Please read the comments in it and the accompanying README in ON for many
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
# details omitted here.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
# Major differences in the X implementation:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
# - X only supports building one repo, not redist + extra
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
# - X only supports building packages on the same platform as the binaries,
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
#	no cross-platform packaging
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
# - X has no bfu legacy to deal with
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
# - ON has all manifests in one directory, X splits into current & legacy
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
# - Integrates with X consolidation makefile/build system instead of ON's
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
PWD:sh=pwd
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
TOP=$(PWD)/..
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
### Include common definitions
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
include $(TOP)/open-src/common/Makefile.init
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
    44
.SUFFIXES: .p5m .mog .dep .res .pub
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
# We don't yet support building packages cross-architecture, but would
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
# need this if we ever did.   (See "Cross platform packaging notes" in
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
# the ON usr/src/pkg/Makefile for what we'd have to do.)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
PKGMACH = $(MACH)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
# Map X makefile names to the ones used in the rules copied from ON
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
# More to be updated if we ever decide to support building cross-platform
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
PKGROOT = $(PROTODIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
PKGDEST = $(PROTOTOP)/pkg_$(PKGMACH)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
# Map the V=1 style of enabling more verbose build messages used in the
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
# X.Org/automake builds to the macro used in the rules copied from ON
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    59
# You can enable verbose output with either V=1 or PKGDEBUG=""
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    60
PKGDEBUG_V_0 = @
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    61
PKGDEBUG_V_1 = 
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
PKGDEBUG_V_ = $(PKGDEBUG_V_0)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
PKGDEBUG = $(PKGDEBUG_V_$(V))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
# Commands used in rules copied from ON
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
CP=             /usr/bin/cp -f
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
LN=             /usr/bin/ln
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
MV=             /usr/bin/mv -f
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
RM=             /usr/bin/rm -f
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
    70
SED=	        /usr/bin/sed
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    71
TOUCH=          /usr/bin/touch
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    73
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    74
# To suppress package dependency generation on any system, regardless
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
# of how it was installed, set SUPPRESSPKGDEP=true in the build
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
# environment.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
SUPPRESSPKGDEP= false
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    79
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
# The packages directory will contain the processed manifests as
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
# direct build targets and subdirectories for package metadata extracted
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
# incidentally during manifest processing.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
# Nothing underneath $(PDIR) should ever be managed by SCM.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    87
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
PDIR= build-$(PKGMACH)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    89
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    90
$(PDIR):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    91
	mkdir -p $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    92
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    93
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    94
# By default, PKGS will list all manifests.  To build and/or publish a
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    95
# subset of packages, override this on the command line or in the
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    96
# build environment and then reference (implicitly or explicitly) the all
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    97
# or install targets.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    98
#
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
    99
CURRENT_MANIFESTS :sh= (cd manifests; print *.p5m)
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   100
LEGACY_MANIFESTS :sh= (cd legacy; print *.p5m)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   101
MANIFESTS = $(CURRENT_MANIFESTS) $(LEGACY_MANIFESTS)
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   102
PKGS= $(MANIFESTS:%.p5m=%)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   103
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   104
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   105
# Track the synthetic manifests separately so we can properly express
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   106
# build rules and dependencies.  The synthetic and real packages use
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   107
# different sets of transforms and macros for pkgmogrify.
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   108
#
1154
941fbafb8c39 7034214 X-redistributable should become X-all and use depend type=group
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1153
diff changeset
   109
SYNTH_PKGS= X-incorporation X-all
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   110
SYNTH_MANIFESTS = $(SYNTH_PKGS:%=%.p5m)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   111
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   112
# Special manifest for exceptions to pass to pkglint & validate_pkg
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   113
EXCEPTION_MANIFESTS = exceptions-validate_pkg.p5m
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   114
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   115
# Manifests are in either manifests or legacy directory - merge in $(PDIR)
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   116
$(PDIR)/%.p5m: manifests/%.p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   117
	$(PKGDEBUG)$(LN) -s ../$< $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   118
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   119
$(PDIR)/%.p5m: legacy/%.p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   120
	$(PKGDEBUG)$(LN) -s ../$< $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   121
1120
cc8eb3f69227 7041658 X packages should not deliver dir actions for mdb directories
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   122
$(PDIR)/%.p5m: %.p5m
cc8eb3f69227 7041658 X packages should not deliver dir actions for mdb directories
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   123
	$(PKGDEBUG)$(LN) -s ../$< $@
cc8eb3f69227 7041658 X packages should not deliver dir actions for mdb directories
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1105
diff changeset
   124
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   125
PMANIFESTS = $(MANIFESTS:%=$(PDIR)/%)
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   126
SMANIFESTS = $(SYNTH_MANIFESTS:%=$(PDIR)/%)
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   127
EMANIFESTS = $(EXCEPTION_MANIFESTS:%=$(PDIR)/%)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   128
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   129
ALL_MANIFESTS = $(PMANIFESTS) $(SMANIFESTS) $(EMANIFESTS)
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   130
manifests: $(ALL_MANIFESTS)
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   131
$(ALL_MANIFESTS): $(PDIR)
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   132
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   133
### Additional metadata generation
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   134
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   135
# This should eventually move into pkg publication
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   136
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   137
FONT_MANIFESTS :sh= (cd manifests; print system-font-*.p5m)
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   138
FONT_METADATA = $(FONT_MANIFESTS:%.p5m=$(PDIR)/%.font)
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   139
FONT_ATTRS = $(FONT_MANIFESTS:%.p5m=$(PDIR)/%.attr)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   140
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   141
$(FONT_ATTRS): $(FONT_METADATA)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   142
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   143
$(PDIR)/%.font: $(PDIR)/%.p5m
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   144
	@print "## Generating font metadata in $(@F)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   145
	$(PKGDEBUG)$(RM) $(@)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   146
	$(PKGDEBUG)$(PERL) generate_font_metadata.pl \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   147
		-p $(PROTODIR) -m $< > $@ || ( rm $@ ; exit 1 )
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   148
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   149
### Manifest mogrification
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   150
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   151
PKGMOGRIFY = pkgmogrify
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   152
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   153
# RELEASE = uname -r for the target release
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   154
RELEASE = 5.11
1189
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   155
PKGVERS_BUILTON = $(RELEASE)
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   156
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   157
# The PKGVERS_BRANCH is determined by the values in the Makefile.buildnum
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   158
include Makefile.buildnum
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   159
PKGVERS_BRANCH_MAIN = 0.$(TRUNKID).$(UPDATENUM).$(SRUNUM).$(PLATNUM)
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   160
PKGVERS_BRANCH = $(PKGVERS_BRANCH_MAIN).$(BUILDID).$(NIGHTLYID)
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   161
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   162
PKGVERS_BUILD = $(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   163
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   164
# Generate pkgmogrify transform file with correct build version info in
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   165
# Build number is derived from last nv_XXX tag in hg log
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   166
$(PDIR)/versions: transforms/versions.tmpl $(PDIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   167
	@print "## Substituting build info in versions transformation template"
1189
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   168
	$(PKGDEBUG) HG_ID="$$(hg id)" ; \
f3178ba616ba 7073616 X package build versions: six dots are better than one
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1172
diff changeset
   169
	$(PERL) -p -e "s{_PKGVERS_BUILD_}{$(PKGVERS_BUILD)};" \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   170
		-e "s{_HG_ID_}{$${HG_ID}}" transforms/versions.tmpl > $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   171
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   172
# Set variables used by pkgmogrify 
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   173
# These are the macros that may be used in package manifests
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   174
PKGMOG_DEFINES = 
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   175
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   176
# Most upstream packages provide specific version numbers instead of using
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   177
# the default of $(OSPKGVERS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   178
# Some use $(X11PKGVERS) to refer to the X11 katamari version since they
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   179
# bundle together components from multiple upstream packages with individual
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   180
# version numbers
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   181
PKGMOG_DEFINES += X11PKGVERS=7.6
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   182
PKGMOG_DEFINES += OSPKGVERS=0.$(RELEASE)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   183
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   184
# Base URL for ARC cases used in opensolaris.arc_url metadata
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   185
PKGMOG_DEFINES += ARC_URL='http://arc.opensolaris.org/caselog/'
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   186
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   187
# Platform specific choices
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   188
PKGMOG_DEFINES += i386_ONLY=$(POUND_SIGN) sparc_ONLY=$(POUND_SIGN)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   189
PKGMOG_DEFINES += $(PKGMACH)_ONLY= 
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   190
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   191
# Architecture specific directory names
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   192
PKGMOG_DEFINES += ARCH=$(PKGMACH)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   193
PKGMOG_DEFINES += ARCH32=$(SUBDIR32_$(PKGMACH))
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   194
PKGMOG_DEFINES += ARCH64=$(SUBDIR64_$(PKGMACH))
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   195
1147
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1139
diff changeset
   196
# Perl version string used in package names, such as pkg:/runtime/perl-512
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1139
diff changeset
   197
PERL_PKG_VERSION_CMD = print $(PERL_VERSION) | tr -d '.'
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1139
diff changeset
   198
PKGMOG_DEFINES += PERL_PKG_VERSION=$(PERL_PKG_VERSION_CMD:sh)
54bcc6a673bf 7054723 X consolidation should move to perl 5.12
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1139
diff changeset
   199
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   200
# Python version string used in path names, such as /usr/lib/python2.6
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   201
PKGMOG_DEFINES += PYTHON_PATH_VERSION=$(PYTHON_VERSION)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   202
# Python version string used in package names, such as pkg:/runtime/python-26
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   203
PYTHON_PKG_VERSION_CMD = print $(PYTHON_VERSION) | tr -d '.'
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   204
PKGMOG_DEFINES += PYTHON_PKG_VERSION=$(PYTHON_PKG_VERSION_CMD:sh)
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   205
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   206
PROC_PKGS = $(PKGS:%=$(PDIR)/%.mog)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   207
PROC_CURRENT_PKGS = $(CURRENT_MANIFESTS:%.p5m=$(PDIR)/%.mog)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   208
PROC_LEGACY_PKGS = $(LEGACY_MANIFESTS:%.p5m=$(PDIR)/%.mog)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   209
PROC_SYNTH_PKGS = $(SYNTH_MANIFESTS:%.p5m=$(PDIR)/%.mog)
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   210
PROC_EXCEPTIONS = $(EXCEPTION_MANIFESTS:%.p5m=$(PDIR)/%.mog)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   211
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   212
# Default transformations to apply
1003
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 982
diff changeset
   213
PM_TRANSFORMS = $(PKG_BRANDING_TRANSFORMS) \
a4d17d6bc179 6980773 X gate needs branding options
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 982
diff changeset
   214
		common_actions publish restart_fmri facets \
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   215
		licenses $(PDIR)/versions
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   216
PM_INC = transforms
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   217
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   218
# Additional transforms for specific types of packages
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   219
$(PROC_CURRENT_PKGS) $(PROC_SYNTH_PKGS) $(PROC_EXCEPTIONS) := \
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   220
	EXTRA_TRANSFORMS = defaults
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   221
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   222
mogrify: $(PROC_PKGS) $(PROC_EXCEPTIONS)
1154
941fbafb8c39 7034214 X-redistributable should become X-all and use depend type=group
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1153
diff changeset
   223
$(PROC_PKGS) $(PROC_SYNTH_PKGS): $(PDIR)/versions
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   224
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   225
# Combine & uniq metadata & license attributes generated during build
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   226
$(PDIR)/%.attr:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   227
	@print "## Gathering metadata from build for $(@F)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   228
	$(PKGDEBUG)case '$(@F)' in \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   229
		system-font-*) ADDITIONAL_ATTRS="$(@:%.attr=%.font)" ;; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   230
	esac ; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   231
	$(PERL) merge-metadata.pl $${ADDITIONAL_ATTRS} \
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   232
		~(N)$(PROTOMETA)/$(@F:.attr=)/attributes_*.p5m \
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   233
		~(N)$(PROTOMETA)/$(@F:.attr=)/license_*.p5m /dev/null > $@
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   234
1105
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   235
$(PDIR)/%.mog: $(PDIR)/%.p5m $(PDIR)/%.attr
515c6398d9df 7010836 Package manifests in X gate should use .p5m naming convention
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1072
diff changeset
   236
	@print "## Processing manifest $(@F:.mog=.p5m)"
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   237
	$(PKGDEBUG)$(RM) $(@) $(@:%.mog=%) \
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   238
		$(@:%.mog=%.metadata.*) $(@:%.mog=%.synth)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   239
	$(PKGDEBUG)$(PKGMOGRIFY) $(PKGMOG_VERBOSE) $(PM_INC:%= -I %) \
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   240
		$(PKGMOG_DEFINES:%=-D %) -O $(@) \
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   241
		$(@:%.mog=%.p5m) $(@:%.mog=%.attr) \
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   242
		$(PM_TRANSFORMS) $(EXTRA_TRANSFORMS)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   243
	$(PKGDEBUG)$(TOUCH) $(@)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   244
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   245
### Dependency detection
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   246
DEP_PKGS= $(PKGS:%=$(PDIR)/%.dep)
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   247
DEP_CURRENT_PKGS = $(CURRENT_MANIFESTS:%.p5m=$(PDIR)/%.dep)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   248
DEP_LEGACY_PKGS = $(LEGACY_MANIFESTS:%.p5m=$(PDIR)/%.dep)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   249
DEP_SYNTH_PKGS = $(SYNTH_MANIFESTS:%.p5m=$(PDIR)/%.dep)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   250
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   251
PKGDEP_TOKENS_i386= \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   252
	'PLATFORM=i86hvm' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   253
	'PLATFORM=i86pc' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   254
	'PLATFORM=i86xpv' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   255
	'ISALIST=amd64' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   256
	'ISALIST=i386'
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   257
PKGDEP_TOKENS_sparc= \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   258
	'PLATFORM=sun4u' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   259
	'PLATFORM=sun4v' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   260
	'ISALIST=sparcv9' \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   261
	'ISALIST=sparc'
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   262
PKGDEP_TOKENS= $(PKGDEP_TOKENS_$(PKGMACH))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   263
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   264
$(PDIR)/%.dep: $(PDIR)/%.mog
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   265
	@print "## Generating dependencies for $(<F)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   266
	$(PKGDEBUG)$(RM) $(@)
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   267
	$(PKGDEBUG)if [[ "$(SUPPRESSPKGDEP)" != "true" ]]; then \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   268
		pkgdepend generate -m $(PKGDEP_TOKENS:%=-D %) $(<) \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   269
			$(PKGROOT) > $(@); \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   270
	else \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   271
		$(CP) $(<) $(@); \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   272
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   273
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   274
$(DEP_SYNTH_PKGS) $(DEP_LEGACY_PKGS): $$(@:%.dep=%.mog)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   275
	@print "## Skipping dependency generation for $(@F:%.dep=%)"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   276
	$(PKGDEBUG)$(CP) $(@:%.dep=%.mog) $(@)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   277
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   278
### Dependency resolution
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   279
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   280
DEP_RES_PKGS = $(PKGS:%=$(PDIR)/%.dep.res)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   281
DEP_RES_CURRENT_PKGS = $(CURRENT_MANIFESTS:%.p5m=$(PDIR)/%.dep.res)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   282
DEP_RES_LEGACY_PKGS = $(LEGACY_MANIFESTS:%.p5m=$(PDIR)/%.dep.res)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   283
DEP_RES_SYNTH_PKGS = $(SYNTH_MANIFESTS:%.p5m=$(PDIR)/%.dep.res)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   284
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   285
PKGDEP_VERBOSE_FLAG_0 =
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   286
PKGDEP_VERBOSE_FLAG_1 = -v
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   287
PKGDEP_VERBOSE_FLAG = $(PKGDEP_VERBOSE_FLAG_$(V))
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   288
1046
ecba5d6aaf2e 7002412 X builds using build 153 pkg bits will fail to generate automatic dependencies
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1009
diff changeset
   289
# Root of pkg image to use for dependency resolution
ecba5d6aaf2e 7002412 X builds using build 153 pkg bits will fail to generate automatic dependencies
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1009
diff changeset
   290
# Normally / on the machine used to build the binaries
ecba5d6aaf2e 7002412 X builds using build 153 pkg bits will fail to generate automatic dependencies
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1009
diff changeset
   291
PKGDEP_RESOLVE_IMAGE = /
ecba5d6aaf2e 7002412 X builds using build 153 pkg bits will fail to generate automatic dependencies
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1009
diff changeset
   292
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   293
# This rule resolves dependencies across all manifests for packages
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   294
# currently delivering files.
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   295
$(PDIR)/gendeps: $(DEP_CURRENT_PKGS)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   296
	$(PKGDEBUG)if [[ "$(SUPPRESSPKGDEP)" = "true" ]]; then \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   297
		print "## Suppressing dependency resolution"; \
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   298
		for p in $(DEP_CURRENT_PKGS:%.dep=%); do \
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   299
			$(CP) $$p.dep $$p.dep.res; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   300
		done; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   301
	else \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   302
		print "## Resolving dependencies"; \
1046
ecba5d6aaf2e 7002412 X builds using build 153 pkg bits will fail to generate automatic dependencies
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1009
diff changeset
   303
		pkgdepend -R $(PKGDEP_RESOLVE_IMAGE) resolve \
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   304
		    $(PKGDEP_VERBOSE_FLAG) -m $(DEP_CURRENT_PKGS) ; \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   305
	fi
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   306
	$(PKGDEBUG)$(TOUCH) $(@)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   307
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   308
gendeps: $(PDIR)/gendeps
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   309
$(DEP_RES_CURRENT_PKGS): $(PDIR)/gendeps
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   310
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   311
$(DEP_RES_SYNTH_PKGS) $(DEP_RES_LEGACY_PKGS): $$(@:%.dep.res=%.dep)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   312
	@print "## Skipping dependency generation for $(@F:%.dep.res=%)"
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   313
	$(PKGDEBUG)$(CP) $(@:%.dep.res=%.dep) $(@)
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   314
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   315
# Post-processing of manifests after dependency resolution
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   316
RES_PKGS = $(PKGS:%=$(PDIR)/%.res)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   317
RES_CURRENT_PKGS = $(CURRENT_MANIFESTS:%.p5m=$(PDIR)/%.res)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   318
RES_LEGACY_PKGS = $(LEGACY_MANIFESTS:%.p5m=$(PDIR)/%.res)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   319
RES_SYNTH_PKGS = $(SYNTH_MANIFESTS:%.p5m=$(PDIR)/%.res)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   320
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   321
POST_TRANSFORMS = post-pkgdepend extract_metadata
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   322
$(PDIR)/%.res: $(PDIR)/%.dep.res
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   323
	@print "## Post-processing manifest for $(@F:%.res=%)"
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   324
	$(PKGDEBUG)if [[ -s $< ]] ; then \
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   325
		$(PKGMOGRIFY) $(PKGMOG_VERBOSE) $(PM_INC:%= -I %) \
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   326
		 -O $@ -P $(@:%.res=%.synth) $< $(POST_TRANSFORMS) ; \
1152
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   327
	else \
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   328
		$(CP) $< $@ ; \
6cf0f98f6d5f 6979433 several X packages missing dependencies on ogl-select package
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1147
diff changeset
   329
	fi
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   330
1153
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   331
# Generate info for synthetic manifests
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   332
$(RES_SYNTH_PKGS): $(RES_PKGS) $$(@:%.res=%.dep.res)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   333
	@print "## Gathering package lists for synthetic package $(@F:%.res=%)"
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   334
	$(PKGDEBUG)$(PKGMOGRIFY) $(PKGMOG_VERBOSE) $(PM_INC:%= -I %) \
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   335
		-O $(@) -P $(@:%.res=%.synth.sed) \
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   336
		$(@:%.res=%.dep.res) synthetic
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   337
	$(PKGDEBUG)$(SED) -n -f $(@:%.res=%.synth.sed) $(PDIR)/*.synth >> $(@)
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   338
912dd58dfc72 7059188 simplify and mogrify X meta-package synthesis
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1152
diff changeset
   339
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   340
### pkglint checking (pre-publication)
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   341
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   342
PKGLINT = pkglint
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   343
PKGLINTRC = prepub-pkglintrc
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   344
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   345
#
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   346
# This rule runs pkglint across all manifests to be published.
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   347
#
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   348
# We require that packages be free from lint ERRORs before allowing them
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   349
# to be published.  Lint WARNINGs are acceptable (though unpleasant)
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   350
# The list of packages is the list of packages that did not resolve to
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   351
# 0-byte files, $CHECK_PKGS
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   352
#
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   353
$(PDIR)/checkmf: $(PDIR)/gendeps $(DEP_SYNTH_PKGS) $(DEP_PKGS)
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   354
	@print "## Checking packages"
1161
92cb0ee2804d 7061971 X builds shouldn't re-run pkglint when processed manifests haven't changed
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1154
diff changeset
   355
	@$(RM) $@
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   356
	@$(TOUCH) $(PDIR)/pkglint-output.txt
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   357
	-$(PKGDEBUG)for p in $(DEP_SYNTH_PKGS:%.dep=%) $(DEP_PKGS:%.dep=%); do \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   358
		if [[ -s $$p.res ]]; then \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   359
			CHECK_PKGS="$$p.res $${CHECK_PKGS}"; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   360
		fi; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   361
	done; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   362
	if [[ -n "$${CHECK_PKGS}" ]]; then \
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   363
		$(PKGLINT) -f $(PKGLINTRC) $${CHECK_PKGS} $(PROC_EXCEPTIONS) \
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   364
		    2> $(PDIR)/pkglint-output.txt; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   365
	fi ; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   366
	if grep '^ERROR' $(PDIR)/pkglint-output.txt; then \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   367
		return 1; \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   368
	fi
1161
92cb0ee2804d 7061971 X builds shouldn't re-run pkglint when processed manifests haven't changed
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1154
diff changeset
   369
	@$(TOUCH) $@
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   370
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   371
### Repo setup
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   372
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   373
# Default in developer builds is "xnv-devel"
1161
92cb0ee2804d 7061971 X builds shouldn't re-run pkglint when processed manifests haven't changed
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1154
diff changeset
   374
# X RE cronjob build scripts override to "xnv-nightly"
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   375
PKGPUBLISHER = xnv-devel
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   376
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   377
# Initialize the empty on-disk repositories
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   378
$(PKGDEST):
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   379
	@print "## Initializing $(@F)"
1139
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   380
	$(PKGDEBUG)pkgrepo create --version 4 $(@)
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   381
	$(PKGDEBUG)pkgrepo add-publisher -s $(@) $(PKGPUBLISHER)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   382
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   383
clean-repo:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   384
	$(RM) -r $(PKGDEST)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   385
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   386
### Package publication to repo
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   387
PUB_PKGS= $(SYNTH_PKGS:%=$(PDIR)/%.pub) $(PKGS:%=$(PDIR)/%.pub)
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   388
publish_pkgs: $(PKGDEST) $(PDIR)/gendeps $(PDIR)/checkmf $(PUB_PKGS)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   389
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   390
$(PUB_PKGS): $(PKGDEST) $(PDIR)/gendeps $(PDIR)/checkmf
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   391
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   392
$(PDIR)/%.pub:  $(PKGDEST) $(PDIR)/gendeps $(PDIR)/%.res
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   393
	$(PKGDEBUG) if [ -s $(@:%.pub=%.res) ]; then \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   394
		print "## Publishing $(@F:%.pub=%) to proto repository"; \
1139
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   395
		pkgsend -s $(PKGDEST) publish -d $(PKGROOT) \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   396
		    -d license_files -d $(PROTOMETA)/$(@F:%.pub=%) \
1132
d9f96853a754 7047456 X could do better at building & packaging python bits
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1130
diff changeset
   397
		    --fmri-in-manifest --no-index --no-catalog -T '*.py' \
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   398
		    $(@:%.pub=%.res) > /dev/null; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   399
	fi; \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   400
	$(TOUCH) $(@)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   401
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   402
### Repo finalization
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   403
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   404
install: repository-metadata
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   405
default: install
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   406
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   407
repository-metadata: $(PUB_PKGS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   408
	@print "## Creating repository metadata"
1139
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   409
	$(PKGDEBUG)pkgrepo refresh -s $(PKGDEST)
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   410
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   411
### pkglint checking (post-publication)
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   412
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   413
LINT_PKGLINTRC = postpub-pkglintrc
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   414
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   415
#
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   416
# Perform a pkglint run on the published repositories.  We remove package
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   417
# version information from the lint output so that it is comparable across
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   418
# lint runs.
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   419
#
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   420
lint:
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   421
	@print "## Running pkglint on the $(PKGPUBLISHER) repository"
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   422
	-$(PKGDEBUG)$(PKGLINT) -f $(LINT_PKGLINTRC) \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   423
	    -l file://$(PKGDEST) -c /tmp/pkglint_cache.$$$$ \
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   424
	    $(PKGLINT_REFERENCE_REPO:%=-r %) \
1139
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   425
	    > $(PDIR)/pkglint.out 2> $(PDIR)/pkglint.lint ; \
5625f8498d99 7048514 X gate should use pkgrepo command
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1132
diff changeset
   426
	grep '^Error:' $(PDIR)/pkglint.out ; \
1130
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   427
	$(RM) -rf /tmp/pkglint_cache.$$$$
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   428
	$(PKGDEBUG)$(SED) -e 's/@[0-9TZ.:,-]*//g' $(PDIR)/pkglint.lint
e9cbce844ef6 7041591 duplicate and missing dependencies in x11 IPS packages
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1120
diff changeset
   429
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   430
### Overall rules
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   431
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   432
all: $(PROC_PKGS) $(PROC_SYNTH_PKGS) $(DEP_PKGS) $(DEP_SYNTH_PKGS) \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   433
	$(PDIR)/gendeps
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   434
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   435
clean:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   436
	-$(RM) -r $(PDIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   437
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   438
.PARALLEL: $(PKGS) $(PROC_PKGS) $(DEP_PKGS) \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   439
	$(PROC_SYNTH_PKGS) $(DEP_SYNTH_PKGS) $(PUB_PKGS)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   440
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   441
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   442
# rules to validate proto area against manifests, and check for safe
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   443
# file permission modes
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   444
#
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   445
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   446
EXCEPTIONS= $(PWD)/../exception_lists/packaging $(PDIR)/generated-exceptions
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   447
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   448
# Automatically exclude all pkg-config uninstalled.pc files, since those
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   449
# should never be packaged
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   450
$(PDIR)/generated-exceptions:
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   451
	$(PKGDEBUG)(cd $(PKGROOT) ; find . -name '*-uninstalled.pc') > $@
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   452
1172
4597acbe535f 7041659 X packages should not deliver dir actions for directories defined elsewhere
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1161
diff changeset
   453
protocmp: $(PROC_PKGS) $(EXCEPTIONS) $(PROC_EXCEPTIONS) fix_perms
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   454
	$(PKGDEBUG)validate_pkg -a $(PKGMACH) -v $(EXCEPTIONS:%=-e %) \
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   455
		-m $(PDIR) -p $(PKGROOT)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   456
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   457
pmodes: $(PROC_PKGS) fix_perms
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   458
	$(PKGDEBUG)validate_pkg -a $(PKGMACH) -M -m $(PDIR)
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   459
1207
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   460
check-pkgfmt: $(ALL_MANIFESTS)
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   461
	@print "## Checking for manifests not in pkgfmt expected form"
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   462
	$(PKGDEBUG)$(PKGFMT) -c $(ALL_MANIFESTS) || true
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   463
	@print ""
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   464
996eb6e88a18 7086641 X package manifests should move to pkgfmt version 2
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1189
diff changeset
   465
check: protocmp pmodes lint check-pkgfmt
970
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   466
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   467
# Instead of fixing all the upstream packages to follow our permission rules
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   468
# just fix the proto area to match our rules
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   469
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   470
fix_perms: 
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   471
	@print "## Fixing proto area permissions"
272328fe1b4a 6941932 X should be able to build IPS packages natively
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   472
	$(PKGDEBUG)find $(PKGROOT) -type f -exec chmod a-w \{\} \+