make-rules/ips.mk
author Phi Tran <Phi.N.Tran@Oracle.COM>
Thu, 05 Jun 2014 14:00:37 -0700
changeset 1935 0060df5060fa
parent 1913 bf893655bc39
child 1948 2d1537e7942d
permissions -rw-r--r--
18262073 cdrtools shouldn't really build with -fast
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     1
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     2
# CDDL HEADER START
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     3
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     7
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    11
# and limitations under the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    12
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    18
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    19
# CDDL HEADER END
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    20
#
1890
5a4ef66c42bf 16808434 Many components probably don't need a PATH line in their Makefiles
david.comay@oracle.com
parents: 1756
diff changeset
    21
5a4ef66c42bf 16808434 Many components probably don't need a PATH line in their Makefiles
david.comay@oracle.com
parents: 1756
diff changeset
    22
#
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1609
diff changeset
    23
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    24
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    25
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    26
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    27
# Rules and Macros for generating an IPS package manifest and publishing an
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    28
# IPS package to a pkg depot.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    29
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    30
# To use these rules, include ../make-rules/ips.mk in your Makefile
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    31
# and define an "install" target appropriate to building your component.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    32
# Ex:
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    33
#
59
7500d63edb42 7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
    34
#	install:	$(BUILD_DIR)/build/$(MACH32)/.installed \
7500d63edb42 7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
    35
#	 		$(BUILD_DIR)/build/$(MACH64)/.installed
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    36
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    37
# This set of rules makes the "publish" target the default target for make(1)
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    38
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    39
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    40
PKGDEPEND =	/usr/bin/pkgdepend
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    41
PKGFMT =	/usr/bin/pkgfmt
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    42
PKGMOGRIFY =	/usr/bin/pkgmogrify
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    43
PKGSEND =	/usr/bin/pkgsend
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1152
diff changeset
    44
ifeq   ($(strip $(PKGLINT_COMPONENT)),)
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    45
PKGLINT =	/usr/bin/pkglint
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1152
diff changeset
    46
else
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1152
diff changeset
    47
PKGLINT =	${WS_TOOLS}/pkglint
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1152
diff changeset
    48
endif
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
    49
PKGMANGLE =	$(WS_TOOLS)/userland-mangler
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    50
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    51
# Package headers should all pretty much follow the same format
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    52
METADATA_TEMPLATE =		$(WS_TOP)/transforms/manifest-metadata-template
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    53
COPYRIGHT_TEMPLATE =		$(WS_TOP)/transforms/copyright-template
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    54
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    55
# order is important
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    56
GENERATE_TRANSFORMS +=		$(WS_TOP)/transforms/generate-cleanup
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    57
683
c613b3449c36 7079363 gcc-3.p5m package manifest file shouldn't deliver .la files
Rich Burridge <rich.burridge@oracle.com>
parents: 582
diff changeset
    58
PKGMOGRIFY_TRANSFORMS +=	$(WS_TOP)/transforms/libtool-drop
c613b3449c36 7079363 gcc-3.p5m package manifest file shouldn't deliver .la files
Rich Burridge <rich.burridge@oracle.com>
parents: 582
diff changeset
    59
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    60
COMPARISON_TRANSFORMS +=	$(WS_TOP)/transforms/comparison-cleanup
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    61
COMPARISON_TRANSFORMS +=	$(PKGMOGRIFY_TRANSFORMS)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    62
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1188
diff changeset
    63
LICENSE_TRANSFORMS =		$(WS_TOP)/transforms/license-changes
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1188
diff changeset
    64
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    65
# order is important
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1188
diff changeset
    66
