Makefile revision 5680
318N/A#
318N/A# CDDL HEADER START
318N/A#
318N/A# The contents of this file are subject to the terms of the
318N/A# Common Development and Distribution License (the "License").
318N/A# You may not use this file except in compliance with the License.
318N/A#
318N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
318N/A# or http://www.opensolaris.org/os/licensing.
318N/A# See the License for the specific language governing permissions
318N/A# and limitations under the License.
318N/A#
318N/A# When distributing Covered Code, include this CDDL HEADER in each
318N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
318N/A# If applicable, add the following below this CDDL HEADER, with the
318N/A# fields enclosed by brackets "[]" replaced with your own identifying
318N/A# information: Portions Copyright [yyyy] [name of copyright owner]
318N/A#
318N/A# CDDL HEADER END
318N/A#
5680N/A
318N/A#
5680N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
5680N/A#
5680N/ABUILD_BITS= 64
318N/Ainclude ../../make-rules/shared-macros.mk
318N/A
318N/ACOMPONENT_NAME= text-utilities
1459N/ACOMPONENT_VERSION= 2.25.2
1459N/ACOMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux
1459N/ACOMPONENT_SRC= util-linux-$(COMPONENT_VERSION)
1459N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
844N/ACOMPONENT_ARCHIVE_HASH= \
1459N/A sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6
1459N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.25/$(COMPONENT_ARCHIVE)
318N/A
3061N/ATPNO= 21750
3061N/A
5680N/ATEST_TARGET= install $(TEST_64)
5680N/ASYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
5680N/A
5680N/A# We currently only want some of the text-utils text utilities from this
5680N/A# component, so enumerate it in a macro that we can use for build and install.
5680N/A# Anything else that we want should be added to this macro in the future.
5680N/APROGRAMS = colcrt colrm column hexdump rev tailf
5680N/A
5680N/A# Build a utility program used by one of the hexdump tests.
5680N/APROGRAMS += test_sysinfo
5680N/A
318N/A# Limit translations to the text utilities (and lib/* and include/* ) only.
1459N/ACOMPONENT_PRE_INSTALL_ACTION = \
318N/A (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
318N/A
1459N/A# We don't need the Python bindings built.
4195N/ACONFIGURE_OPTIONS += --without-python
4698N/A
4698N/A# Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we
5144N/A# override it.
5144N/ACOMPONENT_BUILD_ARGS += AM_CFLAGS=""
5144N/A
4698N/A# Always show the build and link lines for easier debugging.
4698N/ACOMPONENT_BUILD_ARGS += V=1
4698N/A
4698N/A# Only build the programs that we want.
4698N/ACOMPONENT_BUILD_ARGS += bin_PROGRAMS="$(PROGRAMS)"
5144N/ACOMPONENT_BUILD_TARGETS = $(PROGRAMS)
4698N/A
4698N/A# Only install the bits we want.
5680N/ACOMPONENT_INSTALL_ARGS += bin_PROGRAMS="$(PROGRAMS)"
5144N/ACOMPONENT_INSTALL_TARGETS = install-man install-binPROGRAMS
4698N/A
4698N/A# Install the message files.
4698N/ACOMPONENT_POST_INSTALL_ACTION = \
4698N/A (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
4698N/A
4698N/ACOMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTOUSRBINDIR)/colrm
4698N/ACOMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTOUSRBINDIR)/column
4698N/ACOMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTOUSRBINDIR)/hexdump
318N/ACOMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTOUSRBINDIR)/tailf
4195N/ACOMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
COMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
# The hexdump tests expect the test_sysinfo program in a different location
# than where it's built.
COMPONENT_PRE_TEST_ACTION = $(CP) $(@D)/test_sysinfo $(COMPONENT_SRC)/
COMPONENT_TEST_CMD = ./run.sh
COMPONENT_TEST_ARGS = --verbose
COMPONENT_TEST_TARGETS = colrm column hexdump tailf
COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLRM=$(USRBINDIR)/colrm
COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLUMN=$(USRBINDIR)/column
COMPONENT_SYSTEM_TEST_ENV += TS_CMD_HEXDUMP=$(USRBINDIR)/hexdump
COMPONENT_SYSTEM_TEST_ENV += TS_CMD_TAILF=$(USRBINDIR)/tailf
COMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
COMPONENT_SYSTEM_TEST_DIR = $(COMPONENT_SRC)/tests
# Build the test_sysinfo program; copy it where the tests are looking for it.
COMPONENT_PRE_SYSTEM_TEST_ACTION = \
(cd $(@D) ; $(GMAKE) AM_CFLAGS="" \
V=1 bin_PROGRAMS="test_sysinfo" test_sysinfo ; \
$(CP) test_sysinfo $(SOURCE_DIR))
COMPONENT_SYSTEM_TEST_CMD = ./run.sh
COMPONENT_SYSTEM_TEST_ARGS = --verbose
COMPONENT_SYSTEM_TEST_TARGETS = colrm column hexdump tailf