make-rules/justmake.mk
author Nobutomo Nakano <nobutomo.nakano@oracle.com>
Fri, 09 Dec 2011 10:08:54 -0800
branchs11-sru
changeset 2236 ea3ead94e5ea
parent 278 77b380ba9d84
child 774 d0cbca26a17c
permissions -rw-r--r--
7080326 update zoneinfo timezones to 2011i (Samoa, Newfoundland) 7087931 update zoneinfo timezones to 2011j (Samoa) 7093560 update zoneinfo timezones to 2011k (Belarus, Palestine, Ukraine) 7099266 update zoneinfo timezones to 2011l (Fiji, Palestine) 7104499 update zoneinfo timezones to 2011m (Brazil, Ukraine) 7106892 update zoneinfo timezones to 2011n (Cuba, Fiji)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
# Rules and Macros for building opens source software that just uses their
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
# own make and no autoconf-style tools.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
# To use these rules, include ../make-rules/justmake.mk in your Makefile
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
# and define "build", "install" targets appropriate to building your component.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
# Ex:
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
# 	build:		$(BUILD_32) \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
#	 		$(BUILD_64)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
# 
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
#	install:	$(INSTALL_32) \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
#	 		$(INSTALL_64)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
# Any additional pre/post configure, build, or install actions can be specified
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    38
# in your Makefile by setting them in on of the following macros:
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    39
#	COMPONENT_PRE_BUILD_ACTION, COMPONENT_POST_BUILD_ACTION
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    40
#	COMPONENT_PRE_INSTALL_ACTION, COMPONENT_POST_INSTALL_ACTION
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    41
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    42
# If component specific make targets need to be used for build or install, they
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    43
# can be specified in
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    44
#	COMPONENT_BUILD_TARGETS, COMPONENT_INSTALL_TARGETS
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    45
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    46
278
77b380ba9d84 7045614 Move Apache Web server to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 181
diff changeset
    47
COMPONENT_INSTALL_ARGS += DESTDIR=$(PROTO_DIR)
77b380ba9d84 7045614 Move Apache Web server to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 181
diff changeset
    48
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
# build the configured source
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    50
$(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    51
	$(RM) -r $(@D) ; $(MKDIR) $(@D)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    52
	$(CLONEY) $(SOURCE_DIR) $(@D)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    53
	$(COMPONENT_PRE_BUILD_ACTION)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    54
	(cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
138
089c2065503f 7016734 move pz7ip from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents: 94
diff changeset
    55
		$(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    56
	$(COMPONENT_POST_BUILD_ACTION)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    57
	$(TOUCH) $@
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    58
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    59
# install the built source into a prototype area
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    60
$(BUILD_DIR)/%/.installed:	$(BUILD_DIR)/%/.built
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
	$(COMPONENT_PRE_INSTALL_ACTION)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    62
	(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
138
089c2065503f 7016734 move pz7ip from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents: 94
diff changeset
    63
			$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    64
	$(COMPONENT_POST_INSTALL_ACTION)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    65
	$(TOUCH) $@
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    66
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    67
# test the built source
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    68
$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    69
	$(COMPONENT_PRE_TEST_ACTION)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    70
	(cd $(@D) ; $(ENV) $(COMPONENT_TEST_ENV) $(GMAKE) \
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    71
		$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    72
	$(COMPONENT_POST_TEST_ACTION)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    73
	$(TOUCH) $@
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 138
diff changeset
    74
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    75
clean::
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    76
	$(RM) -r $(BUILD_DIR) $(PROTO_DIR)