Makefile revision 3996
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# CDDL HEADER START
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# The contents of this file are subject to the terms of the
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Common Development and Distribution License (the "License").
65fea56f17cd614bc8908264df980a62e1931468vboxsync# You may not use this file except in compliance with the License.
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
65fea56f17cd614bc8908264df980a62e1931468vboxsync# or http://www.opensolaris.org/os/licensing.
65fea56f17cd614bc8908264df980a62e1931468vboxsync# See the License for the specific language governing permissions
65fea56f17cd614bc8908264df980a62e1931468vboxsync# and limitations under the License.
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# When distributing Covered Code, include this CDDL HEADER in each
65fea56f17cd614bc8908264df980a62e1931468vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync# If applicable, add the following below this CDDL HEADER, with the
65fea56f17cd614bc8908264df980a62e1931468vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
65fea56f17cd614bc8908264df980a62e1931468vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# CDDL HEADER END
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
65fea56f17cd614bc8908264df980a62e1931468vboxsync#
65fea56f17cd614bc8908264df980a62e1931468vboxsyncinclude ../../make-rules/shared-macros.mk
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_NAME= text-utilities
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_VERSION= 2.24.2
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_SRC= util-linux-$(COMPONENT_VERSION)
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_ARCHIVE_HASH= \
65fea56f17cd614bc8908264df980a62e1931468vboxsync sha256:1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.24/$(COMPONENT_ARCHIVE)
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_BUGDB= utility/text-utilities
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncTPNO= 17825
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncinclude $(WS_MAKE_RULES)/prep.mk
65fea56f17cd614bc8908264df980a62e1931468vboxsyncinclude $(WS_MAKE_RULES)/configure.mk
65fea56f17cd614bc8908264df980a62e1931468vboxsyncinclude $(WS_MAKE_RULES)/ips.mk
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# We currently only want some of the text-utils text utilities from this
65fea56f17cd614bc8908264df980a62e1931468vboxsync# component, so enumerate it in a macro that we can use for build and install.
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Anything else that we want should be added to this macro in the future.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPROGRAMS = colcrt colrm column hexdump rev tailf
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Limit translations to the text utilities (and lib/* and include/* ) only.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_PRE_INSTALL_ACTION = \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.32)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we
65fea56f17cd614bc8908264df980a62e1931468vboxsync# override it.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_BUILD_ARGS += AM_CFLAGS=""
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Always show the build and link lines for easier debugging.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_BUILD_ARGS += V=1
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Only build the programs that we want.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_BUILD_ARGS += bin_PROGRAMS="$(PROGRAMS)"
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_BUILD_TARGETS = $(PROGRAMS)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Only install the bits we want.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_INSTALL_ARGS += bin_PROGRAMS="$(PROGRAMS)"
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_INSTALL_TARGETS = install-man install-binPROGRAMS
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# Install the message files.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_POST_INSTALL_ACTION = \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncASLR_MODE = $(ASLR_ENABLE)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTO_DIR)/usr/bin/colrm
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTO_DIR)/usr/bin/column
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTO_DIR)/usr/bin/hexdump
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTO_DIR)/usr/bin/tailf
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# The given hexdump tests are little-endian specific, so the test script
65fea56f17cd614bc8908264df980a62e1931468vboxsync# has been adjusted to do some endian-neutral ones. Copy the input and
65fea56f17cd614bc8908264df980a62e1931468vboxsync# the expected results to where they are needed.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCOMPONENT_PRE_TEST_ACTION = ( \
65fea56f17cd614bc8908264df980a62e1931468vboxsync $(CP) $(COMPONENT_DIR)/files/hexdump-input \
65fea56f17cd614bc8908264df980a62e1931468vboxsync $(COMPONENT_SRC)/tests/ts/hexdump/; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync $(CP) $(COMPONENT_DIR)/files/hexdump-expected \
65fea56f17cd614bc8908264df980a62e1931468vboxsync $(COMPONENT_SRC)/tests/expected/hexdump/empty-format; )
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync# common targets
65fea56f17cd614bc8908264df980a62e1931468vboxsyncbuild: $(BUILD_64)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncinstall: $(INSTALL_64)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctest: install
65fea56f17cd614bc8908264df980a62e1931468vboxsync $(COMPONENT_PRE_TEST_ACTION)
65fea56f17cd614bc8908264df980a62e1931468vboxsync (cd $(COMPONENT_TEST_DIR) ; $(ENV) $(COMPONENT_TEST_ENV) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync ./run.sh --verbose colrm column hexdump tailf)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncREQUIRED_PACKAGES += system/library
65fea56f17cd614bc8908264df980a62e1931468vboxsync