components/mercurial/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 21 Oct 2014 12:20:30 -0700
changeset 2164 b580bc10e31a
parent 2014 7624c8a1942b
child 3533 0b8107a40da7
permissions -rw-r--r--
19824924 Various Userland component test: Makefile targets should be standardized
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
#
1637
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    21
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    23
include ../../make-rules/shared-macros.mk
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_NAME=		mercurial
2014
7624c8a1942b 19286576 mercurial 3.0.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1981
diff changeset
    28
COMPONENT_VERSION=	3.0.2
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
    29
COMPONENT_PROJECT_URL=	http://mercurial.selenic.com/
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
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: 751
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
2014
7624c8a1942b 19286576 mercurial 3.0.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1981
diff changeset
    33
    sha256:ed387cc0e9754ec59bd4a390639b5a4ea11698ae4413243f8b4a2d6d48b3b7d6
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 821
diff changeset
    35
COMPONENT_BUGDB=	utility/hg
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1637
diff changeset
    37
# Fails to build: not Python 3 ready.
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1637
diff changeset
    38
PYTHON_VERSIONS = 2.7 2.6
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents: 1637
diff changeset
    39
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
include $(WS_TOP)/make-rules/prep.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
include $(WS_TOP)/make-rules/setup.py.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
include $(WS_TOP)/make-rules/ips.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
751
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 706
diff changeset
    44
COMPONENT_POST_INSTALL_ACTION = \
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 706
diff changeset
    45
	(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
    46
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
PKG_PROTO_DIRS +=	$(COMPONENT_SRC)/contrib
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
PKG_PROTO_DIRS +=	$(COMPONENT_SRC)/doc
196
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
    49
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
    50
# Set mod time of patched file from patch.  Use this to ensure that the .py
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
    51
# file consistently gets the same timestamp.
816e398e992c 6907515 mercurial 1.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 181
diff changeset
    52
$(SOURCE_DIR)/.https_proxy.patched: GPATCH_FLAGS += -Z
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    54
# 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
    55
# 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
    56
# 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
    57
# 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
    58
# test suite works, the hg executable must be named "hg".
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    59
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
    60
	(cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    61
	echo "test-check-code-hg.t\ntest-module-imports.t" > blacklist); \
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    62
	(cd $(PROTOUSRBINDIR); ln -s hg-$(PYTHON_VERSION) hg)
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    63
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    64
COMPONENT_TEST_DIR =	$(COMPONENT_SRC)/tests
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    65
COMPONENT_TEST_ENV =	PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) TERM=dumb
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
    66
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
    67
			--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
    68
			--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
    69
			--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
    70
1434
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    71
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
    72
1637
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    73
# 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
    74
# 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
    75
# 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
    76
# 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
    77
# 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
    78
# as part of the build, rather than patching them.
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    79
patches/manpages.patch:
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    80
	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
    81
		cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    82
		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
    83
			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
    84
		done > $@; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    85
	else \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    86
		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
    87
			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
    88
		done; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    89
		cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    90
		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
    91
			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
    92
		done > $@; \
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    93
	fi || true
54bd5ac8db85 18050227 mercurial 2.8.2
Danek Duvall <danek.duvall@oracle.com>
parents: 1434
diff changeset
    94
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    95
# common targets
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
build:		$(BUILD_32)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    97
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
install:	$(INSTALL_32)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
2164
b580bc10e31a 19824924 Various Userland component test: Makefile targets should be standardized
Rich Burridge <rich.burridge@oracle.com>
parents: 2014
diff changeset
   100
test:		install $(TEST_32)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   104
include $(WS_TOP)/make-rules/depend.mk