components/coreutils/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Fri, 15 Aug 2014 07:34:17 -0700
changeset 2050 7c6a1559c620
parent 1948 2d1537e7942d
child 2225 f064d3d3190d
permissions -rw-r--r--
PSARC 2014/271 GNU coreutils 8.23 18527328 Update GNU coreutils to the latest version
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
#
1833
0edb05d72e6b 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    21
# Copyright (c) 2011, 2014, 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
# 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
    60
ASLR_MODE = $(ASLR_ENABLE)
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    61
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    62
# common targets
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
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    78
# With coreutils version 8.23, there are currently six tests that are failing:
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    79
# 1/ test-getlogin   - this is a known problem. See:
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    80
#    http://www.linuxfromscratch.org/pipermail/lfs-dev/2012-April/066264.html
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    81
#
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    82
#    After GNU coreutils has been built, it's possible to successfully run
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    83
#    the test manually from a terminal with:
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    84
#
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    85
#    $ cd build/amd64/gnulib-tests && \
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    86
#          gmake NON_ROOT_USERNAME=nobody -k check-TESTS && \
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    87
#          gmake check TESTS=test-get-login
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    88
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    89
# 2/ test-mbrtowc3
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    90
# 3/ test-mbrtowc4
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    91
# 4/ test-mbsalign
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    92
# 5/ test-mbsrtowcs4 - these four multi-byte problems have been reported to
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    93
#                      the G11N team. CR #19368946 & #19370120 have been filed.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    94
#
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    95
# 6/ test-posixtm    - this is due to a problem with the Solaris mktime
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    96
#                      utility. CR #19344177 has been filed.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    97
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    98
test:		install $(TEST_64)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    99
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
   100
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
   101
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
   102
include ../../make-rules/depend.mk