1508N/A#
1508N/A# CDDL HEADER START
1508N/A#
1508N/A# The contents of this file are subject to the terms of the
1508N/A# Common Development and Distribution License (the "License").
1508N/A# You may not use this file except in compliance with the License.
1508N/A#
1508N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1508N/A# or http://www.opensolaris.org/os/licensing.
1508N/A# See the License for the specific language governing permissions
1508N/A# and limitations under the License.
1508N/A#
1508N/A# When distributing Covered Code, include this CDDL HEADER in each
1508N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1508N/A# If applicable, add the following below this CDDL HEADER, with the
1508N/A# fields enclosed by brackets "[]" replaced with your own identifying
1508N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1508N/A#
1508N/A# CDDL HEADER END
1508N/A#
1508N/A
1508N/A#
5680N/A# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
1508N/A#
5841N/ABUILD_BITS= 64
1508N/Ainclude ../../make-rules/shared-macros.mk
1508N/A
1508N/ACOMPONENT_NAME= getopt
3884N/ACOMPONENT_VERSION= 1.1.6
3884N/ACOMPONENT_PROJECT_URL= http://frodo.looijaard.name/project/getopt/
1508N/ACOMPONENT_ARCHIVE_HASH= \
3884N/A sha256:d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe
3884N/ACOMPONENT_ARCHIVE_URL= http://frodo.looijaard.name/system/files/software/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
1508N/ACOMPONENT_BUGDB= utility/gnu-getopt
1508N/A
3884N/ATPNO= 21550
2899N/A
5680N/ABUILD_STYLE= justmake
5680N/ASYSTEM_TEST_TARGET= $(SYSTEM_TEST_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
1508N/A
1508N/A# getopt doesn't use configure, override the hard-wired values in the Makefile.
5841N/ALDFLAGS += $(CC_BITS)
1845N/ACOMPONENT_BUILD_ARGS+= CC="$(CC)"
1508N/ACOMPONENT_BUILD_ARGS+= CFLAGS="$(CFLAGS)"
5680N/ACOMPONENT_BUILD_ARGS+= LDFLAGS="$(LDFLAGS)"
1508N/ACOMPONENT_BUILD_ARGS+= LIBCGETOPT=0
1508N/A
5680N/ACOMPONENT_INSTALL_ARGS+= prefix="$(USRGNUDIR)"
5680N/ACOMPONENT_INSTALL_ARGS+= mandir="$(GNUSHAREMAN)"
1845N/ACOMPONENT_INSTALL_ARGS+= CC="$(CC)"
1508N/ACOMPONENT_INSTALL_ARGS+= CFLAGS="$(CFLAGS)"
5680N/ACOMPONENT_INSTALL_ARGS+= LDFLAGS="$(LDFLAGS)"
1508N/A
1508N/A# Stupid source tarball distribution contains two .o files.
1508N/ACOMPONENT_POST_UNPACK_ACTION= \
1508N/A $(RM) $(COMPONENT_SRC)/gnu/*.o
1508N/A
4735N/ACOMPONENT_TEST_TRANSFORMS += \
4735N/A '-e "s|\./getopt|getopt|g" ' \
4735N/A '-e "s|/usr/gnu/bin/getopt|getopt|g" ' \
4735N/A '-e "s|\./run-tests.*$$|XXX_CC_XXX|g" ' \
4735N/A '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
4735N/A '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
4735N/A '-e "s|^make\[1\].*$$|XXX_CC_XXX|g" ' \
4735N/A '-e "/^XXX_CC_XXX$$/d" '
4735N/A
5680N/ACOMPONENT_TEST_ENV += PATH=$(BUILD_DIR_$(BITS)):$(GNUBIN):$(USRBINDIR)
3884N/ACOMPONENT_TEST_TARGETS = test
3301N/A
5680N/ACOMPONENT_SYSTEM_TEST_ENV += PATH=$(GNUBIN):$(USRBINDIR)
4735N/ACOMPONENT_SYSTEM_TEST_CMD = ./run-tests
5680N/ACOMPONENT_SYSTEM_TEST_ARGS = $(GNUBIN)/getopt
4735N/ACOMPONENT_SYSTEM_TEST_TARGETS =