Makefile revision 5389
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# CDDL HEADER START
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# The contents of this file are subject to the terms of the
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Common Development and Distribution License (the "License").
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# You may not use this file except in compliance with the License.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# See the License for the specific language governing permissions
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# and limitations under the License.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# When distributing Covered Code, include this CDDL HEADER in each
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# If applicable, add the following below this CDDL HEADER, with the
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
a9b62afc62b28da7a1a77f34259f8013892d9664vboxsync# CDDL HEADER END
a9b62afc62b28da7a1a77f34259f8013892d9664vboxsync# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
a9b62afc62b28da7a1a77f34259f8013892d9664vboxsyncCOMPONENT_PROJECT_URL= http://gnu.org/software/grep/
a9b62afc62b28da7a1a77f34259f8013892d9664vboxsyncCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
a9b62afc62b28da7a1a77f34259f8013892d9664vboxsync sha256:ca91d22f017bfcb503d4bc3b44295491c89a33a3df0c3d8b8614f2d3831836eb
7e3a9a30ad06aaa937b5bfe12eef894f23091ec4vboxsyncCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/grep/$(COMPONENT_ARCHIVE)
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# We need to be able to return from void functions
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# 64-bit only components are delivered to the "32-bit" locations since we don't
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# need both versions.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Enable aslr for this component
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Needed for "gmake test" to work.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# SHELLOPTS is exported via make-rules/shared-macros.mk,
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# causing the braceexpand option to be set.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# This option causes "$1: unbound variable" errors during the check-TESTS,
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# and the gnulib-tests don't even run at all.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Note that the below unexports SHELLOPTS, even for targets
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# other than "test."
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Test transforms retain only relevant results output.
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync '-e "/TOTAL/p" ' \
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync '-e "/SKIP/p" ' \
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync '-e "/PASS/p" ' \
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync '-e "/FAIL/p" ' \
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync '-e "/ERROR/p" '
71955773a7f477f9a159a491f765ba97e1f00e1avboxsync# Putting GNU on path first prevents some tests from being skipped,
71955773a7f477f9a159a491f765ba97e1f00e1avboxsync# which also keeps the test and system-test results consistent.
71955773a7f477f9a159a491f765ba97e1f00e1avboxsync# With the test target, the path to the just-built commands is
71955773a7f477f9a159a491f765ba97e1f00e1avboxsync# prepended to PATH. With the system-test target, we patch
71955773a7f477f9a159a491f765ba97e1f00e1avboxsync# to prevent the PATH from being prepended.
71955773a7f477f9a159a491f765ba97e1f00e1avboxsyncCOMPONENT_SYSTEM_TEST_ENV += "PATH=$(GNUBIN):$(PATH)"
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# Patch to change test path so it tests grep commands from /usr/gnu/bin
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync# installed on the test system. If we patch, we must re-configure the
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync$(SOURCE_DIR)/.system-test-patched: $(SOURCE_DIR)/.prep
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(COMPONENT_DIR)/system-test-patches/systest.patch
test-check:
cd $(COMPONENT_DIR); \