Makefile revision 3588
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# CDDL HEADER START
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User#
9210d8796eaf4125ac58c034f9b5ca167857a55aAutomatic Updater# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# or http://www.opensolaris.org/os/licensing.
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# See the License for the specific language governing permissions
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# and limitations under the License.
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# If applicable, add the following below this CDDL HEADER, with the
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# CDDL HEADER END
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt#
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt
76786c2904942b708d8a7a4659df74da5dc9446eEvan Huntinclude ../../make-rules/shared-macros.mk
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater
e2e4d321999340802f77adaacd19c797d04b4b95Automatic UpdaterCOMPONENT_NAME= asciidoc
76786c2904942b708d8a7a4659df74da5dc9446eEvan HuntCOMPONENT_VERSION= 8.6.8
76786c2904942b708d8a7a4659df74da5dc9446eEvan HuntCOMPONENT_PROJECT_URL= http://www.methods.co.nz/asciidoc/
76786c2904942b708d8a7a4659df74da5dc9446eEvan HuntCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
76786c2904942b708d8a7a4659df74da5dc9446eEvan HuntCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_HASH= \
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt sha256:ffb67f59dccaf6f15db72fcd04fdf21a2f9b703d31f94fcd0c49a424a9fcfbc4
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_BUGDB= utility/asciidoc
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserTPNO= 14505
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinclude ../../make-rules/prep.mk
76786c2904942b708d8a7a4659df74da5dc9446eEvan Huntinclude ../../make-rules/configure.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinclude ../../make-rules/ips.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserPATCH_LEVEL = 0
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# AsciiDoc configuration and data files belong in /usr/share, not /etc based
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# on discussion from ARC pre-review.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCONFIGURE_OPTIONS += --sysconfdir=/usr/share
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt# pkgdepend doesn't like the first line of a Python script to be:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_POST_INSTALL_ACTION += \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(PROTOUSRBINDIR64)/asciidoc.py;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_POST_INSTALL_ACTION += \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(PROTOUSRBINDIR64)/a2x.py;
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_PRE_CONFIGURE_ACTION = \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User ($(CLONEY) $(SOURCE_DIR) $(@D))
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserASLR_MODE = $(ASLR_ENABLE)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# common targets
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userconfigure: $(CONFIGURE_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userbuild: $(BUILD_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinstall: $(INSTALL_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Tests require image/graphviz to be installed. Some tests also want to run
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User# programs which are not automatically available on Solaris (latex, abc2ly
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# and lilypad), so these tests will output messages of the form:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# latex2png.py: failed command: latex ...
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# music2png.py: failed command: abc2ly ...
f5ae3cca1d2832239cc821bdef77e90c1739e66dTinderbox User# music2png.py: failed command: lilypond ...
ec899c963c91c16c393e067996400ae244921110Tinderbox UserCOMPONENT_PRE_TEST_ACTION = \
ec899c963c91c16c393e067996400ae244921110Tinderbox User (cd $(@D); ln -s asciidoc.py asciidoc)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
ec899c963c91c16c393e067996400ae244921110Tinderbox UserCOMPONENT_TEST_DIR = $(@D)/tests
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_TEST_ENV_CMD =
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_TEST_ENV = export PATH=$(@D):$$PATH;
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_TEST_CMD = \
ec899c963c91c16c393e067996400ae244921110Tinderbox User python$(PYTHON_VERSION) ./asciidocapi.py; \
ec899c963c91c16c393e067996400ae244921110Tinderbox User if [ $$? -eq 0 ] ; \
ec899c963c91c16c393e067996400ae244921110Tinderbox User then print "asciidocapi test passed"; \
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt else print "asciidocapi test failed"; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User fi; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User python$(PYTHON_VERSION) ./testasciidoc.py update; \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt python$(PYTHON_VERSION) ./testasciidoc.py run
ec899c963c91c16c393e067996400ae244921110Tinderbox UserCOMPONENT_TEST_TARGETS =
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_POST_TEST_ACTION = \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt (cd $(@D); rm asciidoc)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
ec899c963c91c16c393e067996400ae244921110Tinderbox User# The additional asciidoc specific set of transforms to be applied to the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# test results to try to normalize them.
ec899c963c91c16c393e067996400ae244921110Tinderbox UserCOMPONENT_TEST_TRANSFORMS += \
76786c2904942b708d8a7a4659df74da5dc9446eEvan Hunt '-e "s|/tmp......|/tmpxxxxxx|g" '
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Usertest: $(TEST_64)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
ec899c963c91c16c393e067996400ae244921110Tinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinclude ../../make-rules/depend.mk
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User