Makefile revision 2302
2719N/A#
2719N/A# CDDL HEADER START
2719N/A#
2719N/A# The contents of this file are subject to the terms of the
2719N/A# Common Development and Distribution License (the "License").
2719N/A# You may not use this file except in compliance with the License.
2719N/A#
2719N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2719N/A# or http://www.opensolaris.org/os/licensing.
2719N/A# See the License for the specific language governing permissions
2719N/A# and limitations under the License.
2719N/A#
2719N/A# When distributing Covered Code, include this CDDL HEADER in each
2719N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2719N/A# If applicable, add the following below this CDDL HEADER, with the
2719N/A# fields enclosed by brackets "[]" replaced with your own identifying
2719N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2719N/A#
2719N/A# CDDL HEADER END
2719N/A#
2719N/A# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
2719N/A#
3817N/Ainclude ../../make-rules/shared-macros.mk
2719N/A
2719N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
2719N/A
2719N/ACOMPONENT_NAME= mercurial
2719N/ACOMPONENT_VERSION= 2.8.2
2719N/ACOMPONENT_PROJECT_URL= http://mercurial.selenic.com/
2719N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2719N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2719N/ACOMPONENT_ARCHIVE_HASH= \
2719N/A sha256:c8a5baa21140c6cd6749c3b52b5e5e4a14b6b8ee7c518d9d9de09b1952efbe6f
2719N/ACOMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
2719N/ACOMPONENT_BUGDB= utility/hg
2719N/A
2719N/Ainclude $(WS_TOP)/make-rules/prep.mk
2899N/Ainclude $(WS_TOP)/make-rules/setup.py.mk
2899N/Ainclude $(WS_TOP)/make-rules/ips.mk
3817N/A
3817N/ACOMPONENT_POST_INSTALL_ACTION = \
3817N/A (cd $(PROTO_DIR)/usr/bin ; $(MV) -f hg hg-$(PYTHON_VERSION))
2719N/A
2719N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/contrib
2719N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/doc
2719N/A
2719N/A# Set mod time of patched file from patch. Use this to ensure that the .py
3998N/A# file consistently gets the same timestamp.
2719N/A$(SOURCE_DIR)/.https_proxy.patched: GPATCH_FLAGS += -Z
2719N/A
2719N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
2719N/A
2719N/A# Assuming you have docutils installed, update the manpages patch for a new
2719N/A# mercurial version based on the patches applied to the source and to the
2719N/A# manpage generator. This works either against source that's already been
2719N/A# patched with the older manpages.patch or against a fresh tarball. Eventually
2719N/A# we'll have docutils in the CBE and we'll be able to regenerate the manpages
2719N/A# as part of the build, rather than patching them.
2719N/Apatches/manpages.patch:
2719N/A if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \
2719N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
2719N/A for f in hg.1 hgignore.5 hgrc.5; do \
2719N/A diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \
2719N/A done > $@; \
2719N/A else \
2719N/A for f in hg.1 hgignore.5 hgrc.5; do \
2719N/A cp -p $(COMPONENT_SRC)/doc/$$f $(COMPONENT_SRC)/doc/$$f.orig; \
3998N/A done; \
3998N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
3998N/A for f in hg.1 hgignore.5 hgrc.5; do \
3998N/A diff -u $(COMPONENT_SRC)/doc/$$f.orig $(COMPONENT_SRC)/doc/$$f; \
2719N/A done > $@; \
2719N/A fi || true
2719N/A
2719N/A# common targets
2719N/Abuild: $(BUILD_32)
2719N/A
2719N/Ainstall: $(INSTALL_32)
2719N/A
4337N/A# Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
4337N/A# worked, and using /bin/bash doesn't always work, either. Also skip the
2719N/A# check-code test, since that ends up trying to check all the code in the
3817N/A# userland gate. And finally, test the bits from the proto area, rather than
4424N/A# rebuilding. Given the way the test suite works, the hg executable must be
4424N/A# named "hg".
4424N/Atest: $(INSTALL_32)
3817N/A (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
echo test-check-code-hg.t > blacklist)
(cd $(PROTOUSRBINDIR); ln -s hg-$(PYTHON_VERSION) hg)
(cd $(COMPONENT_SRC)/tests ; \
PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) TERM=dumb \
$(PYTHON) ./run-tests.py --shell $(BUILD_DIR)/sh \
--with-hg $(PROTOUSRBINDIR)/hg --blacklist $(BUILD_DIR)/blacklist)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include $(WS_TOP)/make-rules/depend.mk