Makefile revision 3746
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# CDDL HEADER START
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# The contents of this file are subject to the terms of the
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Common Development and Distribution License (the "License").
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# You may not use this file except in compliance with the License.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# or http://www.opensolaris.org/os/licensing.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# See the License for the specific language governing permissions
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# and limitations under the License.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# When distributing Covered Code, include this CDDL HEADER in each
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# If applicable, add the following below this CDDL HEADER, with the
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# fields enclosed by brackets "[]" replaced with your own identifying
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# information: Portions Copyright [yyyy] [name of copyright owner]
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# CDDL HEADER END
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
39d8db043b599a7382f94bfc904d5e108af438bdLennart PoetteringCOMPONENT_PROJECT_URL= http://mercurial.selenic.com/
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering sha256:c4369320e276d78aada1b5936e96c7bbbbb8154cfba725ef4e8757dcedeaf1ef
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Mercurial does not yet support Python 3.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(PROTO_DIR)/usr/bin ; $(MV) -f hg hg-$(PYTHON_VERSION))
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart PoetteringPKG_PROTO_DIRS += $(COMPONENT_SRC)/contrib
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poettering# Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poettering# worked, and using /bin/bash doesn't always work, either. Also skip the
aea2429d6ec32261dbf6b9caa125fcc6ea9ea76aLennart Poettering# tests which try to check all the code in the userland gate. And finally,
aea2429d6ec32261dbf6b9caa125fcc6ea9ea76aLennart Poettering# test the bits from the proto area, rather than rebuilding. Given the way the
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering# test suite works, the hg executable must be named "hg".
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering echo "test-check-code-hg.t\ntest-module-imports.t" > blacklist); \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(PROTOUSRBINDIR); rm -f hg; ln -s hg-$(PYTHON_VERSION) hg)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringCOMPONENT_TEST_ENV = PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) TERM=dumb
2c27fbca2d88214bd305272308a370a962818f1eLennart Poettering# Assuming you have docutils installed, update the manpages patch for a new
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# mercurial version based on the patches applied to the source and to the
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poettering# manpage generator. This works either against source that's already been
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poettering# patched with the older manpages.patch or against a fresh tarball. Eventually
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering# we'll have docutils in the CBE and we'll be able to regenerate the manpages
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering# as part of the build, rather than patching them.
dc4d47e2c79aafa3ef646e32ff3422c4ce935c1bLennart Poettering if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poettering cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poettering diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \