Add c++11 support (gcc10/gcc11) to p7zip
[oi-userland.git] / make-rules / ant.mk
blob77bdcc77bb4819cca32fec3df44a62780a921bf7
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 ANT=/usr/bin/ant
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 $(ENV) $(CLONEY_ARGS) $(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 $(TOUCH) $@
37 COMPONENT_INSTALL_ENV += JAVA_HOME="$(JAVA_HOME)"
38 # install the built source into a prototype area
39 $(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
40 $(COMPONENT_PRE_INSTALL_ACTION)
41 (cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
42 $(ANT) $(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
43 $(COMPONENT_POST_INSTALL_ACTION)
44 $(TOUCH) $@
46 COMPONENT_TEST_ENV_CMD = $(ENV)
47 COMPONENT_TEST_ENV += JAVA_HOME="$(JAVA_HOME)"
48 COMPONENT_TEST_CMD = $(ANT)
50 # test the built source
51 $(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built
52 $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
53 $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
54 $(COMPONENT_PRE_TEST_ACTION)
55 -(cd $(COMPONENT_TEST_DIR) ; \
56 $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
57 $(COMPONENT_TEST_CMD) \
58 $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
59 &> $(COMPONENT_TEST_OUTPUT)
60 $(COMPONENT_POST_TEST_ACTION)
61 $(COMPONENT_TEST_CREATE_TRANSFORMS)
62 $(COMPONENT_TEST_PERFORM_TRANSFORM)
63 $(COMPONENT_TEST_COMPARE)
64 $(COMPONENT_TEST_CLEANUP)
65 $(TOUCH) $@
67 $(BUILD_DIR)/%/.tested: SHELLOPTS=pipefail
68 $(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built
69 $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
70 $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
71 $(COMPONENT_PRE_TEST_ACTION)
72 (cd $(COMPONENT_TEST_DIR) ; \
73 $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
74 $(COMPONENT_TEST_CMD) \
75 $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
76 |& $(TEE) $(COMPONENT_TEST_OUTPUT)
77 $(COMPONENT_POST_TEST_ACTION)
78 $(COMPONENT_TEST_CREATE_TRANSFORMS)
79 $(COMPONENT_TEST_PERFORM_TRANSFORM)
80 $(COMPONENT_TEST_CLEANUP)
81 $(TOUCH) $@
83 clean::
84 $(RM) -r $(SOURCE_DIR) $(BUILD_DIR)