5 Star 4 Fork 0

Gitee 极速下载 / ocaml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/ocaml/ocaml/
克隆/下载
Makefile.best_binaries 3.54 KB
一键复制 编辑 原始数据 按行查看 历史
#**************************************************************************
#* *
#* OCaml *
#* *
#* Gabriel Scherer, projet Parsifal, INRIA Saclay *
#* *
#* Copyright 2019 Institut National de Recherche en Informatique et *
#* en Automatique. *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
# This Makefile should be included.
# It expects:
# - Makefile.common to be included as well
# - a ROOTDIR variable pointing to the repository root
# relative to the including Makefile
# It exports definitions of BEST_OCAML{C,OPT,LEX,DEP} commands that
# run to either the bytecode binary built in the repository or the
# native binary, if available. Note that they never use the boot/
# versions: we assume that ocamlc, ocamlopt, etc. have been run first.
# Set this to empty to force use of the bytecode compilers at all times
USE_BEST_BINARIES ?= true
check_not_stale = \
$(if $(shell test $(ROOTDIR)/$1 -nt $(ROOTDIR)/$2 && echo stale), \
$(info Warning: we are not using the native binary $2 \
because it is older than the bytecode binary $1; \
you should silence this warning by either removing $2 \
or rebuilding it (or `touch`-ing it) if you want it used.), \
ok)
choose_best = $(strip $(if \
$(and $(USE_BEST_BINARIES),$(wildcard $(ROOTDIR)/$1.opt$(EXE)),$(strip \
$(call check_not_stale,$1$(EXE),$1.opt$(EXE)))), \
$(ROOTDIR)/$1.opt$(EXE), \
$(OCAMLRUN) $(ROOTDIR)/$1$(EXE)))
BEST_OCAMLC := $(call choose_best,ocamlc)
BEST_OCAMLOPT := $(call choose_best,ocamlopt)
BEST_OCAMLLEX := $(call choose_best,lex/ocamllex)
# We want to be able to compute dependencies even if the bytecode compiler
# is not built yet, using the bootstrap compiler.
# Unlike other tools, there is no risk of mixing incompatible
# bootstrap-compiler and host-compiler object files, as ocamldep only
# produces text output.
BEST_OCAMLDEP := $(strip $(if \
$(and $(USE_BEST_BINARIES),$(wildcard $(ROOTDIR)/ocamlc.opt$(EXE)),$(strip \
$(call check_not_stale,boot/ocamlc,ocamlc.opt$(EXE)))), \
$(ROOTDIR)/ocamlc.opt$(EXE) -depend, \
$(BOOT_OCAMLC) -depend))
OCAMLDOC = $(ROOTDIR)/ocamldoc/ocamldoc$(EXE)
OCAMLDOC_OPT = $(ROOTDIR)/ocamldoc/ocamldoc.opt$(EXE)
ifeq "$(TARGET)" "$(HOST)"
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
OCAMLDOC_RUN_BYTE = $(NEW_OCAMLRUN) -I $(ROOTDIR)/otherlibs/unix \
-I $(ROOTDIR)/otherlibs/str $(OCAMLDOC)
else
# if shared-libraries are not supported, unix.cma and str.cma
# are compiled with -custom, so ocamldoc also uses -custom,
# and (ocamlrun ocamldoc) does not work.
OCAMLDOC_RUN_BYTE = $(OCAMLDOC)
endif
else
OCAMLDOC_RUN_BYTE = $(NEW_OCAMLRUN) $(OCAMLDOC)
endif
OCAMLDOC_RUN_OPT = $(OCAMLDOC_OPT)
ifeq "$(wildcard $(OCAMLDOC_OPT))" ""
OCAMLDOC_RUN = $(OCAMLDOC_RUN_BYTE)
else
OCAMLDOC_RUN = $(OCAMLDOC_RUN_OPT)
endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/ocaml.git
git@gitee.com:mirrors/ocaml.git
mirrors
ocaml
ocaml
trunk

搜索帮助

344bd9b3 5694891 D2dac590 5694891