Package: coinst / 1.9.1-1

make_viewer_byte Patch series | download
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
Author: Ralf Treinen <treinen@debian.org>
Description: add target for building viewer in bytecode
Debian-bug:  #656730

--- a/viewer/Makefile
+++ b/viewer/Makefile
@@ -21,13 +21,21 @@
 LINKFLAGS=-package js_of_ocaml -linkpkg
 
 all: coinst_viewer jsviewer.js coinst_converter
+opt: all
+byte: coinst_viewer.byte jsviewer.js coinst_converter.byte
 
 coinst_viewer: $(OBJS)
 	$(OCAMLOPT) -o $@  $(OPTLINKFLAGS) $^
 
+coinst_viewer.byte: $(OBJS:.cmx=.cmo)
+	$(OCAMLC) -o $@  $(OPTLINKFLAGS) $^
+
 coinst_converter: $(CONVERTER)
 	$(OCAMLOPT) -o $@  $(OPTLINKFLAGS) $^
 
+coinst_converter.byte: $(CONVERTER:.cmx=.cmo)
+	$(OCAMLC) -o $@  $(OPTLINKFLAGS) $^
+
 jsviewer.js: jsviewer.byte
 	js_of_ocaml $^ -pretty
 
@@ -38,7 +46,7 @@
 	rm -f dot_parser.ml dot_parser.mli dot_lexer.ml
 
 clean::
-	rm -f coinst_converter coinst_viewer coinst_viewer.byte
+	rm -f coinst_converter coinst_viewer coinst_viewer.byte coinst_converter.byte
 	rm -f jsviewer.js jsviewer.byte
 	rm -f dot_lexer.ml dot_parser.ml