File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -357,3 +357,10 @@ hacking-emacs-poller: _build/_bootinstall
357
357
hacking-emacs-builder: _build/_bootinstall
358
358
$(dune) rpc build $(ws_boot) -w $(boot_targets)
359
359
$(dune) diagnostics
360
+
361
+ .PHONY: debug-printers
362
+ debug-printers: runtime-stdlib # required for $(ws_main) to work
363
+ $(dune) build $(ws_main) $(ocamldir)/tools/debug_printers
364
+ @echo
365
+ @echo To load into ocamldebug, use:
366
+ @echo source \"$$(realpath _build/main/$(ocamldir)/tools/debug_printers)\"
Original file line number Diff line number Diff line change 85
85
(section lib)
86
86
(package ocaml))
87
87
88
+ (library
89
+ (name debug_printers)
90
+ (modes byte)
91
+ (libraries ocamlcommon)
92
+ (modules debug_printers))
93
+
94
+ (rule
95
+ (target debug_printers)
96
+ (deps debug_printers.ml %{cmo:debug_printers})
97
+ (action
98
+ (with-stdout-to %{target}
99
+ (progn
100
+ ; Resorting to Bash instead of the built-in [echo] action because I
101
+ ; couldn't find a better way to get an absolute path out of Dune
102
+ (bash "echo load_printer \\\"$(realpath %{cmo:debug_printers})\\\"")
103
+ (with-stdin-from debug_printers.ml
104
+ (run awk "{ print \"install_printer Debug_printers.\" $2 }"))))))
88
105
89
106
; ocamlcp, ocamloptp and ocamlprof are not currently supported.
You can’t perform that action at this time.
0 commit comments