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