PUBLISH_TRANSFORMS +=	$(LICENSE_TRANSFORMS)
151
f9e42a3f7095 7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 145
diff changeset
    67
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/variant-cleanup
206
a4474882bf60 7010355 python needs to be packaged to separate out non-core dependencies
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 197
diff changeset
    68
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/autopyc
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    69
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/defaults
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    70
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/actuators
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    71
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/devel
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    72
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/docs
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    73
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/locale
1890
5a4ef66c42bf 16808434 Many components probably don't need a PATH line in their Makefiles
david.comay@oracle.com
parents: 1756
diff changeset
    74
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/standard-libraries-past-py2.6
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
    75
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/python-rename
1913
bf893655bc39 15819724 SUNBT7202228 python 3.4 (drop nonexistent group dependencies)
John Beck <John.Beck@Oracle.COM>
parents: 1907
diff changeset
    76
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/python-3-groups
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    77
PUBLISH_TRANSFORMS +=	$(PKGMOGRIFY_TRANSFORMS)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    78
PUBLISH_TRANSFORMS +=	$(WS_TOP)/transforms/publish-cleanup
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    79
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    80
PKG_MACROS +=		MACH=$(MACH)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    81
PKG_MACROS +=		MACH32=$(MACH32)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    82
PKG_MACROS +=		MACH64=$(MACH64)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    83
PKG_MACROS +=		PUBLISHER=$(PUBLISHER)
827
0944d8c0158b 7169052 Integrate Visual Panels into Userland
Dan Labrecque <dan.labrecque@oracle.com>
parents: 683
diff changeset
    84
PKG_MACROS +=		PUBLISHER_LOCALIZABLE=$(PUBLISHER_LOCALIZABLE)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    85
PKG_MACROS +=		CONSOLIDATION=$(CONSOLIDATION)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    86
PKG_MACROS +=		BUILD_VERSION=$(BUILD_VERSION)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    87
PKG_MACROS +=		SOLARIS_VERSION=$(SOLARIS_VERSION)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    88
PKG_MACROS +=		OS_VERSION=$(OS_VERSION)
944
457586ba0add 7190084 Userland needs to update its IPS schema for S12
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 827
diff changeset
    89
PKG_MACROS +=		PKG_SOLARIS_VERSION=$(PKG_SOLARIS_VERSION)
582
f788d69e0553 7085723 use pkg.human-version
Rich Burridge <rich.burridge@oracle.com>
parents: 379
diff changeset
    90
PKG_MACROS +=		HUMAN_VERSION=$(HUMAN_VERSION)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    91
PKG_MACROS +=		IPS_COMPONENT_VERSION=$(IPS_COMPONENT_VERSION)
93
b579c7b1bb44 7016731 move zsh from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents: 84
diff changeset
    92
PKG_MACROS +=		COMPONENT_VERSION=$(COMPONENT_VERSION)
166
db8a55996482 6979538 /usr/share/gettext/po/Rules-quot contains garbage
Marcel Telka <marcel.telka@oracle.com>
parents: 152
diff changeset
    93
PKG_MACROS +=		COMPONENT_PROJECT_URL=$(COMPONENT_PROJECT_URL)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
    94
PKG_MACROS +=		COMPONENT_ARCHIVE_URL=$(COMPONENT_ARCHIVE_URL)
379
c6a17bba1da3 7038754 vim 7.3
Danek Duvall <danek.duvall@oracle.com>
parents: 369
diff changeset
    95
PKG_MACROS +=		COMPONENT_HG_URL=$(COMPONENT_HG_URL)
c6a17bba1da3 7038754 vim 7.3
Danek Duvall <danek.duvall@oracle.com>
parents: 369
diff changeset
    96
PKG_MACROS +=		COMPONENT_HG_REV=$(COMPONENT_HG_REV)
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1188
diff changeset
    97
PKG_MACROS +=		COMPONENT_NAME=$(COMPONENT_NAME)
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1188
diff changeset
    98
PKG_MACROS +=		TPNO=$(TPNO)
1609
87293f3666a2 17599591 The Python tox module needs to be added to Userland (fix build)
Rich Burridge <rich.burridge@oracle.com>
parents: 1432
diff changeset
    99
PKG_MACROS +=		PYTHON_2.6_ONLY=\#
87293f3666a2 17599591 The Python tox module needs to be added to Userland (fix build)
Rich Burridge <rich.burridge@oracle.com>
parents: 1432
diff changeset
   100
PKG_MACROS +=		PYTHON_2.7_ONLY=\#
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   101
PKG_MACROS +=		PYTHON_3.4_ONLY=\#
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   102
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   103
PKG_OPTIONS +=		$(PKG_MACROS:%=-D %)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   104
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   105
MANGLED_DIR =	$(PROTO_DIR)/mangled
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   106
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   107
PKG_PROTO_DIRS += $(MANGLED_DIR) $(PROTO_DIR) $(@D) $(COMPONENT_DIR) $(COMPONENT_SRC)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 93
diff changeset
   108
