120N/A#
120N/A# CDDL HEADER START
120N/A#
120N/A# The contents of this file are subject to the terms of the
120N/A# Common Development and Distribution License (the "License").
120N/A# You may not use this file except in compliance with the License.
120N/A#
120N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
120N/A# or http://www.opensolaris.org/os/licensing.
120N/A# See the License for the specific language governing permissions
120N/A# and limitations under the License.
120N/A#
120N/A# When distributing Covered Code, include this CDDL HEADER in each
120N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
120N/A# If applicable, add the following below this CDDL HEADER, with the
120N/A# fields enclosed by brackets "[]" replaced with your own identifying
120N/A# information: Portions Copyright [yyyy] [name of copyright owner]
120N/A#
120N/A# CDDL HEADER END
120N/A#
120N/A
120N/A#
5270N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
120N/A#
5680N/ABUILD_BITS= 64_and_32
5270N/A# for the tests
5680N/ACOMPILER= gcc
120N/Ainclude ../../make-rules/shared-macros.mk
120N/A
120N/ACOMPONENT_NAME= bison
5270N/ACOMPONENT_VERSION= 3.0.4
5270N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
844N/ACOMPONENT_ARCHIVE_HASH= \
5270N/A sha256:a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1
120N/A
5270N/ATPNO= 24440
2899N/A
5680N/ATEST_TARGET= $(TEST_64)
5680N/A# we need to first generate the test suite
5680N/ASYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
5680N/Ainclude $(WS_MAKE_RULES)/gnu-component.mk
120N/A
486N/ACONFIGURE_LIBDIR.32 = $(GNULIB)
486N/ACONFIGURE_LIBDIR.64 = $(GNULIB)/$(MACH64)
120N/A
5270N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
5270N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
5270N/A
5270N/ACONFIGURE_OPTIONS += M4="/usr/gnu/bin/m4"
5270N/ACONFIGURE_OPTIONS += --disable-silent-rules
5270N/A
5270N/A# the shared library we create needs to be built pic
5270N/ACOMPONENT_BUILD_ARGS += CC_PIC="$(CC_PIC)"
5270N/A
5270N/A# this is cheesy but the tests don't seem to
5270N/A# get compiled with the CFLAGS we built bison
5270N/A# with, so they are 32-bit otherwise.
5270N/ACONFIGURE_OPTIONS += WARN_CXXFLAGS_TEST="$(CFLAGS)"
120N/A
5680N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5680N/A
3993N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
3993N/A
4339N/A# the test suite actually generates a script
4339N/A# that runs the just-built bison against the
4339N/A# just-built files. to make it run the system
4339N/A# one, we can just replace that script with
4339N/A# a simpler one
4339N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION= \
4339N/A (cd $(@D)/tests; mv bison bison.orig; \
4339N/A echo "\#!/bin/bash" > bison; \
5270N/A echo "IFS=" >> bison; \
4339N/A echo "exec /usr/bin/bison \$$@" >> bison; \
4339N/A chmod +x bison; \
4339N/A )
4339N/A
4339N/ACOMPONENT_POST_SYSTEM_TEST_ACTION= \
4339N/A (cd $(@D)/tests; rm -f bison; mv bison.orig bison)
4339N/A
3993N/A# Strip compilation lines from test output
5270N/A# and strange backslash lines. and random output,
5270N/A# including rm complaints over nfs
3993N/ACOMPONENT_TEST_TRANSFORMS += \
3993N/A '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
3993N/A '-e "s|^.*$(CXX).*$$|XXX_CC_XXX|g" ' \
3993N/A '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
3993N/A '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
4339N/A '-e "s|^config.status: .*$$|XXX_CC_XXX|g" ' \
4339N/A '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
4339N/A '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^make.*: Nothing to be done for.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^make.*: .*is up to date.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^mv -f.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^.$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^updating examples.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|.*build-aux/ylwrap.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|.*examples/calc++/calc++-parser.stamp.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|.*tests/bison -o y.tab.c.*$$|XXX_CC_XXX|g" ' \
5270N/A '-e "s|^rm:.*directory renamed.*$$|XXX_CC_XXX|g" ' \
3993N/A '-e "/^XXX_CC_XXX$$/d" '
3993N/A
3817N/AREQUIRED_PACKAGES += developer/macro/gnu-m4