summaryrefslogtreecommitdiff
path: root/testsuite/tests/tool-ocamldep-modalias/main.ml
blob: 18fe38e9e88877da3bc154ed06cf699212989c35 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
(* TEST
 readonly_files = "A.ml B.ml C.ml D.ml lib_impl.ml lib.mli Makefile.build Makefile.build2";
 set sources = "A.ml B.ml C.ml D.ml";
 set links = "LibA.ml LibB.ml LibC.ml LibD.ml";
 set stdlib = "-nostdlib -I ${ocamlsrcdir}/stdlib";
 set OCAMLC = "${ocamlrun} ${ocamlc_byte} ${stdlib}";
 set OCAMLOPT = "${ocamlrun} ${ocamlopt_byte} ${stdlib}";
 {
   compiler_directory_suffix = ".depend.mk";
   compiler_output = "${test_build_directory}/depend.mk";
   setup-ocamlc.byte-build-env;
   src = "A.ml";
   dst = "LibA.ml";
   copy;
   src = "B.ml";
   dst = "LibB.ml";
   copy;
   src = "C.ml";
   dst = "LibC.ml";
   copy;
   src = "D.ml";
   dst = "LibD.ml";
   copy;
   src = "lib_impl.ml";
   dst = "lib.ml";
   copy;
   commandline = "-depend -as-map lib.ml lib.mli";
   ocamlc.byte;
   commandline = "-depend -map lib.ml -open Lib ${links}";
   ocamlc.byte;
   compiler_reference = "${test_source_directory}/depend.mk.reference";
   check-ocamlc.byte-output;
   hasunix;
   script = "rm -f ${links}";
   script;
   script = "${MAKE} -f Makefile.build byte";
   script;
   native-compiler;
   script = "${MAKE} -f Makefile.build opt";
   script;
 }{
   compiler_directory_suffix = ".depend.mk2";
   compiler_output = "${test_build_directory}/depend.mk2";
   setup-ocamlc.byte-build-env;
   src = "A.ml";
   dst = "LibA.ml";
   copy;
   src = "B.ml";
   dst = "LibB.ml";
   copy;
   src = "C.ml";
   dst = "LibC.ml";
   copy;
   src = "D.ml";
   dst = "LibD.ml";
   copy;
   commandline = "-depend -map lib.mli -open Lib ${links}";
   ocamlc.byte;
   compiler_reference = "${test_source_directory}/depend.mk2.reference";
   check-ocamlc.byte-output;
   hasunix;
   script = "rm -f ${links}";
   script;
   script = "${MAKE} -f Makefile.build2 byte";
   script;
   native-compiler;
   script = "${MAKE} -f Makefile.build2 opt";
   script;
 }{
   compiler_directory_suffix = ".depend.mod";
   setup-ocamlc.byte-build-env;
   src = "A.ml";
   dst = "LibA.ml";
   copy;
   src = "B.ml";
   dst = "LibB.ml";
   copy;
   src = "C.ml";
   dst = "LibC.ml";
   copy;
   src = "D.ml";
   dst = "LibD.ml";
   copy;
   src = "lib_impl.ml";
   dst = "lib.ml";
   copy;
   commandline = "-depend -as-map -modules lib.ml lib.mli";
   ocamlc.byte;
   commandline = "-depend -modules -map lib.ml -open Lib ${links}";
   ocamlc.byte;
   compiler_reference = "${test_source_directory}/depend.mod.reference";
   check-ocamlc.byte-output;
 }{
   compiler_directory_suffix = ".depend.mod2";
   setup-ocamlc.byte-build-env;
   src = "A.ml";
   dst = "LibA.ml";
   copy;
   src = "B.ml";
   dst = "LibB.ml";
   copy;
   src = "C.ml";
   dst = "LibC.ml";
   copy;
   src = "D.ml";
   dst = "LibD.ml";
   copy;
   commandline = "-depend -modules -map lib.mli ${links}";
   ocamlc.byte;
   compiler_reference = "${test_source_directory}/depend.mod2.reference";
   check-ocamlc.byte-output;
 }{
   compiler_directory_suffix = ".depend.mod3";
   setup-ocamlc.byte-build-env;
   src = "A.ml";
   dst = "LibA.ml";
   copy;
   src = "B.ml";
   dst = "LibB.ml";
   copy;
   src = "C.ml";
   dst = "LibC.ml";
   copy;
   src = "D.ml";
   dst = "LibD.ml";
   copy;
   commandline = "-depend -modules -as-map -map lib.mli -open Lib ${links}";
   ocamlc.byte;
   compiler_reference = "${test_source_directory}/depend.mod3.reference";
   check-ocamlc.byte-output;
 }
*)

open Lib

let () = Printf.printf "B.g 3 = %d\n%!" (B.g 3)