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 |
|
4c3dde
|
24 |
# All Perl versions are 32-bit only. |
6bc9bf
|
25 |
|
CM |
26 |
COMMON_PERL_ENV += MAKE=$(GMAKE) |
7999b2
|
27 |
COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH) |
6bc9bf
|
28 |
COMMON_PERL_ENV += LANG="" |
CM |
29 |
COMMON_PERL_ENV += CC="$(CC)" |
|
30 |
COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)" |
|
31 |
|
|
32 |
# Yes. Perl is just scripts, for now, but we need architecture |
|
33 |
# directories so that it populates all architecture prototype |
|
34 |
# directories. |
|
35 |
|
321881
|
36 |
$(BUILD_DIR)/$(MACH32)-5.16/.configured: PERL_VERSION=5.16 |
AP |
37 |
$(BUILD_DIR)/$(MACH32)-5.16/.configured: BITS=32 |
9581d1
|
38 |
$(BUILD_DIR)/$(MACH64)-5.16/.configured: PERL_VERSION=5.16 |
CM |
39 |
$(BUILD_DIR)/$(MACH64)-5.16/.configured: BITS=64 |
4c3dde
|
40 |
$(BUILD_DIR)/$(MACH32)-5.22/.configured: PERL_VERSION=5.22 |
AP |
41 |
$(BUILD_DIR)/$(MACH32)-5.22/.configured: BITS=32 |
|
42 |
$(BUILD_DIR)/$(MACH64)-5.22/.configured: PERL_VERSION=5.22 |
|
43 |
$(BUILD_DIR)/$(MACH64)-5.22/.configured: BITS=64 |
6bc9bf
|
44 |
|
8d70f8
|
45 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested: PERL_VERSION=5.16 |
RB |
46 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested: BITS=32 |
4c3dde
|
47 |
$(BUILD_DIR)/$(MACH32)-5.22/.tested: PERL_VERSION=5.22 |
AP |
48 |
$(BUILD_DIR)/$(MACH32)-5.22/.tested: BITS=32 |
8d70f8
|
49 |
|
RB |
50 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: PERL_VERSION=5.16 |
|
51 |
$(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: BITS=32 |
4c3dde
|
52 |
$(BUILD_DIR)/$(MACH32)-5.22/.tested-and-compared: BITS=32 |
AP |
53 |
$(BUILD_DIR)/$(MACH32)-5.22/.tested-and-compared: PERL_VERSION=5.22 |
8d70f8
|
54 |
|
cacdb3
|
55 |
PERL_32_BUILD_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.built ) |
AP |
56 |
PERL_32_INSTALL_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.installed ) |
|
57 |
PERL_32_TEST_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.tested ) |
8d70f8
|
58 |
PERL_32_TEST_AND_COMPARE_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.tested-and-compared ) |
cacdb3
|
59 |
|
AP |
60 |
BUILD_32 = $(PERL_32_BUILD_FILES) |
9581d1
|
61 |
BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.16/.built |
6bc9bf
|
62 |
|
cacdb3
|
63 |
INSTALL_32 = $(PERL_32_INSTALL_FILES) |
9581d1
|
64 |
INSTALL_64 = $(BUILD_DIR)/$(MACH64)-5.16/.installed |
6bc9bf
|
65 |
|
CM |
66 |
COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV) |
|
67 |
COMPONENT_CONFIGURE_ENV += PERL="$(PERL)" |
9581d1
|
68 |
$(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep |
6bc9bf
|
69 |
($(RM) -r $(@D) ; $(MKDIR) $(@D)) |
CM |
70 |
$(CLONEY) $(SOURCE_DIR) $(@D) |
|
71 |
$(COMPONENT_PRE_CONFIGURE_ACTION) |
|
72 |
(cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \ |
5227fa
|
73 |
Makefile.PL $(PERL_STUDIO_OVERWRITE) $(CONFIGURE_OPTIONS)) |
6bc9bf
|
74 |
$(COMPONENT_POST_CONFIGURE_ACTION) |
CM |
75 |
$(TOUCH) $@ |
|
76 |
|
|
77 |
|
|
78 |
COMPONENT_BUILD_ENV += $(COMMON_PERL_ENV) |
9581d1
|
79 |
$(BUILD_DIR)/%/.built: $(BUILD_DIR)/%/.configured |
6bc9bf
|
80 |
$(COMPONENT_PRE_BUILD_ACTION) |
CM |
81 |
(cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \ |
c99122
|
82 |
$(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \ |
DH |
83 |
$(COMPONENT_BUILD_TARGETS)) |
6bc9bf
|
84 |
$(COMPONENT_POST_BUILD_ACTION) |
CM |
85 |
$(TOUCH) $@ |
|
86 |
|
|
87 |
|
|
88 |
COMPONENT_INSTALL_ARGS += DESTDIR="$(PROTO_DIR)" |
|
89 |
COMPONENT_INSTALL_TARGETS = install_vendor |
|
90 |
COMPONENT_INSTALL_ENV += $(COMMON_PERL_ENV) |
9581d1
|
91 |
$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built |
6bc9bf
|
92 |
$(COMPONENT_PRE_INSTALL_ACTION) |
CM |
93 |
(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \ |
|
94 |
$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS)) |
|
95 |
$(COMPONENT_POST_INSTALL_ACTION) |
|
96 |
$(TOUCH) $@ |
|
97 |
|
8d70f8
|
98 |
# Define bit specific and Perl version specific filenames. |
RB |
99 |
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PERL_VERSION)-$(BITS).master |
|
100 |
COMPONENT_TEST_OUTPUT = $(COMPONENT_TEST_RESULTS_DIR)/test-$(PERL_VERSION)-$(BITS)-results |
|
101 |
COMPONENT_TEST_DIFFS = $(COMPONENT_TEST_RESULTS_DIR)/test-$(PERL_VERSION)-$(BITS)-diffs |
|
102 |
COMPONENT_TEST_SNAPSHOT = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PERL_VERSION)-$(BITS).snapshot |
|
103 |
COMPONENT_TEST_TRANSFORM_CMD = $(COMPONENT_TEST_RESULTS_DIR)/transform-$(PERL_VERSION)-$(BITS)-results |
6bc9bf
|
104 |
|
CM |
105 |
COMPONENT_TEST_TARGETS = check |
|
106 |
COMPONENT_TEST_ENV += $(COMMON_PERL_ENV) |
8d70f8
|
107 |
|
RB |
108 |
# determine the type of tests we want to run. |
|
109 |
ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),) |
|
110 |
TEST_32 = $(PERL_32_TEST_FILES) |
|
111 |
else |
|
112 |
TEST_32 = $(PERL_32_TEST_AND_COMPARE_FILES) |
7999b2
|
113 |
endif |
8d70f8
|
114 |
|
RB |
115 |
# test the built source |
|
116 |
$(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built |
|
117 |
$(COMPONENT_PRE_TEST_ACTION) |
|
118 |
-(cd $(COMPONENT_TEST_DIR) ; \ |
|
119 |
$(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \ |
|
120 |
$(COMPONENT_TEST_CMD) \ |
|
121 |
$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \ |
|
122 |
&> $(COMPONENT_TEST_OUTPUT) |
|
123 |
$(COMPONENT_POST_TEST_ACTION) |
|
124 |
$(COMPONENT_TEST_CREATE_TRANSFORMS) |
|
125 |
$(COMPONENT_TEST_PERFORM_TRANSFORM) |
|
126 |
$(COMPONENT_TEST_COMPARE) |
|
127 |
$(COMPONENT_TEST_CLEANUP) |
6bc9bf
|
128 |
$(TOUCH) $@ |
CM |
129 |
|
8d70f8
|
130 |
$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built |
RB |
131 |
$(COMPONENT_PRE_TEST_ACTION) |
|
132 |
(cd $(COMPONENT_TEST_DIR) ; \ |
|
133 |
$(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \ |
|
134 |
$(COMPONENT_TEST_CMD) \ |
|
135 |
$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) |
|
136 |
$(COMPONENT_POST_TEST_ACTION) |
|
137 |
$(COMPONENT_TEST_CLEANUP) |
|
138 |
$(TOUCH) $@ |
|
139 |
|
|
140 |
ifeq ($(strip $(PARFAIT_BUILD)),yes) |
|
141 |
parfait: build |
|
142 |
else |
|
143 |
parfait: |
|
144 |
$(MAKE) PARFAIT_BUILD=yes parfait |
|
145 |
endif |
|
146 |
|
6bc9bf
|
147 |
clean:: |
CM |
148 |
$(RM) -r $(BUILD_DIR) $(PROTO_DIR) |