0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A# Copyright (c) 2011, 2015, Oracle
and/or its affiliates. All rights reserved.
0N/A# Rules and Macros for building opens source software that just uses their
5031N/A# own make and no autoconf-style tools.
0N/A# To use these rules, include $(WS_MAKE_RULES)/
justmake.mk in your Makefile
1183N/A# and define "build", "install" targets appropriate to building your component.
734N/A# install: $(INSTALL_32) \
734N/A# Any additional
pre/post configure, build, or install actions can be specified
2426N/A# in your Makefile by setting them in on of the following macros:
734N/A# COMPONENT_PRE_BUILD_ACTION, COMPONENT_POST_BUILD_ACTION
734N/A# COMPONENT_PRE_INSTALL_ACTION, COMPONENT_POST_INSTALL_ACTION
734N/A# If component specific make targets need to be used for build or install, they
5347N/A# COMPONENT_BUILD_TARGETS, COMPONENT_INSTALL_TARGETS
2426N/ACOMPONENT_INSTALL_ARGS += DESTDIR=$(PROTO_DIR)
4501N/A# build the configured source
1162N/A$(BUILD_DIR)/%/.built: $(SOURCE_DIR)/.prep
4841N/A $(RM) -r $(@D) ; $(MKDIR) $(@D)
4841N/A $(CLONEY) $(SOURCE_DIR) $(@D)
1204N/A $(COMPONENT_PRE_BUILD_ACTION)
4841N/A (cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
2426N/A $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
2426N/A $(COMPONENT_POST_BUILD_ACTION)
2426N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
1586N/A# install the built source into a prototype area
4501N/A$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
4501N/A $(COMPONENT_PRE_INSTALL_ACTION)
2426N/A (cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
4841N/A $(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
2426N/A $(COMPONENT_POST_INSTALL_ACTION)
4501N/A$(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built
4501N/A $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
4501N/A $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
4554N/A $(COMPONENT_PRE_TEST_ACTION)
4841N/A -(cd $(COMPONENT_TEST_DIR) ; \
2426N/A $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
0N/A $(COMPONENT_TEST_CMD) \
0N/A $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
4501N/A &> $(COMPONENT_TEST_OUTPUT)
4411N/A $(COMPONENT_POST_TEST_ACTION)
2426N/A $(COMPONENT_TEST_CREATE_TRANSFORMS)
2426N/A $(COMPONENT_TEST_PERFORM_TRANSFORM)
4841N/A$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built
2426N/A $(COMPONENT_PRE_TEST_ACTION)
4501N/A (cd $(COMPONENT_TEST_DIR) ; \
4411N/A $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
0N/A $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
734N/A $(COMPONENT_POST_TEST_ACTION)
1191N/A# test the installed packages
0N/A$(BUILD_DIR)/%/.system-tested-and-compared: $(SOURCE_DIR)/.prep
1191N/A $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
0N/A $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
0N/A $(COMPONENT_PRE_SYSTEM_TEST_ACTION)
1191N/A -(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
0N/A $(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
2929N/A $(COMPONENT_SYSTEM_TEST_CMD) \
2929N/A $(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS)) \
0N/A &> $(COMPONENT_TEST_OUTPUT)
5347N/A $(COMPONENT_POST_SYSTEM_TEST_ACTION)
4224N/A $(COMPONENT_TEST_CREATE_TRANSFORMS)
2426N/A $(COMPONENT_TEST_PERFORM_TRANSFORM)
0N/A $(COMPONENT_SYSTEM_TEST_CLEANUP)
0N/A$(BUILD_DIR)/%/.system-tested: $(SOURCE_DIR)/.prep
535N/A $(COMPONENT_PRE_SYSTEM_TEST_ACTION)
2184N/A (cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
2184N/A $(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
0N/A $(COMPONENT_SYSTEM_TEST_CMD) \
1191N/A $(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS))
1191N/A $(COMPONENT_POST_SYSTEM_TEST_ACTION)
0N/A $(COMPONENT_SYSTEM_TEST_CLEANUP)
0N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
0N/A $(MAKE) PARFAIT_BUILD=yes parfait
560N/A $(RM) -r $(BUILD_DIR) $(PROTO_DIR)