components/coreutils/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Fri, 07 Aug 2015 14:59:43 -0700
changeset 4747 0e43ac303e45
parent 4339 6501cf9c29f9
child 5169 c5d3147d411a
permissions -rw-r--r--
21571218 Even more Userland components should have their system-test targets hooked up
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
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3702
diff changeset
    37
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3702
diff changeset
    38
include $(WS_MAKE_RULES)/configure.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3702
diff changeset
    39
include $(WS_MAKE_RULES)/ips.mk
100
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
4747
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    56
# Needed to get tests to work when run directly from the tests subdirectory.
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    57
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    58
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
    59
# 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
    60
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
    61
1138
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    62
ASLR_MODE = $(ASLR_ENABLE)
6e1f85fa0151 15801420 SUNBT7180909 tag the Userland consolidation binaries for ASLR
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    63
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2050
diff changeset
    64
configure:	$(CONFIGURE_32_and_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2050
diff changeset
    65
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    66
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
    67
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    68
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
    69
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    70
# 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
    71
# 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
    72
# 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
    73
# 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
    74
# 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
    75
# 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
    76
unexport SHELLOPTS
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    77
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    78
# 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
    79
COMPONENT_TEST_ENV +=   PATH=$(PROTOUSRSBINDIR):/usr/bin
4747
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    80
COMPONENT_TEST_DIR =	$(@D)/tests
987
810b92005f34 PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    81
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    82
# 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
    83
COMPONENT_TEST_ARGS +=	V=1
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    84
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    85
COMPONENT_TEST_TRANSFORMS += \
4747
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    86
	'-n ' \
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    87
	'-e "/TOTAL/p" ' \
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    88
	'-e "/SKIP/p" ' \
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    89
	'-e "/PASS/p" ' \
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    90
	'-e "/FAIL/p" ' \
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    91
	'-e "/ERROR/p" '
3702
a4cf62e97757 20432269 GNU coreutils version 8.23 test-localename test dumps core
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    92
4747
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    93
# Get the binaries to test from their installed locations.
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    94
COMPONENT_SYSTEM_TEST_ENV +=	PATH=/usr/gnu/bin:/usr/bin
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    95
COMPONENT_SYSTEM_TEST_DIR =	$(@D)/tests
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    96
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents: 1452
diff changeset
    97
test:		install $(TEST_64)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
    98
4747
0e43ac303e45 21571218 Even more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    99
system-test:    configure $(SYSTEM_TEST_64)
100
385905d9554d 7021215 migrate gnu-coreutils from sfw to userland gate
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
diff changeset
   100
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3702
diff changeset
   101
REQUIRED_PACKAGES += library/gmp
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3702
diff changeset
   102
REQUIRED_PACKAGES += system/library