59
7500d63edb42 7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
   109
MANIFEST_BASE =		$(BUILD_DIR)/manifest-$(MACH)
12
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   110
30
440b6ca0641d Removed $(PUBLISHER) from pkg.fmri package attributes. Renamed package
Danek Duvall <danek.duvall@oracle.com>
parents: 27
diff changeset
   111
CANONICAL_MANIFESTS =	$(wildcard *.p5m)
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   112
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   113
# Look for manifests which need to be duplicated for each version of python.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   114
ifeq ($(findstring -PYVER,$(CANONICAL_MANIFESTS)),-PYVER)
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   115
UNVERSIONED_MANIFESTS = $(filter-out %GENFRAG.p5m,$(filter-out %-PYVER.p5m,$(CANONICAL_MANIFESTS)))
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   116
PY_MANIFESTS = $(filter %-PYVER.p5m,$(CANONICAL_MANIFESTS))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   117
PYV_MANIFESTS = $(foreach v,$(shell echo $(PYTHON_VERSIONS) | tr -d .),$(shell echo $(PY_MANIFESTS) | sed -e 's/-PYVER.p5m/-$(v).p5m/g'))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   118
PYNV_MANIFESTS = $(shell echo $(PY_MANIFESTS) | sed -e 's/-PYVER//')
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   119
else
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   120
UNVERSIONED_MANIFESTS = $(CANONICAL_MANIFESTS)
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   121
endif
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   122
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   123
# Look for manifests which need to be duplicated for each version of perl.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   124
ifeq ($(findstring -PERLVER,$(UNVERSIONED_MANIFESTS)),-PERLVER)
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   125
NOPERL_MANIFESTS = $(filter-out %GENFRAG.p5m,$(filter-out %-PERLVER.p5m,$(UNVERSIONED_MANIFESTS)))
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   126
PERL_MANIFESTS = $(filter %-PERLVER.p5m,$(UNVERSIONED_MANIFESTS))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   127
PERLV_MANIFESTS = $(foreach v,$(shell echo $(PERL_VERSIONS) | tr -d .),$(shell echo $(PERL_MANIFESTS) | sed -e 's/-PERLVER.p5m/-$(v).p5m/g'))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   128
PERLNV_MANIFESTS = $(shell echo $(PERL_MANIFESTS) | sed -e 's/-PERLVER//')
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   129
else
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   130
NOPERL_MANIFESTS = $(UNVERSIONED_MANIFESTS)
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   131
endif
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   132
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   133
VERSIONED_MANIFESTS = \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   134
	$(PYV_MANIFESTS) $(PYNV_MANIFESTS) \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   135
	$(PERLV_MANIFESTS) $(PERLNV_MANIFESTS) \
1152
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   136
	$(NOPERL_MANIFESTS)
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   137
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   138
GENERATED =		$(MANIFEST_BASE)-generated
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   139
COMBINED =		$(MANIFEST_BASE)-combined
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   140
MANIFESTS =		$(VERSIONED_MANIFESTS:%=$(MANIFEST_BASE)-%)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   141
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   142
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   143
DEPENDED=$(VERSIONED_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.depend)
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   144
RESOLVED=$(VERSIONED_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.depend.res)
185
773dda89f186 7036473 dependency resolution should happen in one step for all component's packages
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
   145
PUBLISHED=$(RESOLVED:%.depend.res=%.published)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   146
255
52abf74b9323 7037058 Move fetchmail to Userland
Marcel Telka <marcel.telka@oracle.com>
parents: 206
diff changeset
   147
COPYRIGHT_FILE ?=	$(COMPONENT_NAME)-$(COMPONENT_VERSION).copyright
145
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   148
IPS_COMPONENT_VERSION ?=	$(COMPONENT_VERSION)
7
d42300cb8715 add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 4
diff changeset
   149
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   150
.DEFAULT:		publish
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   151
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   152
.SECONDARY:
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   153
197
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 196
diff changeset
   154
# allow publishing to be overridden, such as when
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 196
diff changeset
   155
# a package is for one architecture only.
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 196
diff changeset
   156
PUBLISH_STAMP ?= $(BUILD_DIR)/.published-$(MACH)
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 196
diff changeset
   157
