/usr/share/mk/ocaml.find.mk is in bsdowl 2.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ### ocaml.find.mk -- Interface with ocamlfind
# Author: Michael Grünewald
# Date: Sat Jul 7 20:14:16 CEST 2007
# BSD Owl Scripts (https://bitbucket.org/michipili/bsdowl)
# This file is part of BSD Owl Scripts
#
# Copyright © 2005–2014 Michael Grünewald
#
# This file must be used under the terms of the CeCILL-B.
# This source file is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
### SYNOPSIS
# USE_OCAMLFIND = yes
#
# PKGS+= unix
# PKGS+= nums
#
# PREDICATES+= mt
#
# .include "ocaml.compile.mk"
# .include "ocaml.find.mk"
# .include "ocaml.tools.mk"
### DESCRIPTION
# We provide virtual tools based on the ocamlfind utility upon
# explicit request of the user (USE_OCAMLFIND) or when idiosyncratic
# variables are defined (PKGS, PREDICATES).
#
# This module is intended to be included by other modules rather than
# to serve as is to the end user.
# Variables:
#
# PKGS
# List of packages to use
#
#
# PREDICATES
# List of predicates to use
#
#
# USE_OCAMLFIND
# Flag governing the activation of ocamlfind
#
#
# WITH_PROFILE
# Knob controlling build of files with profiling information
#
# Setting WITH_PROFILE to yes will enforce the use of the profiling
# front-ends to OCaml compilers.
#
#
# WITH_THREADS (no)
# Build with threads support
#
#
# WITH_VMTHREADS (no)
# Force VM-level scheduling of threads in byte-code programs
### IMPLEMENTATION
.if !target(__<ocaml.find.mk>__)
__<ocaml.find.mk>__:
#
# Detect idiosyncratic variables
#
.if defined(PKGS)&&!empty(PKGS)
USE_OCAMLFIND?=yes
.endif
.if defined(PREDICATES)&&!empty(PREDICATES)
USE_OCAMLFIND?=yes
.endif
#
# Conditionally define virtual tools
#
USE_OCAMLFIND?=no
WITH_PROFILE?=no
USE_OPTIMIZED_COMPILER?=no
.if ${USE_OCAMLFIND} == yes
.if !defined(USE_OCAMLFIND_COMMANDS)
.if ${WITH_PROFILE} == no && ${USE_OPTIMIZED_COMPILER} == yes
USE_OCAMLFIND_COMMANDS=yes
OCAMLFIND_OCAMLC=ocamlc.opt
OCAMLFIND_OCAMLOPT=ocamlopt.opt
.endif
.endif
USE_OCAMLFIND_COMMANDS?=no
.if ${USE_OCAMLFIND_COMMANDS} == yes
.if !defined(OCAMLFIND_COMMANDS)
OCAMLFIND_OCAMLC?=ocamlc
OCAMLFIND_OCAMLOPT?=ocamlopt
OCAMLFIND_COMMANDS+=ocamlc=${OCAMLFIND_OCAMLC}
OCAMLFIND_COMMANDS+=ocamlopt=${OCAMLFIND_OCAMLOPT}
OCAMLFIND?=${ENVTOOL} OCAMLFIND_COMMANDS="${OCAMLFIND_COMMANDS}" ocamlfind
.else
.endif
.endif
OCAMLFIND?=ocamlfind
.endif
.if ${USE_OCAMLFIND} == yes
OCAMLDOC?= ${OCAMLFIND} ocamldoc
OCAMLMKTOP?= ${OCAMLFIND} ocamlmktop -linkpkg
.if ${WITH_PROFILE} == yes
# Profiling case
OCAMLCB?= ${OCAMLFIND} ocamlcp -c
OCAMLCN?= ${OCAMLFIND} ocamloptp -c
.if defined(_OCAML_COMPILE_NATIVE_ONLY)
OCAMLCI?= ${OCAMLFIND} ocamloptp -c
.else
OCAMLCI?= ${OCAMLFIND} ocamlcp -c
.endif
OCAMLLB?= ${OCAMLFIND} ocamlcp -linkpkg
OCAMLLN?= ${OCAMLFIND} ocamloptp -linkpkg
.else
# Not profiling case
OCAMLCB?= ${OCAMLFIND} ocamlc -c
OCAMLCN?= ${OCAMLFIND} ocamlopt -c
.if defined(_OCAML_COMPILE_NATIVE_ONLY)
OCAMLCI?= ${OCAMLFIND} ocamlopt -c
.else
OCAMLCI?= ${OCAMLFIND} ocamlc -c
.endif
OCAMLLB?= ${OCAMLFIND} ocamlc -linkpkg
OCAMLLN?= ${OCAMLFIND} ocamlopt -linkpkg
.endif
.endif
.if defined(WITH_THREADS)&&(${WITH_THREADS} == yes)
.if empty(PKGS:Mthreads)
PKGS+= threads
.endif
.endif
.for pseudo in OCAMLCB OCAMLCN OCAMLCI OCAMLLB OCAMLLN OCAMLDOC OCAMLMKTOP
.if defined(PKGS)&&!empty(PKGS)
${pseudo}+= -package "${PKGS}"
.endif
.if defined(WITH_THREADS)&&(${WITH_THREADS} == yes)
.if defined(WITH_VMTHREADS)&&(${WITH_VMTHREADS} == yes)
${pseudo}+= -threads
.else
${pseudo}+= -vmthreads
.endif
.endif
.if defined(PREDICATES)&&!empty(PREDICATES)
${pseudo}+= -predicates "${PREDICATES}"
.endif
.endfor
.endif #!target(__<ocaml.find.mk>__)
### End of file `ocaml.find.mk'
|