components/gzip/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Mon, 11 Mar 2013 07:54:06 -0700
changeset 1204 c8e9f85492a3
parent 1191 3bdf33525a13
child 1948 2d1537e7942d
permissions -rw-r--r--
16447337 gzip cores when built with studio 12.3 on intel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     1
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     3
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     7
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    12
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    18
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    20
#
1191
3bdf33525a13 16426977 Numerous components in Userland need to have ASLR enabled.
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    21
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    22
#
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    24
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		gzip
977
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    26
COMPONENT_VERSION=	1.5
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    27
COMPONENT_PROJECT_URL=	http://www.gnu.org/software/gzip/
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 755
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
977
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    31
    sha256:b5d56e8ffc9918e8c941fab56e04121194f9870adeeb859e09c09eac264035a3
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    32
COMPONENT_ARCHIVE_URL=	ftp://ftp.gnu.org/gnu/gzip/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 1030
diff changeset
    33
COMPONENT_BUGDB=	utility/gzip
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    34
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    35
include ../../make-rules/prep.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    36
include ../../make-rules/configure.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/ips.mk
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    38
755
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    39
# To get correct @[email protected] substitution in the various gz<whatever> scripts.
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    40
CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    41
1204
c8e9f85492a3 16447337 gzip cores when built with studio 12.3 on intel
Rich Burridge <rich.burridge@oracle.com>
parents: 1191
diff changeset
    42
# Prevent gzip compilation using assembly code, which segv's with Studio 12.3.
c8e9f85492a3 16447337 gzip cores when built with studio 12.3 on intel
Rich Burridge <rich.burridge@oracle.com>
parents: 1191
diff changeset
    43
CONFIGURE_OPTIONS +=	gzip_cv_assembler=no
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    44
CONFIGURE_OPTIONS +=	--infodir=$(CONFIGURE_INFODIR)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    45
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)" 
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    46
977
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    47
# Needed for "gmake test" to work successfully.
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    48
# If SHELLOPTS is exported (as it is by the userland makefiles),
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    49
# then all shell options get exported to child invocations of bash,
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    50
# which results in test failures due to nounset and xtrace being
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    51
# set unexpectedly, and errors such as "$1: unbound variable" and
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    52
# diffs failing due to script tracing in output files.
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    53
unexport SHELLOPTS
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    54
1030
faf1845e3b13 7161330 gzgrep -e option no longer works
Petr Sumbera <petr.sumbera@oracle.com>
parents: 977
diff changeset
    55
COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR); $(AUTORECONF) -if)
faf1845e3b13 7161330 gzgrep -e option no longer works
Petr Sumbera <petr.sumbera@oracle.com>
parents: 977
diff changeset
    56
977
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    57
# Get the binaries to test from the component build area.
4a6b2f8dca71 7183526 Update gzip to version 1.5
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    58
COMPONENT_TEST_ENV +=	PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    59
COMPONENT_TEST_TARGETS = check
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    60
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    61
# Fix references to Solaris renamed programs (z*->gz*) in man pages, info
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    62
# pages and in wrapper scripts.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    63
COMPONENT_PRE_INSTALL_ACTION = \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    64
	(cd $(COMPONENT_SRC) ; \
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    65
	 for file in `ls *.1 doc/*.info z*.in` ; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    66
		mv $$file $$file.tmp ; \
750
9da3e3e3c604 7157415 gzip 1.4 integration is broken
Rich Burridge <rich.burridge@oracle.com>
parents: 748
diff changeset
    67
		$(GSED) -f $(COMPONENT_DIR)/renaming.sed $$file.tmp > $$file ; \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    68
		$(RM) $$file.tmp ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    69
	 done)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    70
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    71
# Rename installed programs and man pages in proto dir (z*->gz*).
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    72
COMPONENT_POST_INSTALL_ACTION = \
755
e7d0aed114ef 7157429 gzip 1.4 integration still has a couple of problems
Rich Burridge <rich.burridge@oracle.com>
parents: 750
diff changeset
    73
	(for dir in $(PROTOUSRBINDIR) $(PROTOUSRSHAREMAN1DIR) ; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    74
		cd $$dir; \
177
fd9cb2273c9d 7015392 the build should really fail if the pkg tools fail
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 96
diff changeset
    75
	 	for zfile in `ls z*`; do \
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    76
			mv $$zfile g$$zfile ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    77
		done ; \
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    78
	 done)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    79
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    80
# Provide missing man pages.
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    81
GZGREP_MAN_VARIANTS+=$(PROTOUSRSHAREMAN1DIR)/gzegrep.1
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    82
GZGREP_MAN_VARIANTS+=$(PROTOUSRSHAREMAN1DIR)/gzfgrep.1
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    83
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    84
$(GZGREP_MAN_VARIANTS):
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    85
	$(RM) [email protected]; echo ".so man1/gzgrep.1" > [email protected]
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    86
1191
3bdf33525a13 16426977 Numerous components in Userland need to have ASLR enabled.
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    87
ASLR_MODE = $(ASLR_ENABLE)
3bdf33525a13 16426977 Numerous components in Userland need to have ASLR enabled.
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    88
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    89
build:		$(BUILD_64)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    90
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    91
install:	$(INSTALL_64) $(GZGREP_MAN_VARIANTS)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    92
748
34aa5d11ee93 6888036 Problem with utility/gzip
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    93
test:		$(TEST_64)
96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    94
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    95
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    96
0cad26ba1671 7019038 move gzip to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    97
include ../../make-rules/depend.mk