make-rules/ips-buildinfo.mk
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Mon, 24 Oct 2011 15:19:49 -0700
branchs11-sru
changeset 2227 972345a3c215
child 2233 cc544c5cfe9e
permissions -rw-r--r--
7104397 Userland should split out package BUILD_VERSION information
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2227
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
# The package branch version scheme is:
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
#       trunk_id.update.SRU.platform.buildid.nightlyid
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
# where
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
#       trunk_id : build number for tip development gate, with leading 0
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
#       update   : 0 for FCS, 1 for update 1, etc.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
#       SRU      : SRU (support repository update) number for this update
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
#       platform : reserved for future use.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
#       buildid  : the build number of the last non-zero element from above
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
#       nightlyid: nightly build identifier
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
# For reference, Solaris 11 FCS is branch-id 0.175.0.0.0.2.537
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
#                       build 175, respin 2, workspace changeset 537
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
# The Solaris Marketing release build number.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    44
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
TRUNK_ID ?= 0.175
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
# The Solaris Update number. This will be set by the gatekeepers.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
# The value must match the update number of the release.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
UPDATENUM ?= 0
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
# Support Respository Update number. This is here to reserve space within the
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
# version string. Typically it should not be set unless all the packages
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
# are being delivered within an SRU.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    58
SRUNUM ?= 1
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    59
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    60
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    61
# Platform number. This is here to reserve space within the version
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
# string. It should not be set unless there is a specific need to
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
# release a platform update while the Solaris Update is being built.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    64
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    65
PLATNUM ?= 0
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
# Build Identifier. Used to indicate which build (or respin for
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    69
# the development build) of the Solaris Update is being built.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    70
# This is set by the gatekeepers.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    72
BUILDID ?= 0
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    73
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    74
# Each (nightly) build of the code that produces packages needs to
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    75
# be uniquely identified so that packages produced by different
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    76
# builds can't be mixed.  Mixing packages from different builds can
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    77
# easily result in broken global and nonglobal zones.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    78
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    79
NIGHTLYID ?= $(shell hg tip --template '{rev}\n')
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    80
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    81
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    82
# Branch Identifier.  Used in the version section of the package name to
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    83
# identify the operating system branch that the package was produced for.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    84
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    85
BRANCHID ?= \
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    86
    $(TRUNK_ID).$(UPDATENUM).$(SRUNUM).$(PLATNUM).$(BUILDID).$(NIGHTLYID)
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    87
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    88
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
# Build Version.  Used in the version section of the package name to identify
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
# the operating system version and branch that the package was produced for.
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
#
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
BUILD_VERSION ?= $(OS_VERSION)-$(BRANCHID)
972345a3c215 7104397 Userland should split out package BUILD_VERSION information
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    93