16 # fields enclosed by brackets "[]" replaced with your own identifying |
16 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
21 # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. |
22 # |
22 # |
23 |
23 |
24 $(BUILD_DIR)/%-2.6/.built: PYTHON_VERSION=2.6 |
24 $(BUILD_DIR)/%-2.6/.built: PYTHON_VERSION=2.6 |
|
25 $(BUILD_DIR)/%-2.7/.built: PYTHON_VERSION=2.7 |
25 $(BUILD_DIR)/$(MACH32)-%/.built: BITS=32 |
26 $(BUILD_DIR)/$(MACH32)-%/.built: BITS=32 |
26 $(BUILD_DIR)/$(MACH64)-%/.built: BITS=64 |
27 $(BUILD_DIR)/$(MACH64)-%/.built: BITS=64 |
27 |
28 |
28 $(BUILD_DIR)/%-2.6/.installed: PYTHON_VERSION=2.6 |
29 $(BUILD_DIR)/%-2.6/.installed: PYTHON_VERSION=2.6 |
|
30 $(BUILD_DIR)/%-2.7/.installed: PYTHON_VERSION=2.7 |
29 $(BUILD_DIR)/$(MACH32)-%/.installed: BITS=32 |
31 $(BUILD_DIR)/$(MACH32)-%/.installed: BITS=32 |
30 $(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64 |
32 $(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64 |
31 |
33 |
32 BUILD_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.built) |
34 BUILD_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.built) |
33 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
35 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
35 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed) |
37 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed) |
36 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed) |
38 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed) |
37 |
39 |
38 PYTHON_ENV = CC="$(CC)" |
40 PYTHON_ENV = CC="$(CC)" |
39 PYTHON_ENV += CFLAGS="$(CFLAGS)" |
41 PYTHON_ENV += CFLAGS="$(CFLAGS)" |
|
42 |
|
43 # if we are building python 2.7 support, build it and install it first |
|
44 # so that python 2.6 is installed last and is the canonical version. |
|
45 # when we switch to 2.7 as the default, it should go last. |
|
46 ifneq ($(findstring 2.7,$(PYTHON_VERSIONS)),) |
|
47 $(BUILD_DIR)/%-2.6/.build: $(BUILD_DIR)/%-2.7/.build |
|
48 $(BUILD_DIR)/%-2.6/.installed: $(BUILD_DIR)/%-2.7/.installed |
|
49 endif |
40 |
50 |
41 # build the configured source |
51 # build the configured source |
42 $(BUILD_DIR)/%/.built: $(SOURCE_DIR)/.prep |
52 $(BUILD_DIR)/%/.built: $(SOURCE_DIR)/.prep |
43 $(RM) -r $(@D) ; $(MKDIR) $(@D) |
53 $(RM) -r $(@D) ; $(MKDIR) $(@D) |
44 $(COMPONENT_PRE_BUILD_ACTION) |
54 $(COMPONENT_PRE_BUILD_ACTION) |
49 $(TOUCH) $@ |
59 $(TOUCH) $@ |
50 |
60 |
51 |
61 |
52 COMPONENT_INSTALL_ARGS += --root $(PROTO_DIR) |
62 COMPONENT_INSTALL_ARGS += --root $(PROTO_DIR) |
53 COMPONENT_INSTALL_ARGS += --install-lib=$(PYTHON_LIB) |
63 COMPONENT_INSTALL_ARGS += --install-lib=$(PYTHON_LIB) |
|
64 COMPONENT_INSTALL_ARGS += --install-purelib=$(PYTHON_LIB) |
|
65 COMPONENT_INSTALL_ARGS += --install-platlib=$(PYTHON_LIB) |
|
66 COMPONENT_INSTALL_ARGS += --install-data=$(PYTHON_DATA) |
|
67 COMPONENT_INSTALL_ARGS += --force |
54 |
68 |
55 # install the built source into a prototype area |
69 # install the built source into a prototype area |
56 $(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built |
70 $(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built |
57 $(COMPONENT_PRE_INSTALL_ACTION) |
71 $(COMPONENT_PRE_INSTALL_ACTION) |
58 (cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \ |
72 (cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \ |