make-rules/gem.mk
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 13 May 2016 17:33:30 -0700
changeset 5983 f10ab5ae99d7
parent 5682 94c0ca64c022
child 6608 a98160718cfc
permissions -rw-r--r--
Close of build 99.3.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2054
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     1
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     3
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     7
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    12
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    18
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    20
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5473
diff changeset
    21
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5473
diff changeset
    22
#
5328
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    23
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
2054
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    24
#
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    25
GEM=/usr/ruby/$(RUBY_VERSION)/bin/gem
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    26
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    27
VENDOR_GEM_DIR=/usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/gems/$(RUBY_LIB_VERSION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    28
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    29
# Name of the gem spec to use.  This will typically be
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    30
# <component_name>.gemspec
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    31
GEMSPEC=$(COMPONENT_NAME).gemspec
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    32
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    33
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    34
# Some gems projects have to be built using rake
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    35
# Allow GEM build/install commands to be overwritten
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    36
# to account for possible differences
5438
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5328
diff changeset
    37
GEM_BUILD_ACTION=(cd $(@D); $(GEM) build $(GEM_BUILD_ARGS) $(GEMSPEC))
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5328
diff changeset
    38
5473
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    39
# Build install args in a more readable fashion
5438
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5328
diff changeset
    40
ifeq ($(firstword $(subst .,$(space),$(RUBY_VERSION))),2)
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5328
diff changeset
    41
# gem install 2.x does docs differently. Continue to generate both types
5473
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    42
GEM_INSTALL_ARGS += --document rdoc,ri
5438
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5328
diff changeset
    43
endif
2054
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    44
5473
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    45
GEM_INSTALL_ARGS += -V --local --force
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    46
GEM_INSTALL_ARGS += --install-dir $(PROTO_DIR)/$(VENDOR_GEM_DIR)
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    47
GEM_INSTALL_ARGS += --bindir $(PROTO_DIR)/$(VENDOR_GEM_DIR)/bin
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    48
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    49
# cd into build directory
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    50
# gem 2.2.3 uses .gem from the cwd ignoring command line .gem file
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    51
# gem 1.8.23.2 uses command line .gem file OR .gem from cwd
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    52
GEM_INSTALL_ACTION= (cd $(@D); $(GEM) install $(GEM_INSTALL_ARGS) $(COMPONENT_NAME))
b43979b0c196 22756317 hiera is not building correctly (gem 2.x builds differently)
Shawn Ferry <shawn.ferry@oracle.com>
parents: 5438
diff changeset
    53
2054
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    54
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    55
$(BUILD_DIR)/%/.built:  $(SOURCE_DIR)/.prep
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    56
	$(RM) -r $(@D) ; $(MKDIR) $(@D)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    57
	$(CLONEY) $(SOURCE_DIR) $(@D)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    58
	$(COMPONENT_PRE_BUILD_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    59
	# Build the gem and cause the generation of a new gem spec
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    60
	# file in $(COMPONENT_SRC)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    61
	$(GEM_BUILD_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    62
	$(COMPONENT_POST_BUILD_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    63
	$(TOUCH) [email protected]
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    64
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    65
$(BUILD_DIR)/%/.installed:      $(BUILD_DIR)/%/.built
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    66
	$(COMPONENT_PRE_INSTALL_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    67
	$(MKDIR) $(PROTO_DIR)/$(GEM_DIR)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    68
	# Install the new recreated gem
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    69
	$(GEM_INSTALL_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    70
	$(COMPONENT_POST_INSTALL_ACTION)
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    71
	$(TOUCH) [email protected]
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    72
5328
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    73
COMPONENT_TEST_TARGETS =
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    74
COMPONENT_SYSTEM_TEST_TARGETS = 
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    75
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    76
# test the built source
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    77
$(BUILD_DIR)/%/.tested-and-compared:    $(BUILD_DIR)/%/.built
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    78
	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    79
	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    80
	$(COMPONENT_PRE_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    81
	-(cd $(COMPONENT_TEST_DIR) ; \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    82
	    $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    83
	    $(COMPONENT_TEST_CMD) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    84
	    $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    85
	    &> $(COMPONENT_TEST_OUTPUT)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    86
	$(COMPONENT_POST_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    87
	$(COMPONENT_TEST_CREATE_TRANSFORMS)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    88
	$(COMPONENT_TEST_PERFORM_TRANSFORM)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    89
	$(COMPONENT_TEST_COMPARE)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    90
	$(COMPONENT_TEST_CLEANUP)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    91
	$(TOUCH) [email protected]
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    92
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    93
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    94
$(BUILD_DIR)/%/.tested:    $(COMPONENT_TEST_DEP)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    95
	$(COMPONENT_PRE_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    96
	(cd $(COMPONENT_TEST_DIR) ; \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    97
	    $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    98
	    $(COMPONENT_TEST_CMD) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
    99
	    $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   100
	$(COMPONENT_POST_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   101
	$(COMPONENT_TEST_CLEANUP)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   102
	$(TOUCH) [email protected]
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   103
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   104
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   105
# Test the installed packages.  The targets above depend on .built which
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   106
# means $(CLONEY) has already run.  System-test needs cloning but not
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   107
# building; thus ideally, we would want to depend on .cloned here and below,
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   108
# but since we don't have that, we depend on .prep and run $(CLONEY) here.
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   109
$(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   110
	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   111
	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   112
	$(CLONEY) $(SOURCE_DIR) $(@D)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   113
	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   114
	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   115
	    $(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   116
	    $(COMPONENT_SYSTEM_TEST_CMD) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   117
	    $(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS)) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   118
	    &> $(COMPONENT_TEST_OUTPUT)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   119
	$(COMPONENT_POST_SYSTEM_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   120
	$(COMPONENT_TEST_CREATE_TRANSFORMS)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   121
	$(COMPONENT_TEST_PERFORM_TRANSFORM)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   122
	$(COMPONENT_TEST_COMPARE)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   123
	$(COMPONENT_SYSTEM_TEST_CLEANUP)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   124
	$(TOUCH) [email protected]
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   125
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   126
$(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   127
	$(CLONEY) $(SOURCE_DIR) $(@D)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   128
	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   129
	(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   130
	    $(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   131
	    $(COMPONENT_SYSTEM_TEST_CMD) \
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   132
	    $(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS))
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   133
	$(COMPONENT_POST_SYSTEM_TEST_ACTION)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   134
	$(COMPONENT_SYSTEM_TEST_CLEANUP)
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   135
	$(TOUCH) [email protected]
34fe0d5ec7b7 22585171 Need to add rules to gem.mk in Userland make-rules
Geoffrey Gardella <geoffrey.gardella@oracle.com>
parents: 4252
diff changeset
   136
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2054
diff changeset
   137
REQUIRED_PACKAGES += runtime/ruby