Skip to content

Instantly share code, notes, and snippets.

@trefis
Created March 8, 2018 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trefis/d39000a0df8657b3b33d8ab6c9fe0a89 to your computer and use it in GitHub Desktop.
Save trefis/d39000a0df8657b3b33d8ab6c9fe0a89 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 40c60d7ae..9c7df1c82 100644
--- a/Makefile
+++ b/Makefile
@@ -57,15 +57,15 @@ CAMLRUN ?= boot/ocamlrun
CAMLYACC ?= boot/ocamlyacc
include stdlib/StdlibModules
-CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot -use-prims byterun/primitives
-CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
+CAMLC=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) boot/ocamlc -g -nostdlib -I boot -use-prims byterun/primitives
+CAMLOPT=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
ARCHES=amd64 i386 arm arm64 power s390x
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I middle_end \
-I middle_end/base_types -I asmcomp -I asmcomp/debug \
-I driver -I toplevel
COMPFLAGS=-strict-sequence -principal -absname -w +a-4-9-41-42-44-45-48 \
- -warn-error A \
+ -warn-error A -dtimings \
-bin-annot -safe-string -strict-formats $(INCLUDES)
LINKFLAGS=
diff --git a/lex/Makefile b/lex/Makefile
index 5e3848fbc..2f2198e16 100644
--- a/lex/Makefile
+++ b/lex/Makefile
@@ -26,11 +26,11 @@ else
export OCAML_FLEXLINK:=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe
endif
-CAMLC=$(CAMLRUN) ../boot/ocamlc -strict-sequence -nostdlib -I ../boot \
+CAMLC=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) ../boot/ocamlc -strict-sequence -nostdlib -I ../boot \
-use-prims ../byterun/primitives
-CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
+CAMLOPT=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48 -warn-error A \
- -safe-string -strict-sequence -strict-formats -bin-annot
+ -dtimings -safe-string -strict-sequence -strict-formats -bin-annot
LINKFLAGS=
YACCFLAGS=-v
CAMLLEX=$(CAMLRUN) ../boot/ocamllex
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index 65802500f..d1eda35f8 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -20,9 +20,9 @@ OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun
OCAMLYACC ?= $(ROOTDIR)/boot/ocamlyacc
STDLIBFLAGS = -nostdlib -I $(ROOTDIR)/stdlib
-OCAMLC = $(OCAMLRUN) $(ROOTDIR)/ocamlc $(STDLIBFLAGS)
+OCAMLC = /usr/local/home/trefis/ocaml/my_run.sh $(OCAMLRUN) $(ROOTDIR)/ocamlc $(STDLIBFLAGS)
ifeq "$(UNIX_OR_WIN32)" "unix"
-OCAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt $(STDLIBFLAGS)
+OCAMLOPT = /usr/local/home/trefis/ocaml/my_run.sh $(OCAMLRUN) $(ROOTDIR)/ocamlopt $(STDLIBFLAGS)
else # Windows
ifeq "$(wildcard $(ROOTDIR)/flexdll/Makefile)" ""
FLEXLINK_ENV=
@@ -114,7 +114,7 @@ INCLUDES_NODEP=\
INCLUDES=$(INCLUDES_DEP) $(INCLUDES_NODEP)
-COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48 -warn-error A -safe-string -strict-sequence -strict-formats -bin-annot
+COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48 -warn-error A -dtimings -safe-string -strict-sequence -strict-formats -bin-annot
LINKFLAGS=$(INCLUDES) -nostdlib
CMOFILES=\
@@ -335,7 +335,7 @@ test_stdlib:
$(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/stdlib.odoc -keep-code \
../stdlib/*.mli \
../otherlibs/$(UNIXLIB)/unix.mli \
- ../otherlibs/str/str.mli
+ ./otherlibs/str/str.mli
.PHONY: test_stdlib_code
test_stdlib_code:
diff --git a/ocamldoc/stdlib_non_prefixed/Makefile b/ocamldoc/stdlib_non_prefixed/Makefile
index 801007efc..28220fd78 100644
--- a/ocamldoc/stdlib_non_prefixed/Makefile
+++ b/ocamldoc/stdlib_non_prefixed/Makefile
@@ -4,7 +4,7 @@ include $(TOPDIR)/Makefile.tools
.SUFFIXES:
OCAMLDEP= $(OCAMLRUN) $(TOPDIR)/tools/ocamldep -slash
-OCAMLC_SNP= $(OCAMLRUN) $(TOPDIR)/ocamlc -nostdlib -nopervasives -I $(HERE)
+OCAMLC_SNP= /usr/local/home/trefis/ocaml/my_run.sh $(OCAMLRUN) $(TOPDIR)/ocamlc -dtimings -nostdlib -nopervasives -I $(HERE)
pervasives.cmi: pervasives.mli camlinternalFormatBasics.cmi
$(OCAMLC_SNP) -c $<
diff --git a/ocamltest/Makefile b/ocamltest/Makefile
index f0d901f70..abac73a67 100644
--- a/ocamltest/Makefile
+++ b/ocamltest/Makefile
@@ -125,7 +125,7 @@ include_directories = $(addprefix -I , $(directories))
flags = -g -nostdlib $(include_directories) \
-strict-sequence -safe-string -strict-formats \
- -w +a-4-9-41-42-44-45-48 -warn-error A
+ -w +a-4-9-41-42-44-45-48 -warn-error A -dtimings
ifeq "$(UNIX_OR_WIN32)" "unix"
FLEXLINK_ENV=
@@ -137,9 +137,9 @@ else # Windows
endif
endif
-ocamlc := $(FLEXLINK_ENV) ../byterun/ocamlrun ../ocamlc $(flags)
+ocamlc := $(FLEXLINK_ENV) /usr/local/home/trefis/ocaml/my_run.sh ../byterun/ocamlrun ../ocamlc $(flags)
-ocamlopt := $(FLEXLINK_ENV) ../byterun/ocamlrun ../ocamlopt $(flags)
+ocamlopt := $(FLEXLINK_ENV) /usr/local/home/trefis/ocaml/my_run.sh ../byterun/ocamlrun ../ocamlopt $(flags)
ocamldep := ../byterun/ocamlrun ../tools/ocamldep -slash
diff --git a/otherlibs/Makefile b/otherlibs/Makefile
index 0958d0c06..b8a529e92 100644
--- a/otherlibs/Makefile
+++ b/otherlibs/Makefile
@@ -26,14 +26,14 @@ else
export OCAML_FLEXLINK:=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe
endif
-CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib
-CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \
+CAMLC=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib
+CAMLOPT=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \
-I $(ROOTDIR)/stdlib
CFLAGS += $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
CPPFLAGS += -I$(ROOTDIR)/byterun
# Compilation options
-COMPFLAGS=-absname -w +a-4-9-41-42-44-45-48 -warn-error A -bin-annot -g \
+COMPFLAGS=-absname -w +a-4-9-41-42-44-45-48 -warn-error A -dtimings -bin-annot -g \
-safe-string -strict-sequence -strict-formats $(EXTRACAMLFLAGS)
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS=-O3
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 7031e2b43..c2c15c7cc 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -19,9 +19,9 @@ CAMLYACC ?= ../boot/ocamlyacc
TARGET_BINDIR ?= $(BINDIR)
COMPILER=../ocamlc
-CAMLC=$(CAMLRUN) $(COMPILER)
+CAMLC=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) $(COMPILER)
COMPFLAGS=-strict-sequence -absname -w +a-4-9-41-42-44-45-48 \
- -g -warn-error A -bin-annot -nostdlib \
+ -g -warn-error A -dtimings -bin-annot -nostdlib \
-safe-string -strict-formats
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS=-O3
@@ -29,7 +29,7 @@ else
OPTCOMPFLAGS=
endif
OPTCOMPILER=../ocamlopt
-CAMLOPT=$(CAMLRUN) $(OPTCOMPILER)
+CAMLOPT=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) $(OPTCOMPILER)
CAMLDEP=$(CAMLRUN) ../tools/ocamldep
# Object file prefix
diff --git a/tools/Makefile b/tools/Makefile
index fdd27429d..63914eb9d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -83,9 +83,9 @@ else
export OCAML_FLEXLINK:=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe
endif
-CAMLC=$(CAMLRUN) ../boot/ocamlc -nostdlib -I ../boot \
+CAMLC=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) ../boot/ocamlc -nostdlib -I ../boot \
-use-prims ../byterun/primitives -I ..
-CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
+CAMLOPT=/usr/local/home/trefis/ocaml/my_run.sh $(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
ifeq "$(UNIX_OR_WIN32)" "win32"
ifneq "$(wildcard ../flexdll/Makefile)" ""
CAMLOPT := OCAML_FLEXLINK="../boot/ocamlrun ../flexdll/flexlink.exe" \
@@ -97,7 +97,7 @@ INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \
-I ../middle_end -I ../middle_end/base_types -I ../driver \
-I ../toplevel
COMPFLAGS= -absname -w +a-4-9-41-42-44-45-48 -strict-sequence -warn-error A \
- -safe-string -strict-formats -bin-annot $(INCLUDES)
+ -dtimings -safe-string -strict-formats -bin-annot $(INCLUDES)
LINKFLAGS=$(INCLUDES)
VPATH := $(filter-out -I,$(INCLUDES))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment