components/coreutils/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Fri, 23 Aug 2013 05:51:38 -0700
changeset 1452 9016618ded9d
parent 1138 6e1f85fa0151
child 1465 26be70b523fc
permissions -rw-r--r--
17338978 stdbuf searching for libstdbuf.so in wrong place
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     1
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     3
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     7
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    12
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    18
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    20
#
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    21
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    22
#
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    24
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		coreutils
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    26
COMPONENT_VERSION=	8.16
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    27
COMPONENT_PROJECT_URL=	http://www.gnu.org/software/coreutils/
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 609
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    31
    sha256:2a458fead15d9336f46bb4304cc3eaa6ed9407b9130e7ee2ec533909881d2067
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/coreutils/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 987
diff changeset
    33
COMPONENT_BUGDB=	utility/gnu-coreutils
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    34
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    35
include ../../make-rules/prep.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    36
include ../../make-rules/configure.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/ips.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    38
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    39
CONFIGURE_PREFIX	 =	/usr/gnu
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    40
CONFIGURE_OPTIONS	+=	--libdir=/usr/lib
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    41
CONFIGURE_OPTIONS	+=	--infodir=$(CONFIGURE_INFODIR)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    42
CONFIGURE_OPTIONS	+=	CPPFLAGS=-I/usr/include/gmp
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    43
CONFIGURE_OPTIONS	+=	CFLAGS="$(CFLAGS)"
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    44
1452
9016618ded9d 17338978 stdbuf searching for libstdbuf.so in wrong place
Rich Burridge <rich.burridge@oracle.com>
parents: 1138
diff changeset
    45
# To allow stdbuf to correctly find /usr/lib/libstdbuf.so
9016618ded9d 17338978 stdbuf searching for libstdbuf.so in wrong place
Rich Burridge <rich.burridge@oracle.com>
parents: 1138
diff changeset
    46
COMPONENT_BUILD_ARGS += pkglibexecdir=/usr/lib
9016618ded9d 17338978 stdbuf searching for libstdbuf.so in wrong place
Rich Burridge <rich.burridge@oracle.com>
parents: 1138
diff changeset
    47
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    48
# Enable ASLR for this component
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    49
ASLR_MODE = $(ASLR_ENABLE)
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    50
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    51
# common targets
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    52
build:		$(BUILD_32)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    53
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 104
diff changeset
    54
install:	$(INSTALL_32)
104
df794b4aa5dc 7022185 incorrect ips package name for gnu-coreutils
Craig Mohrman <Craig.Mohrman@oracle.com>
parents: 100
diff changeset
    55
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    56
# Needed for "gmake test" to work successfully.
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    57
# If SHELLOPTS is exported (as it is by the userland makefiles),
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    58
# then all shell options get exported to child invocations of bash,
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    59
# which results in test failures due to nounset and xtrace being
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    60
# set unexpectedly, and errors such as "$1: unbound variable" and
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    61
# diffs failing due to script tracing in output files.
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    62
unexport SHELLOPTS
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    63
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    64
# Get the binaries to test from the component proto area.
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    65
COMPONENT_TEST_ENV +=   PATH=$(PROTOUSRSBINDIR):/usr/bin
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    66
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    67
test:		install $(TEST_32)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    68
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    69
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    70
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    71
include ../../make-rules/depend.mk