components/mercurial/Makefile
author Shawn Walker-Salas <shawn.walker@oracle.com>
Wed, 30 Mar 2016 13:33:31 -0700
changeset 5682 94c0ca64c022
parent 5481 5e30cd0645e7
child 5683 05b2186d572e
permissions -rw-r--r--
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh 22228656 remove redundant declarations and additions from makefiles 22252545 simplify build rules for components from common upstream 22378457 tclConfig.sh compiler settings are too specific 22727315 httping curses gui missing 22750630 procmail ignores userland cflags and may use private strstr function 22758725 wdiff uses diff from PATH instead of /usr/gnu/bin/diff 22926847 cloog Makefile typo when setting ASLR_MODE 22935090 tk config script has wrong linker flags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
3746
5d7feca9a1c9 19078590 mercurial needs a TPNO in the fullness of time
Danek Duvall <danek.duvall@oracle.com>
parents: 3596
diff changeset
    21
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    23
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3746
5d7feca9a1c9 19078590 mercurial needs a TPNO in the fullness of time
Danek Duvall <danek.duvall@oracle.com>
parents: 3596
diff changeset
    24
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    25
BUILD_BITS= 32
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    26
include ../../make-rules/shared-macros.mk
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    28
PATH=$(USRBINDIR):$(GNUBIN):$(USRSBINDIR)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_NAME=		mercurial
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    31
COMPONENT_VERSION=	3.7.1
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 400
diff changeset
    32
COMPONENT_PROJECT_URL=	http://mercurial.selenic.com/
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	\
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    34
    sha256:96d37d1f444a032295e190318b3166e9d05abb55916d2b3adb618a8f16c5cfed
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
3533
0b8107a40da7 20183619 userland should support PGP signatures
Danek Duvall <danek.duvall@oracle.com>
parents: 2164
diff changeset
    36
COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).asc
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 821
diff changeset
    37
COMPONENT_BUGDB=	utility/hg
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    39
TPNO=			26646
3746
5d7feca9a1c9 19078590 mercurial needs a TPNO in the fullness of time
Danek Duvall <danek.duvall@oracle.com>
parents: 3596
diff changeset
    40
5d7feca9a1c9 19078590 mercurial needs a TPNO in the fullness of time
Danek Duvall <danek.duvall@oracle.com>
parents: 3596
diff changeset
    41
# Mercurial does not yet support Python 3.
4984
7145b15b7f0d PSARC 2014/190 Python 2.6 EOF
John Beck <John.Beck@Oracle.COM>
parents: 4427
diff changeset
    42
PYTHON_VERSIONS = $(PYTHON2_VERSIONS)
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1637
diff changeset
    43
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    44
BUILD_STYLE= setup.py
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    45
TEST_TARGET= install $(TEST_32)
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    46
# Add install dependency when system-test target is implemented.
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5481
diff changeset
    47
include $(WS_MAKE_RULES)/common.mk
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
751
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 706
diff changeset
    49
COMPONENT_POST_INSTALL_ACTION = \
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 706
diff changeset
    50
	(cd $(PROTO_DIR)/usr/bin ; $(MV) -f hg hg-$(PYTHON_VERSION))
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 706
diff changeset
    51
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
PKG_PROTO_DIRS +=	$(COMPONENT_SRC)/contrib
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
PKG_PROTO_DIRS +=	$(COMPONENT_SRC)/doc
196
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
    54
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    55
# Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    56
# worked, and using /bin/bash doesn't always work, either.  Also skip the
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    57
# tests which try to check all the code in the userland gate.  And finally,
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    58
# test the bits from the proto area, rather than rebuilding.  Given the way the
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    59
# test suite works, the hg executable must be named "hg".
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    60
TEST_BLACKLIST = \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    61
	test-check-code.t \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    62
	test-check-config.t \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    63
	test-hghave.t \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    64
	test-module-imports.t \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    65
	test-run-tests.t
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    66
COMPONENT_PRE_TEST_ACTION = \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    67
	(cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    68
	printf "%s\n" $(TEST_BLACKLIST) > blacklist); \
3596
042f4e7a6dbe 20246148 mercurial 3.2.3
Danek Duvall <danek.duvall@oracle.com>
parents: 3533
diff changeset
    69
	(cd $(PROTOUSRBINDIR); rm -f hg; ln -s hg-$(PYTHON_VERSION) hg)
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    70
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    71
COMPONENT_TEST_DIR =	$(COMPONENT_SRC)/tests
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    72
COMPONENT_TEST_ENV =	PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB)
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    73
COMPONENT_TEST_ENV +=	TERM=dumb
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    74
COMPONENT_TEST_ENV +=	HGTEST_JOBS=$(or $(HGTEST_JOBS),1)
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    75
COMPONENT_TEST_ARGS =	./run-tests.py \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    76
			--shell $(BUILD_DIR)/sh \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    77
			--with-hg $(PROTOUSRBINDIR)/hg \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    78
			--blacklist $(BUILD_DIR)/blacklist
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    79
1434
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    80
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    81
1637
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    82
# Assuming you have docutils installed, update the manpages patch for a new
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    83
# mercurial version based on the patches applied to the source and to the
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    84
# manpage generator.  This works either against source that's already been
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    85
# patched with the older manpages.patch or against a fresh tarball.  Eventually
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    86
# we'll have docutils in the CBE and we'll be able to regenerate the manpages
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    87
# as part of the build, rather than patching them.
5481
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    88
#
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    89
# Only build this target if it doesn't already exist, since this recipe is just
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    90
# for the component maintainer's benefit.
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    91
patches/manpages.patch: $(SOURCE_DIR)/.unpacked \
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    92
    $(SOURCE_DIR)/.patched-rst.patch $(SOURCE_DIR)/.patched-hgmanpage.patch
5e30cd0645e7 21549200 mercurial 3.7.1
Danek Duvall <danek.duvall@oracle.com>
parents: 4984
diff changeset
    93
	if [[ -f $@ ]]; then exit 0; fi; \
1637
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    94
	if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    95
		cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    96
		for f in hg.1 hgignore.5 hgrc.5; do \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    97
			diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    98
		done > $@; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    99
	else \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   100
		for f in hg.1 hgignore.5 hgrc.5; do \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   101
			cp -p $(COMPONENT_SRC)/doc/$$f $(COMPONENT_SRC)/doc/$$f.orig; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   102
		done; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   103
		cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   104
		for f in hg.1 hgignore.5 hgrc.5; do \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   105
			diff -u $(COMPONENT_SRC)/doc/$$f.orig $(COMPONENT_SRC)/doc/$$f; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   106
		done > $@; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
   107
	fi || true