Makefile revision 3510
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome#
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# CDDL HEADER START
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome#
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# The contents of this file are subject to the terms of the
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# Common Development and Distribution License (the "License").
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# You may not use this file except in compliance with the License.
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome#
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# or http://www.opensolaris.org/os/licensing.
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# See the License for the specific language governing permissions
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# and limitations under the License.
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome#
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# When distributing Covered Code, include this CDDL HEADER in each
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# If applicable, add the following below this CDDL HEADER, with the
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# fields enclosed by brackets "[]" replaced with your own identifying
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome# information: Portions Copyright [yyyy] [name of copyright owner]
5ffb0c9b03b5149ff4f5821a62be4a52408ada2aToomas Soome#
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# CDDL HEADER END
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash#
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash#
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash#
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinclude ../../make-rules/shared-macros.mk
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_NAME= libxml2
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_VERSION= 2.9.2
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_PROJECT_URL= http://xmlsoft.org/
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE_HASH= \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash sha256:5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE_URL= ftp://xmlsoft.org/libxml2/$(COMPONENT_ARCHIVE)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_BUGDB= library/libxml
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# W3C XML Conformance Test Suites
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE_1= xmlts20080827.tar.gz
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE_HASH_1= \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash sha256:96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_ARCHIVE_URL_1= http://www.w3.org/XML/Test/$(COMPONENT_ARCHIVE_1)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashTPNO= 19552
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinclude ../../make-rules/prep.mk
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinclude ../../make-rules/configure.mk
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinclude ../../make-rules/ips.mk
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinclude ../../make-rules/lint-libraries.mk
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCFLAGS += $(CPP_LARGEFILES)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashLDFLAGS += $(LD_Z_DEFS) $(LD_Z_TEXT) -lpthread
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --disable-static
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --with-pic
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --with-threads
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --with-python=$(PYTHON.$(BITS))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --with-python-install-dir=$(PYTHON_VENDOR_PACKAGES)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Cannot link to lzma since it's not in /lib.
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += --without-lzma
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_PREP_ACTION += (cd $(@D) ; cp ../mapfile libxml2.syms ; autoreconf -if)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# After we have configured, make a copy of the python bits so we
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# can build and test separate python 2.7 support.
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_POST_CONFIGURE_ACTION = (cd $(@D) ; cp -rp python python2.7 ; \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(GSED) -i -e 's/2[.]6/2.7/g' `find python2.7 -name Makefile`)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# After we have built/installed libxml2, build/install the python
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# support for python 2.7
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_POST_INSTALL_ACTION = \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# It's nice to test also python 2.7 module.
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashCOMPONENT_POST_TEST_ACTION = \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash (cd $(@D)/python2.7 ; $(GMAKE) $(COMPONENT_TEST_ARGS) test)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# We have patched our 64 bit python so it will search for modules only in
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# '64/' directories. Now we need to provide one. Otherwise python will
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# end up using libxml2mod.so installed on system.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore$(BUILD_DIR)/$(MACH64)/.tested: COMPONENT_PRE_TEST_ACTION = ( \
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov $(MKDIR) $(@D)/python/.libs/64 $(@D)/python2.7/.libs/64; \
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov $(SYMLINK) ../libxml2mod.so $(@D)/python/.libs/64/libxml2mod.so; \
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore $(SYMLINK) ../libxml2mod.so $(@D)/python2.7/.libs/64/libxml2mod.so);
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'AmoreCOMPONENT_PRE_TEST_ACTION += \
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore (cd $(@D) ; gtar xf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1));
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# common targets
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amorebuild: $(BUILD_32_and_64)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amoreinstall: $(INSTALL_32_and_64)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore $(PYTHON.2.6.32) -m compileall $(PROTO_DIR)/usr/lib/python2.6/vendor-packages
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore $(PYTHON.2.7.32) -m compileall $(PROTO_DIR)/usr/lib/python2.7/vendor-packages
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amoretest: $(TEST_32_and_64)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'AmoreBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amoreinclude ../../make-rules/depend.mk
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore