install.rb.mk revision 3109
767003094c9794f0804c663a8abc131b86554999Satyen Desai# CDDL HEADER START
767003094c9794f0804c663a8abc131b86554999Satyen Desai# The contents of this file are subject to the terms of the
767003094c9794f0804c663a8abc131b86554999Satyen Desai# Common Development and Distribution License (the "License").
767003094c9794f0804c663a8abc131b86554999Satyen Desai# You may not use this file except in compliance with the License.
767003094c9794f0804c663a8abc131b86554999Satyen Desai# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
767003094c9794f0804c663a8abc131b86554999Satyen Desai# See the License for the specific language governing permissions
767003094c9794f0804c663a8abc131b86554999Satyen Desai# and limitations under the License.
767003094c9794f0804c663a8abc131b86554999Satyen Desai# When distributing Covered Code, include this CDDL HEADER in each
767003094c9794f0804c663a8abc131b86554999Satyen Desai# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
767003094c9794f0804c663a8abc131b86554999Satyen Desai# If applicable, add the following below this CDDL HEADER, with the
767003094c9794f0804c663a8abc131b86554999Satyen Desai# fields enclosed by brackets "[]" replaced with your own identifying
767003094c9794f0804c663a8abc131b86554999Satyen Desai# information: Portions Copyright [yyyy] [name of copyright owner]
767003094c9794f0804c663a8abc131b86554999Satyen Desai# CDDL HEADER END
767003094c9794f0804c663a8abc131b86554999Satyen Desai# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
767003094c9794f0804c663a8abc131b86554999Satyen DesaiVENDOR_RUBY = /usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/$(RUBY_LIB_VERSION)
767003094c9794f0804c663a8abc131b86554999Satyen Desai# default user executable binaries to /usr/bin
767003094c9794f0804c663a8abc131b86554999Satyen DesaiINSTALL_RB_BINDIR = $(USRBINDIR)
767003094c9794f0804c663a8abc131b86554999Satyen Desai# install.rb scripts do not have any concept of 'build' so make this a
767003094c9794f0804c663a8abc131b86554999Satyen Desai$(BUILD_DIR)/%/.built: $(SOURCE_DIR)/.prep
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(RM) -r $(@D) ; $(MKDIR) $(@D)
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(COMPONENT_PRE_BUILD_ACTION)
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(COMPONENT_POST_BUILD_ACTION)
767003094c9794f0804c663a8abc131b86554999Satyen Desai# install the source into the proto directory
767003094c9794f0804c663a8abc131b86554999Satyen Desai$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(COMPONENT_PRE_INSTALL_ACTION)
767003094c9794f0804c663a8abc131b86554999Satyen Desai (cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
767003094c9794f0804c663a8abc131b86554999Satyen Desai ./install.rb --destdir=$(PROTO_DIR) \
767003094c9794f0804c663a8abc131b86554999Satyen Desai --ruby=$(RUBY) \
767003094c9794f0804c663a8abc131b86554999Satyen Desai --bindir=$(INSTALL_RB_BINDIR) \
767003094c9794f0804c663a8abc131b86554999Satyen Desai --sitelibdir=$(VENDOR_RUBY) \
767003094c9794f0804c663a8abc131b86554999Satyen Desai --mandir=$(USRSHAREMANDIR))
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(COMPONENT_POST_INSTALL_ACTION)
767003094c9794f0804c663a8abc131b86554999Satyen Desai $(RM) -r $(SOURCE_DIR) $(BUILD_DIR)