components/yasm/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Wed, 25 Nov 2015 13:34:08 -0800
changeset 5128 218234c0062c
child 5682 94c0ca64c022
permissions -rw-r--r--
PSARC 2015/316 The Yasm Modular Assembler Project 21384151 We should add yasm to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5128
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		yasm
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=	1.3.0
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
COMPONENT_PROJECT_URL=	http://yasm.tortall.net/
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
    sha256:3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	http://www.tortall.net/projects/$(COMPONENT_NAME)/releases/$(COMPONENT_ARCHIVE)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_BUGDB=	utility/yasm
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
TPNO=			23620
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
# We're i386-only
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
ifeq ($(MACH), sparc)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
PUBLISH_STAMP= 
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
endif
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
PYTHON_VERSIONS= 2.7
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
include $(WS_MAKE_RULES)/prep.mk
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
include $(WS_MAKE_RULES)/configure-32_and_64.mk
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
include $(WS_MAKE_RULES)/common-32_and_64.mk
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
# Adjust all the source files in all the Makefile.inc files to generate
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
# shared libraries rather than a library archive.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
# Note that the version number (in the shared-libraries.patch file) should be
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
# bumped anytime upstream makes an incompatible change (that we're aware of).
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
COMPONENT_PRE_CONFIGURE_ACTION = \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
	$(CLONEY) $(SOURCE_DIR) $(@D) ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
	mlist=`/usr/bin/find $(SOURCE_DIR) -name 'Makefile.inc'` ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
	for f in $$mlist ; do \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
	    $(GSED) -i -e 's|libyasm_a_SOURCES|libyasm_la_SOURCES|g' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
			-e 's|LDADD = libyasm.a|LDADD = libyasm.la|g' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
			$$f ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
	done ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
	(cd $(@D) ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
	libtoolize --automake --copy ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
	aclocal -I m4 ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
	autoheader ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
	automake --add-missing --copy ; \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
	autoconf)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
CONFIGURE_ENV += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
CONFIGURE_ENV += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
CONFIGURE_OPTIONS += --enable-python
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS += --disable-python-bindings
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
# Needed for "gmake test" to work successfully.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
# If SHELLOPTS is exported (as it is by the userland makefiles),
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
# then all shell options get exported to child invocations of bash,
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
# which results in test failures due to nounset and xtrace being
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
# set unexpectedly, and errors such as "$1: unbound variable" and
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
# diffs failing due to script tracing in output files.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
unexport SHELLOPTS
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
COMPONENT_TEST_TRANSFORMS += \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    86
	'-e "s|^.*$(CC).*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
	'-e "s|^.*source=.*libtool=no.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
	'-e "s|^.*DEPDIR=.deps.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
	'-e "s|^make.*: Leaving directory.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
	'-e "s|^make.*: Entering directory.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
	'-e "s|^make.*: Nothing to be.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
	'-e "s|^.*warning:.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    93
	'-e "s|^.*s up to date.*$$|XXX_REMOVE_XXX|g" ' \
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    94
	'-e "/^XXX_REMOVE_XXX$$/d" '
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    96
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    97
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
# Required for man pages.
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   101
REQUIRED_PACKAGES += developer/documentation-tool/xmlto
218234c0062c PSARC 2015/316 The Yasm Modular Assembler Project
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   102
REQUIRED_PACKAGES += system/library