fd801ec0737c 7038707 move acpidump to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 196
diff changeset
   158
publish:		build install $(PUBLISH_STAMP)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   159
30
440b6ca0641d Removed $(PUBLISHER) from pkg.fmri package attributes. Renamed package
Danek Duvall <danek.duvall@oracle.com>
parents: 27
diff changeset
   160
sample-manifest:	$(GENERATED).p5m
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   161
46
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   162
$(GENERATED).p5m:	install
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   163
	$(PKGSEND) generate $(PKG_HARDLINKS:%=--target %) $(PROTO_DIR) | \
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   164
	$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 $(GENERATE_TRANSFORMS) | \
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   165
		sed -e '/^$$/d' -e '/^#.*$$/d' | $(PKGFMT) | \
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   166
		cat $(METADATA_TEMPLATE) - >$@
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   167
46
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   168
# copy the canonical manifest(s) to the build tree
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   169
$(MANIFEST_BASE)-%.generate:	%.p5m canonical-manifests
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   170
	cat $(METADATA_TEMPLATE) $< >$@
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   171
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   172
# The text of a transform that will emit a dependency conditional on the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   173
# presence of a particular version of a runtime, which will then draw in the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   174
# runtime-version-specific version of the package we're operating on.  $(1) is
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   175
# the name of the runtime package, and $(2) is the version suffix.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   176
mkgeneric = \
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   177
	echo "<transform set name=pkg.fmri value=(?:pkg:/)?(.+)-\#\#\#PYV\#\#\#@(.*)" \
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   178
		"-> emit depend nodrop=true type=conditional" \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   179
		"predicate=$(1)-$(2) fmri=%<1>-$(2)@%<2>>" >> $@;
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   180
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   181
# Define and execute a macro that generates a rule to create a manifest for a
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   182
# python module specific to a particular version of the python runtime.
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   183
# Creates build/manifest-*-modulename-##.p5m file where ## is replaced with
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   184
# the version number.
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   185
define python-manifest-rule
1609
87293f3666a2 17599591 The Python tox module needs to be added to Userland (fix build)
Rich Burridge <rich.burridge@oracle.com>
parents: 1432
diff changeset
   186
$(MANIFEST_BASE)-%-$(shell echo $(1) | tr -d .).mogrified: PKG_MACROS += PYTHON_$(1)_ONLY=
87293f3666a2 17599591 The Python tox module needs to be added to Userland (fix build)
Rich Burridge <rich.burridge@oracle.com>
parents: 1432
diff changeset
   187
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   188
$(MANIFEST_BASE)-%-$(shell echo $(1) | tr -d .).p5m: %-PYVER.p5m
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   189
	if [ -f $$*-$(shell echo $(1) | tr -d .)GENFRAG.p5m ]; then cat $$*-$(shell echo $(1) | tr -d .)GENFRAG.p5m >> $$@; fi
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   190
	$(PKGMOGRIFY) -D PYVER=$(1) -D PYV=$(shell echo $(1) | tr -d .) $$< > $$@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   191
endef
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   192
$(foreach ver,$(PYTHON_VERSIONS),$(eval $(call python-manifest-rule,$(ver))))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   193
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   194
# A rule to create a helper transform package for python, that will insert the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   195
# appropriate conditional dependencies into a python library's
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   196
# runtime-version-generic package to pull in the version-specific bits when the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   197
# corresponding version of python is on the system.
1430
24f4aebfd6a5 17300973 ips.mk is a little racey
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1428
diff changeset
   198
$(BUILD_DIR)/mkgeneric-python: $(WS_TOP)/make-rules/shared-macros.mk
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   199
	$(RM) $@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   200
	$(foreach ver,$(shell echo $(PYTHON_VERSIONS) | tr -d .), \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   201
		$(call mkgeneric,runtime/python,$(ver)))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   202
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   203
# Build Python version-wrapping manifests from the generic version.
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   204
# Creates build/manifest-*-modulename.p5m file.
1430
24f4aebfd6a5 17300973 ips.mk is a little racey
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1428
diff changeset
   205
$(MANIFEST_BASE)-%.p5m: %-PYVER.p5m $(BUILD_DIR)/mkgeneric-python
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   206
	$(PKGMOGRIFY) -D PYV=###PYV### $(BUILD_DIR)/mkgeneric-python \
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   207
		$(WS_TOP)/transforms/mkgeneric $< > $@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   208
	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   209
