components/scons/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Mon, 06 Jul 2015 20:35:05 -0700
changeset 4599 c7cdb20dce6d
child 5682 94c0ca64c022
permissions -rw-r--r--
PSARC 2015/151 SCons - Software Construction Tool 20779329 We should integrate SCons into Solaris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4599
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		scons
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=	2.3.4
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_PROJECT_URL=	http://www.scons.org/
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
    sha256:4b57d72066fed3b6ff65a7dd9f73633c9b1c09f87520e9b3aae84b3e4864b441
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/$(COMPONENT_NAME)/files/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)/download
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_BUGDB=	utility/scons
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
TPNO=			22207
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
# Per Q1.1.4 of the SCons FAQ, SCons is written to work with any Python
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
# version >= 2.4 and < 3.0. Versions 3.0 and above are not supported at
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
# this time.
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
PYTHON_VERSIONS =	2.7
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
include $(WS_MAKE_RULES)/prep.mk
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
include $(WS_MAKE_RULES)/setup.py.mk
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
include $(WS_MAKE_RULES)/ips.mk
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
# pkgdepend doesn't like the first line of a Python script to be:
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
COMPONENT_POST_INSTALL_ACTION += \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
	$(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
		$(PROTOUSRBINDIR)/scons-2.3.4;
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
COMPONENT_POST_INSTALL_ACTION += \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
	$(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
		$(PROTOUSRBINDIR)/scons-time-2.3.4;
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
COMPONENT_POST_INSTALL_ACTION += \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
	$(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
		$(PROTOUSRBINDIR)/sconsign-2.3.4;
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
PKG_PROTO_DIRS +=	$(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
ASLR_MODE = $(ASLR_ENABLE)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
build:		$(BUILD_NO_ARCH)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
install:	$(INSTALL_NO_ARCH)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
test:		$(NO_TESTS)
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
REQUIRED_PACKAGES += library/python/setuptools-27
c7cdb20dce6d PSARC 2015/151 SCons - Software Construction Tool
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
REQUIRED_PACKAGES += runtime/python-27