21 # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. |
21 # Copyright (c) 2010, 2014, 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)/%-2.7/.built: PYTHON_VERSION=2.7 |
|
26 $(BUILD_DIR)/%-3.4/.built: PYTHON_VERSION=3.4 |
26 $(BUILD_DIR)/$(MACH32)-%/.built: BITS=32 |
27 $(BUILD_DIR)/$(MACH32)-%/.built: BITS=32 |
27 $(BUILD_DIR)/$(MACH64)-%/.built: BITS=64 |
28 $(BUILD_DIR)/$(MACH64)-%/.built: BITS=64 |
28 |
29 |
29 $(BUILD_DIR)/%-2.6/.installed: PYTHON_VERSION=2.6 |
30 $(BUILD_DIR)/%-2.6/.installed: PYTHON_VERSION=2.6 |
30 $(BUILD_DIR)/%-2.7/.installed: PYTHON_VERSION=2.7 |
31 $(BUILD_DIR)/%-2.7/.installed: PYTHON_VERSION=2.7 |
|
32 $(BUILD_DIR)/%-3.4/.installed: PYTHON_VERSION=3.4 |
31 $(BUILD_DIR)/$(MACH32)-%/.installed: BITS=32 |
33 $(BUILD_DIR)/$(MACH32)-%/.installed: BITS=32 |
32 $(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64 |
34 $(BUILD_DIR)/$(MACH64)-%/.installed: BITS=64 |
33 |
35 |
34 $(BUILD_DIR)/%-2.6/.tested: PYTHON_VERSION=2.6 |
36 $(BUILD_DIR)/%-2.6/.tested: PYTHON_VERSION=2.6 |
35 $(BUILD_DIR)/%-2.7/.tested: PYTHON_VERSION=2.7 |
37 $(BUILD_DIR)/%-2.7/.tested: PYTHON_VERSION=2.7 |
|
38 $(BUILD_DIR)/%-3.4/.tested: PYTHON_VERSION=3.4 |
36 $(BUILD_DIR)/$(MACH32)-%/.tested: BITS=32 |
39 $(BUILD_DIR)/$(MACH32)-%/.tested: BITS=32 |
37 $(BUILD_DIR)/$(MACH64)-%/.tested: BITS=64 |
40 $(BUILD_DIR)/$(MACH64)-%/.tested: BITS=64 |
38 |
41 |
39 BUILD_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.built) |
42 BUILD_32 = $(PYTHON2_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.built) |
40 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
43 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
41 BUILD_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.built) |
44 BUILD_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.built) |
|
45 ifeq ($(PYTHON_VERSION),3.4) |
|
46 BUILD_32_and_64 = $(BUILD_64) |
|
47 endif |
42 |
48 |
43 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed) |
49 INSTALL_32 = $(PYTHON2_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed) |
44 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed) |
50 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed) |
45 INSTALL_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.installed) |
51 INSTALL_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.installed) |
|
52 ifeq ($(PYTHON_VERSION),3.4) |
|
53 INSTALL_32_and_64 = $(INSTALL_64) |
|
54 endif |
46 |
55 |
47 TEST_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.tested) |
56 TEST_32 = $(PYTHON2_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.tested) |
48 TEST_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.tested) |
57 TEST_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.tested) |
49 TEST_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.tested) |
58 TEST_NO_ARCH = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.tested) |
|
59 ifeq ($(PYTHON_VERSION),3.4) |
|
60 TEST_32_and_64 = $(TEST_64) |
|
61 endif |
50 |
62 |
51 PYTHON_ENV = CC="$(CC)" |
63 PYTHON_ENV = CC="$(CC)" |
52 PYTHON_ENV += CFLAGS="$(CFLAGS)" |
64 PYTHON_ENV += CFLAGS="$(CFLAGS)" |
53 |
65 |
54 COMPONENT_BUILD_ENV += $(PYTHON_ENV) |
66 COMPONENT_BUILD_ENV += $(PYTHON_ENV) |
55 COMPONENT_INSTALL_ENV += $(PYTHON_ENV) |
67 COMPONENT_INSTALL_ENV += $(PYTHON_ENV) |
56 COMPONENT_TEST_ENV += $(PYTHON_ENV) |
68 COMPONENT_TEST_ENV += $(PYTHON_ENV) |
57 |
69 |
58 # if we are building python 2.7 support, build it and install it first |
70 # If we are building Python 2.7 or 3.4 support, build them and install them |
59 # so that python 2.6 is installed last and is the canonical version. |
71 # before Python 2.6, so 2.6 is installed last and is the canonical version. |
60 # when we switch to 2.7 as the default, it should go last. |
72 # When we change the default, the new default should go last. |
61 ifneq ($(findstring 2.7,$(PYTHON_VERSIONS)),) |
73 ifneq ($(findstring 2.7,$(PYTHON_VERSIONS)),) |
62 $(BUILD_DIR)/%-2.6/.build: $(BUILD_DIR)/%-2.7/.build |
74 $(BUILD_DIR)/%-2.6/.built: $(BUILD_DIR)/%-2.7/.built |
63 $(BUILD_DIR)/%-2.6/.installed: $(BUILD_DIR)/%-2.7/.installed |
75 $(BUILD_DIR)/%-2.6/.installed: $(BUILD_DIR)/%-2.7/.installed |
|
76 endif |
|
77 ifneq ($(findstring 3.4,$(PYTHON_VERSIONS)),) |
|
78 $(BUILD_DIR)/%-2.6/.built: $(BUILD_DIR)/%-3.4/.built |
|
79 $(BUILD_DIR)/%-2.6/.installed: $(BUILD_DIR)/%-3.4/.installed |
64 endif |
80 endif |
65 |
81 |
66 # Create a distutils config file specific to the combination of build |
82 # Create a distutils config file specific to the combination of build |
67 # characteristics (bittedness x Python version), and put it in its own |
83 # characteristics (bittedness x Python version), and put it in its own |
68 # directory. We can set $HOME to point distutils at it later, allowing |
84 # directory. We can set $HOME to point distutils at it later, allowing |