1152
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   210
# Define and execute a macro that generates a rule to create a manifest for a
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   211
# perl module specific to a particular version of the perl runtime.
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   212
define perl-manifest-rule
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   213
$(MANIFEST_BASE)-%-$(shell echo $(1) | tr -d .).p5m: %-PERLVER.p5m
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   214
	$(PKGMOGRIFY) -D PERLVER=$(1) -D PLV=$(shell echo $(1) | tr -d .) \
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   215
		-D PERL_ARCH=$(call PERL_ARCH_FUNC,$(PERL.$(1))) $$< > $$@
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   216
endef
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   217
$(foreach ver,$(PERL_VERSIONS),$(eval $(call perl-manifest-rule,$(ver))))
96d423311191 16292975 perl_modules should build and deliver perl 5.16 versions
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1151
diff changeset
   218
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   219
# A rule to create a helper transform package for perl, that will insert the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   220
# appropriate conditional dependencies into a perl library's
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   221
# runtime-version-generic package to pull in the version-specific bits when the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   222
# corresponding version of perl is on the system.
1430
24f4aebfd6a5 17300973 ips.mk is a little racey
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1428
diff changeset
   223
$(BUILD_DIR)/mkgeneric-perl: $(WS_TOP)/make-rules/shared-macros.mk
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   224
	$(RM) $@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   225
	$(foreach ver,$(shell echo $(PERL_VERSIONS) | tr -d .), \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   226
		$(call mkgeneric,runtime/perl,$(ver)))
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   227
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   228
# Build Perl version-wrapping manifests from the generic version.
1430
24f4aebfd6a5 17300973 ips.mk is a little racey
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1428
diff changeset
   229
$(MANIFEST_BASE)-%.p5m: %-PERLVER.p5m $(BUILD_DIR)/mkgeneric-perl
24f4aebfd6a5 17300973 ips.mk is a little racey
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1428
diff changeset
   230
	$(PKGMOGRIFY) -D PLV=### $(BUILD_DIR)/mkgeneric-perl \
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   231
		$(WS_TOP)/transforms/mkgeneric $< > $@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   232
	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   233
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   234
# mogrify non-parameterized manifests
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   235
$(MANIFEST_BASE)-%.mogrified:	%.p5m $(BUILD_DIR)
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   236
	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   237
		$(PUBLISH_TRANSFORMS) | \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   238
		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   239
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   240
# mogrify parameterized manifests
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   241
$(MANIFEST_BASE)-%.mogrified:	$(MANIFEST_BASE)-%.p5m $(BUILD_DIR)
53
e398cb2c4b45 7004049 SUNWa2ps should move to userland with a2ps
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 49
diff changeset
   242
	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
46
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   243
		$(PUBLISH_TRANSFORMS) | \
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   244
		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   245
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   246
# mangle the file contents
369
cc8c00719da9 PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents: 255
diff changeset
   247
$(BUILD_DIR) $(MANGLED_DIR):
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   248
	$(MKDIR) $@
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   249
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   250
PKGMANGLE_OPTIONS = -D $(MANGLED_DIR) $(PKG_PROTO_DIRS:%=-d %)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   251
$(MANIFEST_BASE)-%.mangled:	$(MANIFEST_BASE)-%.mogrified $(MANGLED_DIR)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   252
	$(PKGMANGLE) $(PKGMANGLE_OPTIONS) -m $< >$@
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   253
76
a084497ff237 7016379 migrate elinks to userland (fix pkglint)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 75
diff changeset
   254
# generate dependencies
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 93
diff changeset
   255
PKGDEPEND_GENERATE_OPTIONS = -m $(PKG_PROTO_DIRS:%=-d %)
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 166
diff changeset
   256
