Makefile revision 4730
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# CDDL HEADER START
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# The contents of this file are subject to the terms of the
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Common Development and Distribution License (the "License").
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# You may not use this file except in compliance with the License.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# or http://www.opensolaris.org/os/licensing.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# See the License for the specific language governing permissions
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# and limitations under the License.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# When distributing Covered Code, include this CDDL HEADER in each
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# If applicable, add the following below this CDDL HEADER, with the
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# fields enclosed by brackets "[]" replaced with your own identifying
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# information: Portions Copyright [yyyy] [name of copyright owner]
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# CDDL HEADER END
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# parfait fails to compile us (20889777)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithexport PARFAIT_BUILD=no
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithinclude ../../make-rules/shared-macros.mk
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_NAME= text-utilities
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_VERSION= 2.25.2
5c45bb188ab729e501e48732842cb9de6a9813beAlex ValavanisCOMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SRC= util-linux-$(COMPONENT_VERSION)
a4142717644b885998f4de2b27be4e8648315decMarkus EngelCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
a4142717644b885998f4de2b27be4e8648315decMarkus EngelCOMPONENT_ARCHIVE_HASH= \
a4142717644b885998f4de2b27be4e8648315decMarkus Engel sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.25/$(COMPONENT_ARCHIVE)
9836787d16b657453784c30809d330f50d9bc6d8Liam P. WhiteCOMPONENT_BUGDB= utility/text-utilities
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White
9836787d16b657453784c30809d330f50d9bc6d8Liam P. WhiteTPNO= 21750
a4142717644b885998f4de2b27be4e8648315decMarkus Engel
a4142717644b885998f4de2b27be4e8648315decMarkus Engelinclude $(WS_MAKE_RULES)/prep.mk
a4142717644b885998f4de2b27be4e8648315decMarkus Engelinclude $(WS_MAKE_RULES)/configure.mk
a4142717644b885998f4de2b27be4e8648315decMarkus Engelinclude $(WS_MAKE_RULES)/ips.mk
a4142717644b885998f4de2b27be4e8648315decMarkus Engel
a4142717644b885998f4de2b27be4e8648315decMarkus Engel# We currently only want some of the text-utils text utilities from this
a4142717644b885998f4de2b27be4e8648315decMarkus Engel# component, so enumerate it in a macro that we can use for build and install.
652485ad88d2a42f827c7e355220efeb3b2e37afLiam P. White# Anything else that we want should be added to this macro in the future.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithPROGRAMS = colcrt colrm column hexdump rev tailf
0b78b3f935d2de75ef952f2bafd0030aca9a077cMatthew Petroff
a4142717644b885998f4de2b27be4e8648315decMarkus Engel# Build a utility program used by one of the hexdump tests.
a4142717644b885998f4de2b27be4e8648315decMarkus EngelPROGRAMS += test_sysinfo
a4142717644b885998f4de2b27be4e8648315decMarkus Engel
a4142717644b885998f4de2b27be4e8648315decMarkus Engel# Limit translations to the text utilities (and lib/* and include/* ) only.
a4142717644b885998f4de2b27be4e8648315decMarkus EngelCOMPONENT_PRE_INSTALL_ACTION = \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
0b78b3f935d2de75ef952f2bafd0030aca9a077cMatthew Petroff
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.32)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# We don't need the Python bindings built.
0b78b3f935d2de75ef952f2bafd0030aca9a077cMatthew PetroffCONFIGURE_OPTIONS += --without-python
0b78b3f935d2de75ef952f2bafd0030aca9a077cMatthew Petroff
fc2e20aa610641335a34aa9b6604c3c4ec0ae7c4Matthew Petroff# Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# override it.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_BUILD_ARGS += AM_CFLAGS=""
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Always show the build and link lines for easier debugging.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_BUILD_ARGS += V=1
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Only build the programs that we want.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_BUILD_ARGS += bin_PROGRAMS="$(PROGRAMS)"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_BUILD_TARGETS = $(PROGRAMS)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Only install the bits we want.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_INSTALL_ARGS += bin_PROGRAMS="$(PROGRAMS)"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_INSTALL_TARGETS = install-man install-binPROGRAMS
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Install the message files.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_POST_INSTALL_ACTION = \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithASLR_MODE = $(ASLR_ENABLE)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTO_DIR)/usr/bin/colrm
e918c2e4dcbcd27cf2a8259e53ba7b1196edb291Markus EngelCOMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTO_DIR)/usr/bin/column
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTO_DIR)/usr/bin/hexdump
6b0fbf10b982696648debeede2b57f2b32a6a958Alex ValavanisCOMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTO_DIR)/usr/bin/tailf
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
87b68db8c76e3425a99bb2f05c70d7b25c50b654Johan B. C. Engelen
b59fb89597912496277746078811ae7f05261790Liam P. White# The hexdump tests expect the test_sysinfo program in a different location
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# than where it's built.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_PRE_TEST_ACTION = $(CP) $(@D)/test_sysinfo $(COMPONENT_SRC)/
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_CMD = ./run.sh
ed93708e7161e1b556017476a739316746cba604Matthew PetroffCOMPONENT_TEST_ARGS = --verbose
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_TEST_TARGETS = colrm column hexdump tailf
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLRM=/usr/bin/colrm
bd201dd421887a377b6b55f48b121160e0a01fc3apennerCOMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLUMN=/usr/bin/column
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_ENV += TS_CMD_HEXDUMP=/usr/bin/hexdump
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_ENV += TS_CMD_TAILF=/usr/bin/tailf
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_DIR = $(COMPONENT_SRC)/tests
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Build the test_sysinfo program; copy it where the tests are looking for it.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_PRE_SYSTEM_TEST_ACTION = \
769a6887551cf7ff7bce4b48d3ac303cbea69507Liam P. White (cd $(@D) ; $(GMAKE) AM_CFLAGS="" \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith V=1 bin_PROGRAMS="test_sysinfo" test_sysinfo ; \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith $(CP) test_sysinfo $(SOURCE_DIR))
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
08c634c4b964dbbb89686a645bce04c1c7275611Liam P. WhiteCOMPONENT_SYSTEM_TEST_CMD = ./run.sh
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_ARGS = --verbose
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithCOMPONENT_SYSTEM_TEST_TARGETS = colrm column hexdump tailf
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithconfigure: $(CONFIGURE_64)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithbuild: $(BUILD_64)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithinstall: $(INSTALL_64)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithtest: install $(TEST_64)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithsystem-test: configure $(SYSTEM_TEST_64)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithREQUIRED_PACKAGES += system/library
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith