make-rules/install.rb.mk
author April Chin <april.chin@oracle.com>
Wed, 27 Jan 2016 17:18:04 -0800
changeset 5355 5ccf97c2878d
parent 5350 0bd2e97a57c6
child 5682 94c0ca64c022
permissions -rw-r--r--
22611345 building ruby components should not force options which are optional
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1198
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     1
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     3
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     7
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    12
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    18
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    20
#
5350
0bd2e97a57c6 22599480 move mcollective to Ruby 2.1
saurabh.vyas@oracle.com
parents: 4252
diff changeset
    21
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
1198
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    22
#
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    23
2054
5f403d9bcaad PSARC/2014/275 Hiera 1.3.4
Kristina Tripp <Kristina.Tripp@oracle.com>
parents: 1482
diff changeset
    24
VENDOR_RUBY = /usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/$(RUBY_LIB_VERSION)
1198
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    25
5355
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    26
# install into proto area
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    27
INSTALL_RB_DESTDIR_OPTION = --destdir=$(PROTO_DIR)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    28
# use correct version of Ruby rather than the one calling install.rb
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    29
INSTALL_RB_RUBY_OPTION = --ruby=$(RUBY)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    30
# ensure the bin dir is not a
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    31
# Ruby-version-specific directory
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    32
INSTALL_RB_BINDIR_OPTION = --bindir=$(USRBINDIR)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    33
# install into vendor_ruby instead of site_ruby
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    34
INSTALL_RB_SITELIBDIR_OPTION = --sitelibdir=$(VENDOR_RUBY)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    35
# install into standard man directory
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    36
INSTALL_RB_MANDIR_OPTION = --mandir=$(USRSHAREMANDIR)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    37
# ensure the sbin dir is not a
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    38
# Ruby-version-specific directory
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    39
INSTALL_RB_SBINDIR_OPTION = --sbindir=$(USRSBINDIR)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    40
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    41
INSTALL_RB_OPTIONS += $(INSTALL_RB_DESTDIR_OPTION)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    42
INSTALL_RB_OPTIONS += $(INSTALL_RB_RUBY_OPTION)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    43
INSTALL_RB_OPTIONS += $(INSTALL_RB_BINDIR_OPTION)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    44
INSTALL_RB_OPTIONS += $(INSTALL_RB_SITELIBDIR_OPTION)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    45
INSTALL_RB_OPTIONS += $(INSTALL_RB_MANDIR_OPTION)
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    46
INSTALL_RB_OPTIONS += $(INSTALL_RB_SBINDIR_OPTION)
1198
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    47
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    48
# install.rb scripts do not have any concept of 'build' so make this a
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    49
# no-op
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    50
$(BUILD_DIR)/%/.built:  $(SOURCE_DIR)/.prep
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    51
	$(RM) -r $(@D) ; $(MKDIR) $(@D)
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    52
	$(COMPONENT_PRE_BUILD_ACTION)
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    53
	$(COMPONENT_POST_BUILD_ACTION)
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    54
	$(TOUCH) [email protected]
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    55
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    56
# install the source into the proto directory
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    57
$(BUILD_DIR)/%/.installed:      $(BUILD_DIR)/%/.built
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    58
	$(COMPONENT_PRE_INSTALL_ACTION)
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    59
	(cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
5355
5ccf97c2878d 22611345 building ruby components should not force options which are optional
April Chin <april.chin@oracle.com>
parents: 5350
diff changeset
    60
                ./install.rb $(INSTALL_RB_OPTIONS) )
1198
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    61
	$(COMPONENT_POST_INSTALL_ACTION)
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    62
	$(TOUCH) [email protected]
f9a4100102d8 PSARC/2013/005 Puppet 3.0.1
Drew Fisher <drew.fisher@oracle.com>
parents:
diff changeset
    63
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2054
diff changeset
    64
REQUIRED_PACKAGES += runtime/ruby