$(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mangled
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   257
	$(ENV) $(COMPONENT_PUBLISH_ENV) $(PKGDEPEND) generate \
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1890
diff changeset
   258
	    $(PKGDEPEND_GENERATE_OPTIONS) $< >$@
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   259
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   260
# These files should contain a list of packages that the component is known to
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   261
# depend on.  Using resolve.deps is not required, but significantly speeds up
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   262
# the "pkg resolve" step.
1428
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   263
EXTDEPFILES ?= $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED)))))
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   264
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   265
# If the package contains no automatically discoverable dependencies, then
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   266
# we can speed up resolution by providing a dummy resolve.deps to skip loading
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   267
# all the possible packages for resolution.  Unfortunately, pkgdepend does not
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   268
# accept a completely empty resolve.deps, so we pass the userland-incorporation
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   269
# as a quick, content-free placeholder.
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   270
NULLDEPFILE = $(BUILD_DIR)/null-resolve.deps
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   271
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   272
# This is a target that should only be run by hand, and not something that
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   273
# .resolved-$(MACH) should depend on.
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   274
sample-resolve.deps:
1238
fb93a6ad84e5 15960689 pkgdepend resolve takes longer than it might (fix dir handling, recognize require-any)
Danek Duvall <danek.duvall@oracle.com>
parents: 1235
diff changeset
   275
	echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   276
	for i in build/*.depend; do \
1238
fb93a6ad84e5 15960689 pkgdepend resolve takes longer than it might (fix dir handling, recognize require-any)
Danek Duvall <danek.duvall@oracle.com>
parents: 1235
diff changeset
   277
		$(PKGMOGRIFY) -O /dev/null $$i rd-trans | tr " " "\n" | sort -u > m1; \
fb93a6ad84e5 15960689 pkgdepend resolve takes longer than it might (fix dir handling, recognize require-any)
Danek Duvall <danek.duvall@oracle.com>
parents: 1235
diff changeset
   278
		$(PKGMOGRIFY) -O /dev/null $$i.res rd-trans | tr " " "\n" | sort -u > m2; \
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   279
		comm -13 m1 m2; \
1238
fb93a6ad84e5 15960689 pkgdepend resolve takes longer than it might (fix dir handling, recognize require-any)
Danek Duvall <danek.duvall@oracle.com>
parents: 1235
diff changeset
   280
	done | sed -e 's/@[^ ]*//g' -e 's,pkg:/,,g' | sort -u > resolve.deps
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   281
	$(RM) rd-trans m1 m2
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   282
	if [[ ! -s resolve.deps ]]; then \
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   283
		echo "No computed dependencies found; removing empty resolve.deps."; \
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   284
		$(RM) resolve.deps; \
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   285
	fi
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   286
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   287
185
773dda89f186 7036473 dependency resolution should happen in one step for all component's packages
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
   288
# resolve the dependencies all at once
773dda89f186 7036473 dependency resolution should happen in one step for all component's packages
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
   289
$(BUILD_DIR)/.resolved-$(MACH):	$(DEPENDED)
1432
d90238e58d20 17205829 Update device ids data files to current versions as of 2013.07 (fix build)
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1430
diff changeset
   290
	if [[ "$(EXTDEPFILES)" == "$(NULLDEPFILE)" ]] ; then \
1428
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   291
	  echo 'consolidation/userland/userland-incorporation' > $(NULLDEPFILE) ; \
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1416
diff changeset
   292
	fi
1235
413599fe2d31 15960689 pkgdepend resolve takes longer than it might
Danek Duvall <danek.duvall@oracle.com>
parents: 1205
diff changeset
   293
	$(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED)
145
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   294
	$(TOUCH) $@
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   295
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   296
# lint the manifests all at once
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   297
$(BUILD_DIR)/.linted-$(MACH):	$(BUILD_DIR)/.resolved-$(MACH)
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   298
	@echo "VALIDATING MANIFEST CONTENT: $(RESOLVED)"
117
8f634eb6f66b 7023683 userland pkglint checks should look in more places for content
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
   299
	$(ENV) PYTHONPATH=$(WS_TOOLS)/python PROTO_PATH="$(PKG_PROTO_DIRS)"\
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1609
diff changeset
   300
		SOLARIS_VERSION=$(SOLARIS_VERSION)\
