components/python/python27/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Mon, 05 Dec 2011 11:48:52 -0800
changeset 609 775168282b2f
parent 578 4f51372decaf
child 634 bd9c94f9f6e0
permissions -rw-r--r--
7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
include ../../../make-rules/shared-macros.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		Python
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_VERSION=	2.7.1
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 578
diff changeset
    30
COMPONENT_PROJECT_URL=	http://python.org/
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	sha1:fbe1894322ff91b80726e269c97454f4129fc2a3
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 578
diff changeset
    34
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
include $(WS_TOP)/make-rules/prep.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
include $(WS_TOP)/make-rules/configure.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
include $(WS_TOP)/make-rules/ips.mk
578
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    39
include $(WS_TOP)/make-rules/lint-libraries.mk
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
# We patch auto* files, so regenerate headers and configure
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
COMPONENT_PREP_ACTION = \
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
	(cd $(@D) ; autoheader ; autoconf)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    44
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
# to find the ncurses headers
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
CPPFLAGS +=	-I/usr/include/ncurses
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
# libffi for _ctypes
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
CPPFLAGS +=	$(shell pkg-config --cflags-only-I libffi)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
# because python links with $(CC) ... $(LDFLAGS) ...
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
LDFLAGS =	$(CC_BITS) $(CC_PIC)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
# build pic
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
CFLAGS +=	$(CC_PIC)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
# add /usr/gnu/lib to the library search/run path
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    58
LDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    59
LDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    60
LDFLAGS += $(LDFLAGS.$(BITS))
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    61
578
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    62
# Python puts its header files in a special place.
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    63
LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    64
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    65
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
CONFIGURE_OPTIONS  +=		--enable-shared
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
CONFIGURE_OPTIONS  +=		--with-system-expat
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
CONFIGURE_OPTIONS  +=		--with-system-ffi
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    69
CONFIGURE_OPTIONS  +=		--without-gcc
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    70
CONFIGURE_OPTIONS  +=		--enable-ipv6
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
CONFIGURE_OPTIONS  +=		ac_cv_opt_olimit_ok=no
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    72
CONFIGURE_OPTIONS  +=		ac_cv_olimit_ok=no
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    73
CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    74
CONFIGURE_OPTIONS  +=		BASECFLAGS="$(CFLAGS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    75
CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    76
CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    77
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    78
COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    79
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    80
# patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    81
# generate a pyconfig.h that is both 32 and 64 bit compatible.  We add this
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    82
# back to the environment so that configure can still work.  configure.in and
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    83
# pyconfig.h.in should probably be rewhacked to do this more cleanly in the
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    84
# future.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    85
CONFIGURE_OPTIONS.32  +=	ac_cv_sizeof_long=4
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    86
CONFIGURE_OPTIONS.64  +=	ac_cv_sizeof_long=8
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    87
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    88
# 64 bit shared objects need to go in a 64-bit directory
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
# common targets
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
build:		$(BUILD_32_and_64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    93
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    94
$(INSTALL_32):	$(INSTALL_64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    95
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
install:	$(INSTALL_32_and_64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    97
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
COMPONENT_TEST_TARGETS = test
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   100
test:	$(TEST_32_and_64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   104
include $(WS_TOP)/make-rules/depend.mk