components/coreutils/Makefile
author Tomas Klacko <tomas.klacko@oracle.com>
Tue, 10 Feb 2015 02:00:16 -0800
changeset 3756 dce353ed563a
parent 3702 a4cf62e97757
child 3817 30b42c38bbc4
permissions -rw-r--r--
20381845 update timezone data to 2015a
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
#
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    21
# Copyright (c) 2011, 2015, 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
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    26
COMPONENT_VERSION=	8.23
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=	\
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    31
    sha256:ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
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
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    35
TPNO=			18521
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1900
diff changeset
    36
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/prep.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    38
include ../../make-rules/configure.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    39
include ../../make-rules/ips.mk
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    40
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    41
# We need the GNU grep command to configure/build.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    42
PATH=/usr/gnu/bin:/usr/bin
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    43
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    44
PATCH_LEVEL=		0
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    45
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    46
CONFIGURE_PREFIX	 =	/usr/gnu
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    47
CONFIGURE_OPTIONS	+=	--bindir=/usr/gnu/bin
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    48
CONFIGURE_OPTIONS	+=	--libdir=/usr/lib
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    49
CONFIGURE_OPTIONS	+=	--infodir=$(CONFIGURE_INFODIR)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    50
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
    51
CONFIGURE_OPTIONS	+=	CFLAGS="$(CFLAGS)"
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    52
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    53
# Recreate configure and Makefile to pick up changes in .../src/local.mk
1833
0edb05d72e6b 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    54
COMPONENT_PREP_ACTION = (cd $(@D) ; autoreconf -f && automake)
0edb05d72e6b 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    55
1898
5c902a3c6e7e 18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    56
# Always show the build and link lines for easier debugging.
1900
e587944ed7de 18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents: 1898
diff changeset
    57
COMPONENT_BUILD_ARGS +=		V=1
1898
5c902a3c6e7e 18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    58
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    59
ASLR_MODE = $(ASLR_ENABLE)
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    60
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2050
diff changeset
    61
configure:	$(CONFIGURE_32_and_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2050
diff changeset
    62
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    63
build:		$(BUILD_32_and_64)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    64
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    65
install:	$(INSTALL_32_and_64)
104
df794b4aa5dc 7022185 incorrect ips package name for gnu-coreutils
Craig Mohrman <Craig.Mohrman@oracle.com>
parents: 100
diff changeset
    66
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    67
# 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
    68
# 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
    69
# 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
    70
# 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
    71
# 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
    72
# 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
    73
unexport SHELLOPTS
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    74
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    75
# 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
    76
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
    77
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    78
# Always show the build and link lines for easier debugging.
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    79
COMPONENT_TEST_ARGS +=	V=1
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    80
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    81
# The additional coreutils specific set of transforms to be applied to the
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    82
# test results to try to normalize them.
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    83
COMPONENT_TEST_TRANSFORMS += \
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    84
	'-e "s|\(^$(CC)\).*|\\$$(CC)|" ' \
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    85
	'-e "s|\(/gnulib-tests/test-getlogin.c:\).*|\1|" ' \
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    86
	'-e "s|\(^/bin/bash: line 1:\).*|\1|" ' \
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    87
	'-e "s|\(^df-symlink.sh: skipped test:\).*|\1|" ' \
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    88
	'-e "s|\(^tail-n0f.sh: skipped test:\).*|\1|" '
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    89
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    90
# There are currently two tests that are failing, for which the following
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    91
# bugs are filed; see the bug reports for more details:
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    92
# test-mbsalign - 20432332
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    93
# test-posixtm  - 19344177
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    94
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    95
test:		install $(TEST_64)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    96
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    97
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    98
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    99
include ../../make-rules/depend.mk