components/groff/Makefile
author John Beck <John.Beck@Oracle.COM>
Fri, 21 Nov 2014 16:37:26 -0800
changeset 2225 f064d3d3190d
parent 2218 399aeeee867d
child 3817 30b42c38bbc4
permissions -rw-r--r--
20078677 Userland Makefiles should support a configure: target
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
1883
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    23
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		groff
1883
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    29
COMPONENT_VERSION=	1.22.2
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://www.gnu.org/software/groff/
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH= \
1883
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    34
    sha256:380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a13d2076
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
COMPONENT_BUGDB=	utility/groff
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1883
diff changeset
    38
TPNO=			8829
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1883
diff changeset
    39
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
include ../../make-rules/prep.mk
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
include ../../make-rules/configure.mk
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
include ../../make-rules/ips.mk
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
# The grog.sh script needs GNU awk not the Solaris one.
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
COMPONENT_PRE_CONFIGURE_ACTION = \
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
	$(GSED) -i -e 's?awk?/usr/gnu/bin/awk?' \
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
		$(SOURCE_DIR)/src/roff/grog/grog.sh
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
1883
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    49
# There are _GL_INLINE_HEADER_BEGIN and _GL_INLINE_HEADER_END definitions in
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    50
# .../src/libs/gnulib/lib/wctype.h that are not being processed. There is
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    51
# code in .../src/libs/gnulib/config.h that would do this, but this header
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    52
# files is not included by wctype.h (or the C++ files that use it and fail
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    53
# to build with the Studio compilers:
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    54
# .../src/roff/troff/[env.cpp, input.cpp, node.cpp]
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    55
# See CR #17959391 for more details.
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    56
COMPONENT_POST_CONFIGURE_ACTION = \
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    57
	$(GSED) -i -e 's/_GL_INLINE_HEADER_BEGIN//' \
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    58
		-e 's/_GL_INLINE_HEADER_END//' \
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    59
		$(SOURCE_DIR)/src/libs/gnulib/lib/wctype.in.h
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    60
1486
cb30aa7f446c 17464860 groffer fails finding support library
Rich Burridge <rich.burridge@oracle.com>
parents: 1485
diff changeset
    61
# Everything is under /usr/bin and /usr/lib so set bindir and libdir correctly.
cb30aa7f446c 17464860 groffer fails finding support library
Rich Burridge <rich.burridge@oracle.com>
parents: 1485
diff changeset
    62
CONFIGURE_BINDIR.64 =	$(CONFIGURE_PREFIX)/bin
cb30aa7f446c 17464860 groffer fails finding support library
Rich Burridge <rich.burridge@oracle.com>
parents: 1485
diff changeset
    63
CONFIGURE_LIBDIR.64 =	$(CONFIGURE_PREFIX)/lib
cb30aa7f446c 17464860 groffer fails finding support library
Rich Burridge <rich.burridge@oracle.com>
parents: 1485
diff changeset
    64
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
CONFIGURE_OPTIONS += \
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
    --with-appresdir=$(CONFIGURE_PREFIX)/X11/lib/X11/app-defaults
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
CONFIGURE_OPTIONS +=	CXX="$(CXX)"
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
CONFIGURE_OPTIONS +=	CXXFLAGS="$(CXXFLAGS)"
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
2218
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    72
# Groff's manual section numbering is configurable.  Renumber the sections
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    73
# during build to get the internal references substituted, and during install
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    74
# to get them into the right directories.
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    75
COMPONENT_BUILD_ARGS +=	man5ext=4
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    76
COMPONENT_BUILD_ARGS +=	man7ext=5
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    77
COMPONENT_INSTALL_ARGS +=	man5ext=4
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    78
COMPONENT_INSTALL_ARGS +=	man7ext=5
399aeeee867d 20062059 groff section 4/5 man pages are incorrectly labeled and referenced internally
Danek Duvall <danek.duvall@oracle.com>
parents: 1948
diff changeset
    79
1883
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    80
# Don't generate tmac wrappers for the Solaris troff macro packages.
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    81
# Some man pages (such as groff.1) use long macro name definitions
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    82
# which fail in compatibility mode. See:
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    83
# http://osdir.com/ml/printing.groff.general/2003-07/msg00088.html
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    84
# for more details.
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    85
COMPONENT_INSTALL_ARGS += tmac_wrap=""
bb9b7c4fd9b7 PSARC 2013/394 groff version 1.22.2
Rich Burridge <rich.burridge@oracle.com>
parents: 1486
diff changeset
    86
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
COMPONENT_INSTALL_ARGS += legacyfontdir=$(PROTOUSRLIBDIR)/font
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
COMPONENT_INSTALL_ARGS += sys_tmac_prefix=$(PROTOUSRSHARELIBDIR)/tmac/
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
COMPONENT_PRE_INSTALL_ACTION = \
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
	($(MKDIR) $(PROTOUSRBINDIR) )
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
1485
808df10bcc09 17483555 groff, guile and lua should be ASLR enabled
Rich Burridge <rich.burridge@oracle.com>
parents: 1108
diff changeset
    93
ASLR_MODE = $(ASLR_ENABLE)
808df10bcc09 17483555 groff, guile and lua should be ASLR enabled
Rich Burridge <rich.burridge@oracle.com>
parents: 1108
diff changeset
    94
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
# common targets
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2218
diff changeset
    96
configure:	$(CONFIGURE_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2218
diff changeset
    97
1108
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
build:		$(BUILD_64)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
install:	$(INSTALL_64)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   101
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   102
test:		$(NO_TESTS)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   103
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   104
BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   105
3aa5ccc8d070 15820205 SUNBT7202645 Move groff from Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   106
include ../../make-rules/depend.mk