Makefile revision 6367
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# CDDL HEADER START
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# The contents of this file are subject to the terms of the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# Common Development and Distribution License (the "License").
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# You may not use this file except in compliance with the License.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# or http://www.opensolaris.org/os/licensing.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# See the License for the specific language governing permissions
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# and limitations under the License.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# When distributing Covered Code, include this CDDL HEADER in each
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# If applicable, add the following below this CDDL HEADER, with the
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# fields enclosed by brackets "[]" replaced with your own identifying
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# information: Portions Copyright [yyyy] [name of copyright owner]
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# CDDL HEADER END
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
e77b06d21580f630e0a7c437495ab283d3672828tomee# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee#
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeBUILD_BITS= 64
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeinclude ../../make-rules/shared-macros.mk
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_NAME= gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_VERSION= 3.0.4
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_ARCHIVE_HASH= \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee sha256:767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeTPNO= 28116
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# must build tests before use
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeSYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeinclude $(WS_MAKE_RULES)/gnu-component.mk
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCONFIGURE_OPTIONS += --docdir=$(USRSHAREDOCDIR)/gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# test/system-test is tricky.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# Reason being is this component bundles! test results
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# with the source and those results are compared against
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# generated results.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# Unfortunately these test results embed the string:
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# /* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -i 1 -g
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# which contains the actual command run: ../src/gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# That string is correct for test but system-test will have /usr/bin/gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# do a sed is run over the bundled test results with /usr/bin/gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# so that an internal compare will pass.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# Put another way this component does internally what the userland
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# test infrastructure is doing.
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# modify bundled test results for system-test
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_PRE_SYSTEM_TEST_ACTION = \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee ($(GSED) -i -e "s|../src/gperf|/usr/bin/gperf|" \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee $(SOURCE_DIR)/tests/*.exp)
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_SYSTEM_TEST_ARGS = GPERF=$(USRBINDIR)/gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# normalize the name of gperf
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee# remove compilation lines
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeCOMPONENT_TEST_TRANSFORMS += \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|../src/gperf|gperf|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|/usr/bin/gperf|gperf|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|^.*$(CC).*$$|XXX_REMOVE_XXX|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|^make.*: Leaving directory.*$$|XXX_REMOVE_XXX|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|^make.*: Entering directory.*$$|XXX_REMOVE_XXX|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "s|^make.*: Nothing to be.*$$|XXX_REMOVE_XXX|g" ' \
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee '-e "/^XXX_REMOVE_XXX$$/d" '
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeREQUIRED_PACKAGES += system/library/c++-runtime
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomeeREQUIRED_PACKAGES += system/library/math
fb3fb4f3d76d55b64440afd0af72775dfad3bd1dtomee