84
b80cfd4e0a16 7000952 Userland package validation needs some love
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 76
diff changeset
   301
		$(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
145
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   302
			-f $(WS_TOOLS)/pkglintrc $(RESOLVED)
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   303
	$(TOUCH) $@
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   304
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   305
lintme: FRC
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   306
	@echo "VALIDATING MANIFEST CONTENT: $(RESOLVED)"
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   307
	$(ENV) PYTHONPATH=$(WS_TOOLS)/python PROTO_PATH="$(PKG_PROTO_DIRS)"\
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1609
diff changeset
   308
		SOLARIS_VERSION=$(SOLARIS_VERSION)\
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   309
		$(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   310
			-f $(WS_TOOLS)/pkglintrc $(RESOLVED)
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   311
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   312
FRC:
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1056
diff changeset
   313
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   314
46
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   315
# published
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   316
PKGSEND_PUBLISH_OPTIONS = -s $(PKG_REPO) publish --fmri-in-manifest
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   317
PKGSEND_PUBLISH_OPTIONS += --no-catalog
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 93
diff changeset
   318
PKGSEND_PUBLISH_OPTIONS += $(PKG_PROTO_DIRS:%=-d %)
196
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 185
diff changeset
   319
PKGSEND_PUBLISH_OPTIONS += -T \*.py
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   320
185
773dda89f186 7036473 dependency resolution should happen in one step for all component's packages
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
   321
$(MANIFEST_BASE)-%.published:	$(MANIFEST_BASE)-%.depend.res $(BUILD_DIR)/.linted-$(MACH)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 93
diff changeset
   322
	$(PKGSEND) $(PKGSEND_PUBLISH_OPTIONS) $<
46
d4d60962c33f generate detectable dependencies at build time
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   323
	$(PKGFMT) <$< >$@
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   324
145
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   325
$(BUILD_DIR)/.published-$(MACH):	$(PUBLISHED)
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   326
ifndef DISABLE_IPS_CATALOG_AND_INDEX_UPDATES
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   327
	$(PKGREPO) refresh -s $(PKG_REPO)
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1238
diff changeset
   328
endif
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   329
	$(TOUCH) $@
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   330
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   331
print-package-names:	canonical-manifests
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   332
	@cat $(VERSIONED_MANIFESTS) $(WS_TOP)/transforms/print-pkgs | \
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   333
		$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   334
 		sed -e '/^$$/d' -e '/^#.*$$/d' | sort -u
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   335
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   336
print-package-paths:	canonical-manifests
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   337
	@cat $(VERSIONED_MANIFESTS) $(WS_TOP)/transforms/print-paths | \
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   338
		$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   339
 		sed -e '/^$$/d' -e '/^#.*$$/d' | sort -u
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   340
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   341
install-packages:	publish
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   342
	@if [ $(IS_GLOBAL_ZONE) = 0 -o x$(ROOT) != x ]; then \
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents: 944
diff changeset
   343
	    cat $(VERSIONED_MANIFESTS) $(WS_TOP)/transforms/print-paths | \
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   344
		$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 | \
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   345
 		sed -e '/^$$/d' -e '/^#.*$$/d' -e 's;/;;' | sort -u | \
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   346
		(cd $(PROTO_DIR) ; pfexec /bin/cpio -dump $(ROOT)) ; \
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   347
	else ; \
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   348
	    echo "unsafe to install package(s) automatically" ; \
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   349
        fi
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   350
145
1e2390f5555e 7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 117
diff changeset
   351
$(RESOLVED):	install
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   352
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   353
canonical-manifests:	$(CANONICAL_MANIFESTS) Makefile $(PATCHES)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   354
ifeq	($(strip $(CANONICAL_MANIFESTS)),)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   355
	# If there were no canonical manifests in the workspace, nothing will
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   356
	# be published and we should fail.  A sample manifest can be generated
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   357
	# with
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   358
	#   $ gmake sample-manifest
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   359
	# Once created, it will need to be reviewed, edited, and added to the
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   360
	# workspace.
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   361
	$(error Missing canonical manifest(s))
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 22
diff changeset
   362
endif
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   363
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   364
# This converts required paths to containing package names for be able to
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   365
# properly setup the build environment for a component.
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   366
required-pkgs.mk:	Makefile
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   367
	@echo "generating $@ from Makefile REQUIRED_* data"
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   368
	@pkg search -H -l '<$(DEPENDS:%=% OR) /bin/true>' \
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   369
		| sed -e 's/pkg:\/\(.*\)@.*/REQUIRED_PKGS += \1/g' >$@
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   370
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   371
pre-prep:	required-pkgs.mk
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   372
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   373
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 30
diff changeset
   374
CLEAN_PATHS +=	required-pkgs.mk