components/text-utilities/Makefile
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Thu, 19 Mar 2015 20:44:31 -0700
branchs11-update
changeset 3996 20c0f21bbe1e
parent 3666 f6b2b3066ff4
child 4277 3935c50c4455
permissions -rw-r--r--
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3666
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		text-utilities
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=	2.24.2
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
COMPONENT_PROJECT_URL=	https://www.kernel.org/pub/linux/utils/util-linux
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		util-linux-$(COMPONENT_VERSION)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
    sha256:1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)/v2.24/$(COMPONENT_ARCHIVE)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_BUGDB=	utility/text-utilities
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
TPNO=			17825
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3666
diff changeset
    37
include $(WS_MAKE_RULES)/prep.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3666
diff changeset
    38
include $(WS_MAKE_RULES)/configure.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3666
diff changeset
    39
include $(WS_MAKE_RULES)/ips.mk
3666
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
# We currently only want some of the text-utils text utilities from this
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
# component, so enumerate it in a macro that we can use for build and install.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
# Anything else that we want should be added to this macro in the future.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
PROGRAMS =	colcrt colrm column hexdump rev tailf
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
# Limit translations to the text utilities (and lib/* and include/* ) only.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
COMPONENT_PRE_INSTALL_ACTION = \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
	(cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
CONFIGURE_OPTIONS +=		CFLAGS="$(CFLAGS)"
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
CONFIGURE_OPTIONS +=		--bindir=$(CONFIGURE_BINDIR.32)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
# Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
# override it.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
COMPONENT_BUILD_ARGS +=		AM_CFLAGS=""
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
# Always show the build and link lines for easier debugging.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
COMPONENT_BUILD_ARGS +=		V=1
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
# Only build the programs that we want.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
COMPONENT_BUILD_ARGS +=		bin_PROGRAMS="$(PROGRAMS)"
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
COMPONENT_BUILD_TARGETS =	$(PROGRAMS)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
# Only install the bits we want.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
COMPONENT_INSTALL_ARGS +=	bin_PROGRAMS="$(PROGRAMS)"
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
COMPONENT_INSTALL_TARGETS =	install-man install-binPROGRAMS
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
# Install the message files.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
COMPONENT_POST_INSTALL_ACTION = \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
	(cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
ASLR_MODE = $(ASLR_ENABLE)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
COMPONENT_TEST_ENV +=	TS_CMD_COLRM=$(PROTO_DIR)/usr/bin/colrm
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
COMPONENT_TEST_ENV +=	TS_CMD_COLUMN=$(PROTO_DIR)/usr/bin/column
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
COMPONENT_TEST_ENV +=	TS_CMD_HEXDUMP=$(PROTO_DIR)/usr/bin/hexdump
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
COMPONENT_TEST_ENV +=	TS_CMD_TAILF=$(PROTO_DIR)/usr/bin/tailf
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
COMPONENT_TEST_ENV +=	PATH="$(GNUBIN):$(PATH)"
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
COMPONENT_TEST_DIR =	$(COMPONENT_SRC)/tests
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
# The given hexdump tests are little-endian specific, so the test script
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
# has been adjusted to do some endian-neutral ones. Copy the input and
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
# the expected results to where they are needed.
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
COMPONENT_PRE_TEST_ACTION = ( \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
	$(CP) $(COMPONENT_DIR)/files/hexdump-input \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    86
		$(COMPONENT_SRC)/tests/ts/hexdump/; \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
	$(CP) $(COMPONENT_DIR)/files/hexdump-expected \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
		$(COMPONENT_SRC)/tests/expected/hexdump/empty-format; )
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
# common targets
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
build:		$(BUILD_64)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    93
install:	$(INSTALL_64)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    94
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
test:		install
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    96
	$(COMPONENT_PRE_TEST_ACTION)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    97
	(cd $(COMPONENT_TEST_DIR) ; $(ENV) $(COMPONENT_TEST_ENV) \
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
		./run.sh --verbose colrm column hexdump tailf)
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
f6b2b3066ff4 PSARC 2014/170 text-utilities version 2.24.2
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3666
diff changeset
   101
REQUIRED_PACKAGES += system/library