commit | author | age
|
6bc9bf
|
1 |
# |
CM |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
702558
|
21 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
6bc9bf
|
22 |
# |
CM |
23 |
|
9581d1
|
24 |
# Perl 5.12 and older are 32-bit only. |
CM |
25 |
# Perl 5.16 and newer are 64-bit only. |
6bc9bf
|
26 |
|
CM |
27 |
COMMON_PERL_ENV += MAKE=$(GMAKE) |
7999b2
|
28 |
COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH) |
6bc9bf
|
29 |
COMMON_PERL_ENV += LANG="" |
CM |
30 |
COMMON_PERL_ENV += CC="$(CC)" |
|
31 |
COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)" |
|
32 |
|
|
33 |
# Yes. Perl is just scripts, for now, but we need architecture |
|
34 |
# directories so that it populates all architecture prototype |
|
35 |
# directories. |
|
36 |
|
321881
|
37 |
$(BUILD_DIR)/$(MACH32)-5.16/.configured: PERL_VERSION=5.16 |
AP |
38 |
$(BUILD_DIR)/$(MACH32)-5.16/.configured: BITS=32 |
cacdb3
|
39 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.configured: PERL_VERSION=5.10.0 |
AP |
40 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.configured: BITS=32 |
9581d1
|
41 |
$(BUILD_DIR)/$(MACH64)-5.16/.configured: PERL_VERSION=5.16 |
CM |
42 |
$(BUILD_DIR)/$(MACH64)-5.16/.configured: BITS=64 |
6bc9bf
|
43 |
|
8d70f8
|
44 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.tested: PERL_VERSION=5.10.0 |
RB |
45 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.tested: BITS=32 |
|
46 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested: PERL_VERSION=5.16 |
|
47 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested: BITS=32 |
|
48 |
|
|
49 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.tested-and-compared: PERL_VERSION=5.10.0 |
|
50 |
$(BUILD_DIR)/$(MACH32)-5.10.0/.tested-and-compared: BITS=32 |
|
51 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: PERL_VERSION=5.16 |
|
52 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: BITS=32 |
|
53 |
|
cacdb3
|
54 |
PERL_32_BUILD_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.built ) |
AP |
55 |
PERL_32_INSTALL_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.installed ) |
|
56 |
PERL_32_TEST_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.tested ) |
8d70f8
|
57 |
PERL_32_TEST_AND_COMPARE_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.tested-and-compared ) |
cacdb3
|
58 |
|
AP |
59 |
BUILD_32 = $(PERL_32_BUILD_FILES) |
9581d1
|
60 |
BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.16/.built |
6bc9bf
|
61 |
|
cacdb3
|
62 |
INSTALL_32 = $(PERL_32_INSTALL_FILES) |
9581d1
|
63 |
INSTALL_64 = $(BUILD_DIR)/$(MACH64)-5.16/.installed |
6bc9bf
|
64 |
|
CM |
65 |
COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV) |
|
66 |
COMPONENT_CONFIGURE_ENV += PERL="$(PERL)" |
9581d1
|
67 |
$(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep |
6bc9bf
|
68 |
($(RM) -r $(@D) ; $(MKDIR) $(@D)) |
CM |
69 |
$(CLONEY) $(SOURCE_DIR) $(@D) |
|
70 |
$(COMPONENT_PRE_CONFIGURE_ACTION) |
|
71 |
(cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \ |
5227fa
|
72 |
Makefile.PL $(PERL_STUDIO_OVERWRITE) $(CONFIGURE_OPTIONS)) |
6bc9bf
|
73 |
$(COMPONENT_POST_CONFIGURE_ACTION) |
CM |
74 |
$(TOUCH) $@ |
|
75 |
|
|
76 |
|
|
77 |
COMPONENT_BUILD_ENV += $(COMMON_PERL_ENV) |
9581d1
|
78 |
$(BUILD_DIR)/%/.built: $(BUILD_DIR)/%/.configured |
6bc9bf
|
79 |
$(COMPONENT_PRE_BUILD_ACTION) |
CM |
80 |
(cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \ |
c99122
|
81 |
$(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \ |
DH |
82 |
$(COMPONENT_BUILD_TARGETS)) |
6bc9bf
|
83 |
$(COMPONENT_POST_BUILD_ACTION) |
CM |
84 |
$(TOUCH) $@ |
|
85 |
|
|
86 |
|
|
87 |
COMPONENT_INSTALL_ARGS += DESTDIR="$(PROTO_DIR)" |
|
88 |
COMPONENT_INSTALL_TARGETS = install_vendor |
|
89 |
COMPONENT_INSTALL_ENV += $(COMMON_PERL_ENV) |
9581d1
|
90 |
$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built |
6bc9bf
|
91 |
$(COMPONENT_PRE_INSTALL_ACTION) |
CM |
92 |
(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \ |
|
93 |
$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS)) |
|
94 |
$(COMPONENT_POST_INSTALL_ACTION) |
|
95 |
$(TOUCH) $@ |
|
96 |
|
8d70f8
|
97 |
# Define bit specific and Perl version specific filenames. |
RB |
98 |
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PERL_VERSION)-$(BITS).master |
|
99 |
COMPONENT_TEST_OUTPUT = $(COMPONENT_TEST_RESULTS_DIR)/test-$(PERL_VERSION)-$(BITS)-results |
|
100 |
COMPONENT_TEST_DIFFS = $(COMPONENT_TEST_RESULTS_DIR)/test-$(PERL_VERSION)-$(BITS)-diffs |
|
101 |
COMPONENT_TEST_SNAPSHOT = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PERL_VERSION)-$(BITS).snapshot |
|
102 |
COMPONENT_TEST_TRANSFORM_CMD = $(COMPONENT_TEST_RESULTS_DIR)/transform-$(PERL_VERSION)-$(BITS)-results |
6bc9bf
|
103 |
|
CM |
104 |
COMPONENT_TEST_TARGETS = check |
|
105 |
COMPONENT_TEST_ENV += $(COMMON_PERL_ENV) |
8d70f8
|
106 |
|
RB |
107 |
# determine the type of tests we want to run. |
|
108 |
ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
|
109 |
TEST_32 = $(PERL_32_TEST_FILES) |
|
110 |
else |
|
111 |
TEST_32 = $(PERL_32_TEST_AND_COMPARE_FILES) |
7999b2
|
112 |
endif |
8d70f8
|
113 |
|
RB |
114 |
# test the built source |
|
115 |
$(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built |
|
116 |
$(COMPONENT_PRE_TEST_ACTION) |
|
117 |
-(cd $(COMPONENT_TEST_DIR) ; \ |
|
118 |
$(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \ |
|
119 |
$(COMPONENT_TEST_CMD) \ |
|
120 |
$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \ |
|
121 |
&> $(COMPONENT_TEST_OUTPUT) |
|
122 |
$(COMPONENT_POST_TEST_ACTION) |
|
123 |
$(COMPONENT_TEST_CREATE_TRANSFORMS) |
|
124 |
$(COMPONENT_TEST_PERFORM_TRANSFORM) |
|
125 |
$(COMPONENT_TEST_COMPARE) |
|
126 |
$(COMPONENT_TEST_CLEANUP) |
6bc9bf
|
127 |
$(TOUCH) $@ |
CM |
128 |
|
8d70f8
|
129 |
$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built |
RB |
130 |
$(COMPONENT_PRE_TEST_ACTION) |
|
131 |
(cd $(COMPONENT_TEST_DIR) ; \ |
|
132 |
$(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \ |
|
133 |
$(COMPONENT_TEST_CMD) \ |
|
134 |
$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) |
|
135 |
$(COMPONENT_POST_TEST_ACTION) |
|
136 |
$(COMPONENT_TEST_CLEANUP) |
|
137 |
$(TOUCH) $@ |
|
138 |
|
|
139 |
ifeq ($(strip $(PARFAIT_BUILD)),yes) |
|
140 |
parfait: build |
|
141 |
else |
|
142 |
parfait: |
|
143 |
$(MAKE) PARFAIT_BUILD=yes parfait |
|
144 |
endif |
|
145 |
|
6bc9bf
|
146 |
clean:: |
CM |
147 |
$(RM) -r $(BUILD_DIR) $(PROTO_DIR) |