Add livereload 2.4.1
[unleashed-userland.git] / make-rules / makemaker.mk
blobf22f5f753c919977d242a3a3b791bb5b741ff41a
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
24 # All Perl versions are 32-bit only.
26 COMMON_PERL_ENV += MAKE=$(GMAKE)
27 COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH)
28 COMMON_PERL_ENV += LANG=""
29 COMMON_PERL_ENV += CC="$(CC)"
30 COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)"
32 # Yes. Perl is just scripts, for now, but we need architecture
33 # directories so that it populates all architecture prototype
34 # directories.
36 $(BUILD_DIR)/$(MACH32)-5.16/.configured: PERL_VERSION=5.16
37 $(BUILD_DIR)/$(MACH32)-5.16/.configured: BITS=32
38 $(BUILD_DIR)/$(MACH64)-5.16/.configured: PERL_VERSION=5.16
39 $(BUILD_DIR)/$(MACH64)-5.16/.configured: BITS=64
40 $(BUILD_DIR)/$(MACH32)-5.22/.configured: PERL_VERSION=5.22
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
45 $(BUILD_DIR)/$(MACH32)-5.16/.tested: PERL_VERSION=5.16
46 $(BUILD_DIR)/$(MACH32)-5.16/.tested: BITS=32
47 $(BUILD_DIR)/$(MACH32)-5.22/.tested: PERL_VERSION=5.22
48 $(BUILD_DIR)/$(MACH32)-5.22/.tested: BITS=32
50 $(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: PERL_VERSION=5.16
51 $(BUILD_DIR)/$(MACH32)-5.16/.tested-and-compared: BITS=32
52 $(BUILD_DIR)/$(MACH32)-5.22/.tested-and-compared: BITS=32
53 $(BUILD_DIR)/$(MACH32)-5.22/.tested-and-compared: PERL_VERSION=5.22
55 PERL_32_BUILD_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.built )
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 )
58 PERL_32_TEST_AND_COMPARE_FILES:=$(foreach ver, $(PERL_VERSIONS), $(BUILD_DIR)/$(MACH32)-$(ver)/.tested-and-compared )
60 BUILD_32 = $(PERL_32_BUILD_FILES)
61 BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.16/.built
63 INSTALL_32 = $(PERL_32_INSTALL_FILES)
64 INSTALL_64 = $(BUILD_DIR)/$(MACH64)-5.16/.installed
66 COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV)
67 COMPONENT_CONFIGURE_ENV += PERL="$(PERL)"
68 $(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep
69 ($(RM) -r $(@D) ; $(MKDIR) $(@D))
70 $(CLONEY) $(SOURCE_DIR) $(@D)
71 $(COMPONENT_PRE_CONFIGURE_ACTION)
72 (cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
73 Makefile.PL $(PERL_STUDIO_OVERWRITE) $(CONFIGURE_OPTIONS))
74 $(COMPONENT_POST_CONFIGURE_ACTION)
75 $(TOUCH) $@
78 COMPONENT_BUILD_ENV += $(COMMON_PERL_ENV)
79 $(BUILD_DIR)/%/.built: $(BUILD_DIR)/%/.configured
80 $(COMPONENT_PRE_BUILD_ACTION)
81 (cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
82 $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \
83 $(COMPONENT_BUILD_TARGETS))
84 $(COMPONENT_POST_BUILD_ACTION)
85 $(TOUCH) $@
88 COMPONENT_INSTALL_ARGS += DESTDIR="$(PROTO_DIR)"
89 COMPONENT_INSTALL_TARGETS = install_vendor
90 COMPONENT_INSTALL_ENV += $(COMMON_PERL_ENV)
91 $(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
92 $(COMPONENT_PRE_INSTALL_ACTION)
93 (cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
94 $(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
95 $(COMPONENT_POST_INSTALL_ACTION)
96 $(TOUCH) $@
98 # Define bit specific and Perl version specific filenames.
99 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PERL_VERSION)-$(BITS).master
100 COMPONENT_TEST_OUTPUT = $(COMPONENT_TEST_BUILD_DIR)/test-$(PERL_VERSION)-$(BITS)-results
101 COMPONENT_TEST_DIFFS = $(COMPONENT_TEST_BUILD_DIR)/test-$(PERL_VERSION)-$(BITS)-diffs
102 COMPONENT_TEST_SNAPSHOT = $(COMPONENT_TEST_BUILD_DIR)/results-$(PERL_VERSION)-$(BITS).snapshot
103 COMPONENT_TEST_TRANSFORM_CMD = $(COMPONENT_TEST_BUILD_DIR)/transform-$(PERL_VERSION)-$(BITS)-results
105 COMPONENT_TEST_TARGETS = check
106 COMPONENT_TEST_ENV += $(COMMON_PERL_ENV)
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)
113 endif
115 # test the built source
116 $(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built
117 $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
118 $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
119 $(COMPONENT_PRE_TEST_ACTION)
120 -(cd $(COMPONENT_TEST_DIR) ; \
121 $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
122 $(COMPONENT_TEST_CMD) \
123 $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
124 &> $(COMPONENT_TEST_OUTPUT)
125 $(COMPONENT_POST_TEST_ACTION)
126 $(COMPONENT_TEST_CREATE_TRANSFORMS)
127 $(COMPONENT_TEST_PERFORM_TRANSFORM)
128 $(COMPONENT_TEST_COMPARE)
129 $(COMPONENT_TEST_CLEANUP)
130 $(TOUCH) $@
132 $(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built
133 $(COMPONENT_PRE_TEST_ACTION)
134 (cd $(COMPONENT_TEST_DIR) ; \
135 $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
136 $(COMPONENT_TEST_CMD) \
137 $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
138 $(COMPONENT_POST_TEST_ACTION)
139 $(COMPONENT_TEST_CLEANUP)
140 $(TOUCH) $@
142 ifeq ($(strip $(PARFAIT_BUILD)),yes)
143 parfait: build
144 else
145 parfait:
146 $(MAKE) PARFAIT_BUILD=yes parfait
147 endif
149 clean::
150 $(RM) -r $(BUILD_DIR) $(PROTO_DIR)