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]
21 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
26 COMPONENT_BUILD_ENV
+= JAVA_HOME
="$(JAVA_HOME)"
27 # build the configured source
28 $(BUILD_DIR
)/%/.built
: $(SOURCE_DIR
)/.prep
29 $(RM
) -r
$(@D
) ; $(MKDIR
) $(@D
)
30 $(CLONEY
) $(SOURCE_DIR
) $(@D
)
31 $(COMPONENT_PRE_BUILD_ACTION
)
32 (cd
$(@D
) ; $(ENV
) $(COMPONENT_BUILD_ENV
) \
33 $(ANT
) $(COMPONENT_BUILD_ARGS
) $(COMPONENT_BUILD_TARGETS
))
34 $(COMPONENT_POST_BUILD_ACTION
)
35 ifeq ($(strip $(PARFAIT_BUILD
)),yes
)
40 COMPONENT_INSTALL_ENV
+= JAVA_HOME
="$(JAVA_HOME)"
41 # install the built source into a prototype area
42 $(BUILD_DIR
)/%/.installed
: $(BUILD_DIR
)/%/.built
43 $(COMPONENT_PRE_INSTALL_ACTION
)
44 (cd
$(@D
) ; $(ENV
) $(COMPONENT_INSTALL_ENV
) \
45 $(ANT
) $(COMPONENT_INSTALL_ARGS
) $(COMPONENT_INSTALL_TARGETS
))
46 $(COMPONENT_POST_INSTALL_ACTION
)
49 COMPONENT_TEST_ENV_CMD
= $(ENV
)
50 COMPONENT_TEST_ENV
+= JAVA_HOME
="$(JAVA_HOME)"
51 COMPONENT_TEST_CMD
= $(ANT
)
53 # test the built source
54 $(BUILD_DIR
)/%/.tested-and-compared
: $(BUILD_DIR
)/%/.built
55 $(COMPONENT_PRE_TEST_ACTION
)
56 -(cd
$(COMPONENT_TEST_DIR
) ; \
57 $(COMPONENT_TEST_ENV_CMD
) $(COMPONENT_TEST_ENV
) \
58 $(COMPONENT_TEST_CMD
) \
59 $(COMPONENT_TEST_ARGS
) $(COMPONENT_TEST_TARGETS
)) \
60 &> $(COMPONENT_TEST_OUTPUT
)
61 $(COMPONENT_POST_TEST_ACTION
)
62 $(COMPONENT_TEST_CREATE_TRANSFORMS
)
63 $(COMPONENT_TEST_PERFORM_TRANSFORM
)
64 $(COMPONENT_TEST_COMPARE
)
65 $(COMPONENT_TEST_CLEANUP
)
68 $(BUILD_DIR
)/%/.tested
: $(BUILD_DIR
)/%/.built
69 $(COMPONENT_PRE_TEST_ACTION
)
70 (cd
$(COMPONENT_TEST_DIR
) ; \
71 $(COMPONENT_TEST_ENV_CMD
) $(COMPONENT_TEST_ENV
) \
72 $(COMPONENT_TEST_CMD
) \
73 $(COMPONENT_TEST_ARGS
) $(COMPONENT_TEST_TARGETS
))
74 $(COMPONENT_POST_TEST_ACTION
)
75 $(COMPONENT_TEST_CLEANUP
)
78 ifeq ($(strip $(PARFAIT_BUILD
)),yes
)
82 $(MAKE
) PARFAIT_BUILD
=yes parfait
86 $(RM
) -r
$(SOURCE_DIR
) $(BUILD_DIR
)