Makefile revision 7168
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# CDDL HEADER START
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# The contents of this file are subject to the terms of the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Common Development and Distribution License (the "License").
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# You may not use this file except in compliance with the License.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# See the License for the specific language governing permissions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# and limitations under the License.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# When distributing Covered Code, include this CDDL HEADER in each
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# If applicable, add the following below this CDDL HEADER, with the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# CDDL HEADER END
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncPATH=$(USRBINDIR):$(GNUBIN):$(USRSBINDIR):$(SPRO_VROOT)/bin
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync sha256:86f3387a0d7e7c8be2a3c53af083a5a726e333686208d5ea0dd6bb5ac3f58143
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_ARCHIVE_URL= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Documentation sources
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync sha256:1c65b334ccb155aefa1e5e930a91f816d843d37e26b27d3a0351c57149005a5c
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_ARCHIVE_URL_1= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE_1)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync sha256:35f5adfeb92817f7e3ef66dec6b4ca910f48a3a2cf0bfa34bd155fe6866de405
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_ARCHIVE_URL_2= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE_2)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync sha256:48eedc6a870bef84562b2d0ed25d9c3b15ab646f72ecfb4c6c2cbaccc6b4081d
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_ARCHIVE_URL_3= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE_3)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Ocaml does not use a standard configure script, but has its own handwritten
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# one. So we must specify the arguments it accepts by hand.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCONFIGURE_OPTIONS = --bindir $(CONFIGURE_BINDIR.$(BITS))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCONFIGURE_OPTIONS += --libdir $(CONFIGURE_LIBDIR.$(BITS))/ocaml
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCONFIGURE_OPTIONS += --x11lib $(CONFIGURE_LIBDIR.$(BITS))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCONFIGURE_OPTIONS += --x11include $(CONFIGURE_INCLUDEDIR)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Set up some environment variables to make things look nicer.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_OCAML_PDFDOC = $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_2)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_OCAML_INCLUDES = -nostdlib -I stdlib -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_OCAML_ALLINCLUDES = $(UL_OCAML_INCLUDES) -I otherlibs/unix -I otherlibs/str -I otherlibs/dynlink
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_PROTO_BINDIR = $(PROTO_DIR)/$(CONFIGURE_BINDIR.$(BITS))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_PROTO_LIBDIR = $(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_PROTO_INFODIR = $(PROTO_DIR)/$(CONFIGURE_INFODIR)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncUL_PROTO_DATADIR = $(PROTO_DIR)/$(CONFIGURE_PREFIX)/share
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_INSTALL_ARGS += EMACSDIR="$(UL_PROTO_DATADIR)/emacs/site-lisp"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# This action unpacks the additional tarballs and builds some additional
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# useful programs. For example, the ocamlbyteinfo and ocamlplugininfo
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# utilities are useful additions from Debian, and also included in RHEL.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocamlbyteinfo;hb=HEAD
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_1); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_3); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CP) $(COMPONENT_DIR)/files/ocamlbyteinfo.ml $(@D); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CP) $(COMPONENT_DIR)/files/ocamlplugininfo.ml $(@D); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync dynlinkaux.cmo ocamlbyteinfo.ml -o ocamlbyteinfo); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unix.cmxa str.cmxa natdynlink.ml ocamlplugininfo.ml \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_INSTALL_ARGS += BINDIR="$(UL_PROTO_BINDIR)"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_INSTALL_ARGS += LIBDIR="$(UL_PROTO_LIBDIR)/ocaml"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_INSTALL_ARGS += MANDIR="$(PROTOUSRSHAREMANDIR)"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncCOMPONENT_INSTALL_ARGS += EMACSDIR="$(UL_PROTO_DATADIR)/emacs/site-lisp"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# This action moves additional files we want to install into the proto area.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# I prefer using "cp -R" for copying the documentation tarball and example
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# contents since it will make it easier to see new files need to be packaged
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# when Ocaml is updated.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(ENV) $(COMPONENT_BUILD_ENV) $(GMAKE) install install-ocamltags $(COMPONENT_INSTALL_ARGS); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CP) $(@D)/infoman/ocaml*.gz $(UL_PROTO_INFODIR); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CP) $(UL_OCAML_PDFDOC) $(UL_PROTO_DOCDIR)/refman.pdf; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync $(CP) -R $(@D)/otherlibs/labltk/examples_* $(UL_PROTO_EXAM); \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# ASLR should be enabled when 64-bit support is enabled, which is planned as
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# a follow-on step.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Files built in the COMPONENT_POST_INSTALL_ACTION are found by setting
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# PKG_PROTO_DIRS as follows: