components/getopt/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 7687 1093e2a9adbd
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 5843
diff changeset
    23
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
5843
9cefd39b551b 23175936 lp64 status regression for some components
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5682
diff changeset
    25
BUILD_BITS= 64
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		getopt
3884
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    29
COMPONENT_VERSION=	1.1.6
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    30
COMPONENT_PROJECT_URL=	http://frodo.looijaard.name/project/getopt/
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_ARCHIVE_HASH=	\
3884
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    32
    sha256:d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    33
COMPONENT_ARCHIVE_URL=	http://frodo.looijaard.name/system/files/software/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
COMPONENT_BUGDB=	utility/gnu-getopt
7687
1093e2a9adbd 25590368 Userland components should include "upstream" release tracking information
Rich Burridge <rich.burridge@oracle.com>
parents: 5843
diff changeset
    35
COMPONENT_ANITYA_ID=	13265
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
3884
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    37
TPNO=			21550
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1394
diff changeset
    38
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    39
BUILD_STYLE= justmake
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    40
SYSTEM_TEST_TARGET= $(SYSTEM_TEST_64)
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    41
include $(WS_MAKE_RULES)/common.mk
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
# getopt doesn't use configure, override the hard-wired values in the Makefile.
5843
9cefd39b551b 23175936 lp64 status regression for some components
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5682
diff changeset
    44
LDFLAGS += $(CC_BITS)
1394
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1211
diff changeset
    45
COMPONENT_BUILD_ARGS+=	CC="$(CC)"
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
COMPONENT_BUILD_ARGS+=	CFLAGS="$(CFLAGS)"
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    47
COMPONENT_BUILD_ARGS+=	LDFLAGS="$(LDFLAGS)"
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
COMPONENT_BUILD_ARGS+=	LIBCGETOPT=0
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    50
COMPONENT_INSTALL_ARGS+=	prefix="$(USRGNUDIR)"
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    51
COMPONENT_INSTALL_ARGS+=	mandir="$(GNUSHAREMAN)"
1394
5f86498eee95 16991973 some things ain't parfait'n
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1211
diff changeset
    52
COMPONENT_INSTALL_ARGS+=	CC="$(CC)"
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
COMPONENT_INSTALL_ARGS+=	CFLAGS="$(CFLAGS)"
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    54
COMPONENT_INSTALL_ARGS+=	LDFLAGS="$(LDFLAGS)"
1211
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
# Stupid source tarball distribution contains two .o files.
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
COMPONENT_POST_UNPACK_ACTION= \
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
	$(RM) $(COMPONENT_SRC)/gnu/*.o
72f88619e71d PSARC 2012/354 GNU getopt 1.1.5
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
4737
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    60
COMPONENT_TEST_TRANSFORMS += \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    61
	'-e "s|\./getopt|getopt|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    62
	'-e "s|/usr/gnu/bin/getopt|getopt|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    63
	'-e "s|\./run-tests.*$$|XXX_CC_XXX|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    64
	'-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    65
	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    66
	'-e "s|^make\[1\].*$$|XXX_CC_XXX|g" ' \
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    67
	'-e "/^XXX_CC_XXX$$/d" '
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    68
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    69
COMPONENT_TEST_ENV +=		PATH=$(BUILD_DIR_$(BITS)):$(GNUBIN):$(USRBINDIR)
3884
900fc6843a9d 20555230 GNU getopt should be updated to version 1.1.6
Rich Burridge <rich.burridge@oracle.com>
parents: 3817
diff changeset
    70
COMPONENT_TEST_TARGETS =	test
2145
bdf83a99948d 19796333 GNU getopt could use some tests
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    71
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    72
COMPONENT_SYSTEM_TEST_ENV +=	PATH=$(GNUBIN):$(USRBINDIR)
4737
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    73
COMPONENT_SYSTEM_TEST_CMD =	./run-tests
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4737
diff changeset
    74
COMPONENT_SYSTEM_TEST_ARGS =	$(GNUBIN)/getopt
4737
844cca6e99f3 21549702 Yet more Userland components should have their system-test targets hooked up
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    75
COMPONENT_SYSTEM_TEST_TARGETS =