21 |
21 |
22 # |
22 # |
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
24 # |
24 # |
25 |
25 |
26 # Perl 5.12 and older are 32-bit only. |
26 # makemaker.mk is used to build, install, test perl modules for |
27 # Perl 5.20 and newer are 64-bit only. |
27 # each version of perl. |
|
28 # Packaging these multiple versions is still handled by ips.mk. |
|
29 # Look under perl_modules for examples of usage. |
28 |
30 |
29 COMMON_PERL_ENV += MAKE=$(GMAKE) |
31 # Multiple versions of perl processing is achieved by listing targets |
30 COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH) |
32 # for each version and adding BUILD_64/INSTALL_64 targets below. |
31 COMMON_PERL_ENV += LANG="" |
33 # Example: |
32 COMMON_PERL_ENV += CC="$(CC)" |
34 # $(BUILD_DIR)/$(MACH64)-5.24/.configured: PERL_VERSION=5.24 |
33 COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)" |
35 # $(BUILD_DIR)/$(MACH64)-5.24/.configured: BITS=64 |
|
36 # BUILD_64 += $(BUILD_DIR)/$(MACH64)-5.24/.built |
|
37 # INSTALL_64 += $(BUILD_DIR)/$(MACH64)-5.24/.installed |
|
38 # TEST_64 += $(BUILD_DIR)/$(MACH64)-5.24/.tested |
|
39 # TEST_64 += $(BUILD_DIR)/$(MACH64)-5.24/.tested-and-compared |
|
40 # and so on. |
|
41 |
|
42 COMMON_PERL_ENV += MAKE=$(GMAKE) |
|
43 COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH) |
|
44 COMMON_PERL_ENV += LANG="" |
|
45 COMMON_PERL_ENV += CC="$(CC)" |
|
46 COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)" |
34 |
47 |
35 # Yes. Perl is just scripts, for now, but we need architecture |
48 # Yes. Perl is just scripts, for now, but we need architecture |
36 # directories so that it populates all architecture prototype |
49 # directories so that it populates all architecture prototype |
37 # directories. |
50 # directories. |
38 |
51 |
39 $(BUILD_DIR)/$(MACH32)-5.12/.configured: PERL_VERSION=5.12 |
52 $(BUILD_DIR)/$(MACH64)-5.22/.configured: PERL_VERSION=5.22 |
40 $(BUILD_DIR)/$(MACH32)-5.12/.configured: BITS=32 |
53 $(BUILD_DIR)/$(MACH64)-5.22/.configured: BITS=64 |
41 $(BUILD_DIR)/$(MACH32)-5.12-mt/.configured: PERL_VERSION=5.12-mt |
|
42 $(BUILD_DIR)/$(MACH32)-5.12-mt/.configured: BITS=32 |
|
43 $(BUILD_DIR)/$(MACH64)-5.20/.configured: PERL_VERSION=5.20 |
|
44 $(BUILD_DIR)/$(MACH64)-5.20/.configured: BITS=64 |
|
45 $(BUILD_DIR)/$(MACH64)-5.22/.configured: PERL_VERSION=5.22 |
|
46 $(BUILD_DIR)/$(MACH64)-5.22/.configured: BITS=64 |
|
47 |
54 |
|
55 $(BUILD_DIR)/$(MACH64)-5.22/.tested: PERL_VERSION=5.22 |
|
56 $(BUILD_DIR)/$(MACH64)-5.22/.tested: BITS=64 |
48 |
57 |
49 $(BUILD_DIR)/$(MACH32)-5.12/.tested: PERL_VERSION=5.12 |
58 $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared: PERL_VERSION=5.22 |
50 $(BUILD_DIR)/$(MACH32)-5.12/.tested: BITS=32 |
59 $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared: BITS=64 |
51 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested: PERL_VERSION=5.12-mt |
|
52 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested: BITS=32 |
|
53 $(BUILD_DIR)/$(MACH64)-5.20/.tested: PERL_VERSION=5.20 |
|
54 $(BUILD_DIR)/$(MACH64)-5.20/.tested: BITS=64 |
|
55 $(BUILD_DIR)/$(MACH64)-5.22/.tested: PERL_VERSION=5.22 |
|
56 $(BUILD_DIR)/$(MACH64)-5.22/.tested: BITS=64 |
|
57 |
60 |
|
61 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested: PERL_VERSION=5.22 |
|
62 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested: BITS=64 |
58 |
63 |
59 $(BUILD_DIR)/$(MACH32)-5.12/.tested-and-compared: PERL_VERSION=5.12 |
64 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared: PERL_VERSION=5.22 |
60 $(BUILD_DIR)/$(MACH32)-5.12/.tested-and-compared: BITS=32 |
65 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared: BITS=64 |
61 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested-and-compared: PERL_VERSION=5.12-mt |
|
62 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested-and-compared: BITS=32 |
|
63 $(BUILD_DIR)/$(MACH64)-5.20/.tested-and-compared: PERL_VERSION=5.20 |
|
64 $(BUILD_DIR)/$(MACH64)-5.20/.tested-and-compared: BITS=64 |
|
65 $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared: PERL_VERSION=5.22 |
|
66 $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared: BITS=64 |
|
67 |
66 |
|
67 BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.22/.built |
68 |
68 |
69 $(BUILD_DIR)/$(MACH32)-5.12/.system-tested: PERL_VERSION=5.12 |
69 INSTALL_64 = $(BUILD_DIR)/$(MACH64)-5.22/.installed |
70 $(BUILD_DIR)/$(MACH32)-5.12/.system-tested: BITS=32 |
|
71 $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested: PERL_VERSION=5.12-mt |
|
72 $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested: BITS=32 |
|
73 $(BUILD_DIR)/$(MACH64)-5.20/.system-tested: PERL_VERSION=5.20 |
|
74 $(BUILD_DIR)/$(MACH64)-5.20/.system-tested: BITS=64 |
|
75 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested: PERL_VERSION=5.22 |
|
76 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested: BITS=64 |
|
77 |
70 |
78 |
71 COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV) |
79 $(BUILD_DIR)/$(MACH32)-5.12/.system-tested-and-compared: PERL_VERSION=5.12 |
72 COMPONENT_CONFIGURE_ENV += PERL="$(PERL)" |
80 $(BUILD_DIR)/$(MACH32)-5.12/.system-tested-and-compared: BITS=32 |
|
81 $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested-and-compared: PERL_VERSION=5.12-mt |
|
82 $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested-and-compared: BITS=32 |
|
83 $(BUILD_DIR)/$(MACH64)-5.20/.system-tested-and-compared: PERL_VERSION=5.20 |
|
84 $(BUILD_DIR)/$(MACH64)-5.20/.system-tested-and-compared: BITS=64 |
|
85 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared: PERL_VERSION=5.22 |
|
86 $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared: BITS=64 |
|
87 |
|
88 |
|
89 BUILD_32 = $(BUILD_DIR)/$(MACH32)-5.12/.built |
|
90 BUILD_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.built |
|
91 BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.20/.built |
|
92 BUILD_64 += $(BUILD_DIR)/$(MACH64)-5.22/.built |
|
93 |
|
94 INSTALL_32 = $(BUILD_DIR)/$(MACH32)-5.12/.installed |
|
95 INSTALL_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.installed |
|
96 INSTALL_64 = $(BUILD_DIR)/$(MACH64)-5.20/.installed |
|
97 INSTALL_64 += $(BUILD_DIR)/$(MACH64)-5.22/.installed |
|
98 |
|
99 COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV) |
|
100 COMPONENT_CONFIGURE_ENV += PERL="$(PERL)" |
|
101 $(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep |
73 $(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep |
102 ($(RM) -r $(@D) ; $(MKDIR) $(@D)) |
74 ($(RM) -r $(@D) ; $(MKDIR) $(@D)) |
103 $(CLONEY) $(SOURCE_DIR) $(@D) |
75 $(CLONEY) $(SOURCE_DIR) $(@D) |
104 $(COMPONENT_PRE_CONFIGURE_ACTION) |
76 $(COMPONENT_PRE_CONFIGURE_ACTION) |
105 (cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \ |
77 (cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \ |
143 COMPONENT_SYSTEM_TEST_TARGETS = check |
115 COMPONENT_SYSTEM_TEST_TARGETS = check |
144 COMPONENT_SYSTEM_TEST_ENV += $(COMMON_PERL_ENV) |
116 COMPONENT_SYSTEM_TEST_ENV += $(COMMON_PERL_ENV) |
145 |
117 |
146 # determine the type of tests we want to run. |
118 # determine the type of tests we want to run. |
147 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
119 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
148 TEST_32 = $(BUILD_DIR)/$(MACH32)-5.12/.tested |
120 TEST_64 = $(BUILD_DIR)/$(MACH64)-5.22/.tested |
149 TEST_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested |
|
150 TEST_64 = $(BUILD_DIR)/$(MACH64)-5.20/.tested |
|
151 TEST_64 += $(BUILD_DIR)/$(MACH64)-5.22/.tested |
|
152 else |
121 else |
153 TEST_32 = $(BUILD_DIR)/$(MACH32)-5.12/.tested-and-compared |
122 TEST_64 = $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared |
154 TEST_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested-and-compared |
|
155 TEST_64 = $(BUILD_DIR)/$(MACH64)-5.20/.tested-and-compared |
|
156 TEST_64 += $(BUILD_DIR)/$(MACH64)-5.22/.tested-and-compared |
|
157 endif |
123 endif |
158 |
124 |
159 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
125 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
160 SYSTEM_TEST_32 = $(BUILD_DIR)/$(MACH32)-5.12/.system-tested |
126 SYSTEM_TEST_64 = $(BUILD_DIR)/$(MACH64)-5.22/.system-tested |
161 SYSTEM_TEST_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested |
|
162 SYSTEM_TEST_64 = $(BUILD_DIR)/$(MACH64)-5.20/.system-tested |
|
163 SYSTEM_TEST_64 += $(BUILD_DIR)/$(MACH64)-5.22/.system-tested |
|
164 else |
127 else |
165 SYSTEM_TEST_32 = $(BUILD_DIR)/$(MACH32)-5.12/.system-tested-and-compared |
128 SYSTEM_TEST_64 = $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared |
166 SYSTEM_TEST_32 += $(BUILD_DIR)/$(MACH32)-5.12-mt/.system-tested-and-compared |
|
167 SYSTEM_TEST_64 = $(BUILD_DIR)/$(MACH64)-5.20/.system-tested-and-compared |
|
168 SYSTEM_TEST_64 += $(BUILD_DIR)/$(MACH64)-5.22/.system-tested-and-compared |
|
169 endif |
129 endif |
170 |
130 |
171 # test the built source |
131 # test the built source |
172 $(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built |
132 $(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built |
173 $(RM) -rf $(COMPONENT_TEST_BUILD_DIR) |
133 $(RM) -rf $(COMPONENT_TEST_BUILD_DIR) |