components/asciidoc/Makefile
author Shawn Walker-Salas <shawn.walker@oracle.com>
Wed, 30 Mar 2016 13:33:31 -0700
changeset 5682 94c0ca64c022
parent 4984 7145b15b7f0d
child 6467 e5632698211d
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:
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    23
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    25
BUILD_BITS= 64
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		asciidoc
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=	8.6.8
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://www.methods.co.nz/asciidoc/
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_ARCHIVE_HASH= \
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
    sha256:ffb67f59dccaf6f15db72fcd04fdf21a2f9b703d31f94fcd0c49a424a9fcfbc4
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_URL=	 http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1510
diff changeset
    35
TPNO=			14505
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1510
diff changeset
    36
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    37
SYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64)
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    38
include $(WS_MAKE_RULES)/common.mk
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
2188
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    40
PATCH_LEVEL = 0
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    41
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
# AsciiDoc configuration and data files belong in /usr/share, not /etc based
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
# on discussion from ARC pre-review.
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    45
CONFIGURE_OPTIONS +=    --sysconfdir=$(USRSHAREDIR)
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
# pkgdepend doesn't like the first line of a Python script to be:
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
#
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
COMPONENT_POST_INSTALL_ACTION += \
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
        $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    52
                $(PROTOUSRBINDIR)/asciidoc.py;
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
COMPONENT_POST_INSTALL_ACTION += \
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
        $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 4984
diff changeset
    55
                $(PROTOUSRBINDIR)/a2x.py;
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
COMPONENT_PRE_CONFIGURE_ACTION = \
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
        ($(CLONEY) $(SOURCE_DIR) $(@D))
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
# common targets
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
# Tests require image/graphviz to be installed.  Some tests also want to run
2188
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    62
# programs which are not automatically available on Solaris (latex, abc2ly
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    63
# and lilypad), so these tests will output messages of the form:
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    64
# latex2png.py: failed command: latex ...
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    65
# music2png.py: failed command: abc2ly ...
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    66
# music2png.py: failed command: lilypond ...
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
COMPONENT_PRE_TEST_ACTION = \
2188
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    68
	(cd $(@D); ln -s asciidoc.py asciidoc)
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    69
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    70
COMPONENT_TEST_DIR =	$(@D)/tests
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    71
COMPONENT_TEST_ENV_CMD =
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    72
COMPONENT_TEST_ENV =	export PATH=$(@D):$$PATH;
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    73
COMPONENT_TEST_CMD =	\
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    74
	python$(PYTHON_VERSION) ./asciidocapi.py; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    75
	if [ $$? -eq 0 ] ; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    76
		then print "asciidocapi test passed"; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    77
		else print "asciidocapi test failed"; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    78
	fi; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    79
	python$(PYTHON_VERSION) ./testasciidoc.py update; \
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    80
	python$(PYTHON_VERSION) ./testasciidoc.py run
bbabf4f00a89 19925601 "gmake test" failures for asciidoc
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    81
COMPONENT_TEST_TARGETS =
3588
c7ba860a6ef7 20309782 asciidoc should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    82
COMPONENT_POST_TEST_ACTION = \
c7ba860a6ef7 20309782 asciidoc should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    83
	(cd $(@D); rm asciidoc)
c7ba860a6ef7 20309782 asciidoc should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    84
c7ba860a6ef7 20309782 asciidoc should have some master test results to compare against
Rich Burridge <rich.burridge@oracle.com>
parents: 2225
diff changeset
    85
COMPONENT_TEST_TRANSFORMS += \
4768
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    86
	'-n ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    87
	'-e "/passed/p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    88
	'-e "/^[1-9]: /p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    89
	'-e "/^[1-9][0-9]: /p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    90
	'-e "/^SOURCE/p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    91
	'-e "/^PASSED/p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    92
	'-e "/^FAILED/p" ' \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    93
	'-e "/^TOTAL/p" '
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    94
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    95
COMPONENT_SYSTEM_TEST_DIR =    $(@D)/tests
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    96
COMPONENT_SYSTEM_TEST_ENV_CMD =
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    97
COMPONENT_SYSTEM_TEST_CMD =    \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    98
	python$(PYTHON_VERSION) ./asciidocapi.py; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    99
	if [ $$? -eq 0 ] ; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   100
		then print "asciidocapi test passed"; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   101
		else print "asciidocapi test failed"; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   102
	fi; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   103
	python$(PYTHON_VERSION) ./testasciidoc.py update; \
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   104
	python$(PYTHON_VERSION) ./testasciidoc.py run
36f47c0b202b 21613730 asciidoc should hookup its system-test target.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
   105
COMPONENT_SYSTEM_TEST_TARGETS =
1510
2a70db54adec PSARC 2013/268 AsciiDoc
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   106
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3588
diff changeset
   107
REQUIRED_PACKAGES += library/libxml2
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3588
diff changeset
   108
REQUIRED_PACKAGES += library/libxslt
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3588
diff changeset
   109
REQUIRED_PACKAGES += web/browser/lynx