Skip to content

Commit

Permalink
Betters deps for ocamlopt-memtrace (ocaml#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gbury committed Oct 21, 2020
1 parent c78a9a3 commit 11c5896
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 103 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ ocamlopt.opt: compilerlibs/ocamlcommon.cmxa compilerlibs/ocamloptcomp.cmxa \
$(OPTSTART:.cmo=.cmx)
$(CAMLOPT_CMD) $(LINKFLAGS) -o $@ $^

ocamlopt-memtrace.opt: otherlibrariesopt
ocamlopt-memtrace.opt: ocamlopt.opt otherlibrariesopt memprof/memtrace
$(MAKE) -C memprof/memtrace allopt
cp memprof/memtrace/ocamlopt-memtrace.opt $@

Expand Down
100 changes: 2 additions & 98 deletions memprof/memtrace/.depend
Original file line number Diff line number Diff line change
Expand Up @@ -20,106 +20,10 @@ location_codec.cmx : \
location_codec.cmi : \
buf.cmi
main.cmo : \
../../driver/optmaindriver.cmi \
memtrace.cmi
main.cmx : \
memtrace.cmx
memprof_tracer.cmi : \
trace.cmi
memtrace.cmo : \
trace.cmi \
memprof_tracer.cmi \
memtrace.cmi
memtrace.cmx : \
trace.cmx \
memprof_tracer.cmx \
memtrace.cmi
memtrace.cmi : \
trace.cmi \
memprof_tracer.cmi
trace.cmo : \
location_codec.cmi \
buf.cmi \
backtrace_codec.cmi \
trace.cmi
trace.cmx : \
location_codec.cmx \
buf.cmx \
backtrace_codec.cmx \
trace.cmi
trace.cmi :
backtrace_codec.cmo : \
buf.cmi \
backtrace_codec.cmi
backtrace_codec.cmx : \
buf.cmx \
backtrace_codec.cmi
backtrace_codec.cmi : \
buf.cmi
buf.cmo : \
buf.cmi
buf.cmx : \
buf.cmi
buf.cmi :
location_codec.cmo : \
buf.cmi \
location_codec.cmi
location_codec.cmx : \
buf.cmx \
location_codec.cmi
location_codec.cmi : \
buf.cmi
main.cmo : \
memtrace.cmi
main.cmx : \
memtrace.cmx
memprof_tracer.cmi : \
trace.cmi
memtrace.cmo : \
trace.cmi \
memprof_tracer.cmi \
memtrace.cmi
memtrace.cmx : \
trace.cmx \
memprof_tracer.cmx \
memtrace.cmi
memtrace.cmi : \
trace.cmi \
memprof_tracer.cmi
trace.cmo : \
location_codec.cmi \
buf.cmi \
backtrace_codec.cmi \
trace.cmi
trace.cmx : \
location_codec.cmx \
buf.cmx \
backtrace_codec.cmx \
trace.cmi
trace.cmi :
backtrace_codec.cmo : \
buf.cmi \
backtrace_codec.cmi
backtrace_codec.cmx : \
buf.cmx \
backtrace_codec.cmi
backtrace_codec.cmi : \
buf.cmi
buf.cmo : \
buf.cmi
buf.cmx : \
buf.cmi
buf.cmi :
location_codec.cmo : \
buf.cmi \
location_codec.cmi
location_codec.cmx : \
buf.cmx \
location_codec.cmi
location_codec.cmi : \
buf.cmi
main.cmo : \
memtrace.cmi
main.cmx : \
../../driver/optmaindriver.cmx \
memtrace.cmx
memprof_tracer.cmo : \
trace.cmi \
Expand Down
12 changes: 8 additions & 4 deletions memprof/memtrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,21 @@ ocamlopt := $(BEST_OCAMLOPT) $(flags)

ocamldep := $(BEST_OCAMLDEP)
depflags := -slash
depincludes :=
depincludes := -I $(ROOTDIR)/driver

.PHONY: all allopt opt.opt # all, allopt and opt.opt are synonyms
all: ocamlopt-memtrace.opt
allopt: all
opt.opt: allopt

ocamlopt-memtrace.opt: $(native_modules)
ocamlopt-memtrace.opt: $(ROOTDIR)/compilerlibs/ocamlcommon.cmxa \
$(ROOTDIR)/compilerlibs/ocamloptcomp.cmxa \
$(ROOTDIR)/otherlibs/systhreads/threads.cmxa \
$(ROOTDIR)/otherlibs/unix/unix.cmxa \
$(native_modules)
$(ocamlopt_cmd) -o $@ -cclib -lunix -cclib -lthreadsnat \
unix.cmxa threads.cmxa ocamlcommon.cmxa ocamloptcomp.cmxa \
$^
$(native_modules)

%.cmx: %.ml
$(ocamlopt) -c $<
Expand All @@ -103,7 +107,7 @@ ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend: $(dependencies_generated_prereqs)
$(ocamldep) $(depflags) $(depincludes) $(mli_files) $(ml_files) \
>> .depend
> .depend
endif

-include .depend

0 comments on commit 11c5896

Please sign in to comment.