Skip to content

Commit 4d56699

Browse files
author
Hongbo Zhang
committed
now we have our own compiler driver, needs to update the build system as well
1 parent 7fc62b9 commit 4d56699

14 files changed

+613
-369
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Note that you have to clone this project with `--recursive` option, as the core
105105

106106
Then compile it with `osc`
107107
```sh
108-
OCAML_RAW_JS=1 osc -I . -I ../ -c hello.ml
108+
osc -I . -I ../ -c hello.ml
109109
```
110110

111111
It should generate a file called `hello.js`, which can be executed with any JavaScript engine. In this example, we use Node.js
@@ -143,8 +143,6 @@ We plan to provide a Windows installer in the near future.
143143

144144
The [OCaml](./ocaml) directory is the official OCaml compiler (version 4.02.3). Refer to its copyright and license notices for information about its licensing.
145145

146-
The `ocamlscript` backend relies on a patch [(js.diff)](./js.diff) to the OCaml compiler.
147-
148146
This project reused and adapted parts of [js_of_ocaml](https://github.com/ocsigen/js_of_ocaml):
149147
* Some small printing utilities in [pretty printer](./jscomp/js_dump.ml).
150148
* Part of the [Javascript runtime](./jscomp/runtime) support

jscomp/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ lam_fold.ml: lambda_fold.mlp lambda.mlp
2222

2323
./bin/osc: _build/compiler.cmxa
2424
echo "Linking"
25-
$(NATIVE) -g -linkall -o $@ -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa $^ main.cmx 2>>build.compile
25+
$(NATIVE) -g -linkall -o $@ -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa $^ 2>>build.compile
2626
# Note: we can remove main.cmx since we have js_main.cmx which use [js_implementation.implementation],
2727
# The motivation is to save compilation time and in the future, more freedom to add new
2828
# compilation flags (since we don't need bytecode anymore)
@@ -49,7 +49,7 @@ snapshotcmj:
4949
releasebuild:
5050
@echo "Make release compiler"
5151
$(NATIVE) -I +compiler-libs -I bin -c bin/compiler.mli bin/compiler.ml
52-
$(NATIVE) -g -linkall -o bin/osc -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa bin/compiler.cmx main.cmx
52+
$(NATIVE) -g -linkall -o bin/osc -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa bin/compiler.cmx
5353

5454
stdlib:
5555
cd stdlib && ./build.sh

jscomp/Makefile.shared

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ CAMLLEX=ocamllex.opt
44
CAMLOPT=ocamlopt.opt
55

66

7-
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
7+
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx .cmj
88

99
print-% : ; @echo $* = $($*)

jscomp/bin/compiler.ml

+346-93
Large diffs are not rendered by default.

jscomp/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ TARGET=a
3434
echo ">>EACH FILE TESTING" >> build.compile
3535
cd ./test/
3636
# ./build.sh 2>> ../build.compile
37-
make $TARGET.cmo 2>> ../build.compile
37+
make $TARGET.cmj 2>> ../build.compile
3838

3939
cat $TARGET.js >> ../build.compile
4040
make -j30 all 2>>../build.compile

jscomp/compiler.mllib

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ js_pass_flatten
8585
js_number
8686
j_helper
8787
js_cmj_datasets
88-
# js_main
88+
js_main

jscomp/runtime/.depend

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ caml_string.cmx : caml_string.cmi
1010
curry.cmo :
1111
curry.cmx :
1212
caml_array.cmo : caml_array.cmi
13-
caml_array.cmo : caml_array.cmi
14-
caml_oo.cmo : caml_oo.cmi
13+
caml_array.cmj : caml_array.cmi
1514
caml_oo.cmo : caml_oo.cmi
15+
caml_oo.cmj : caml_oo.cmi
1616
caml_string.cmo : caml_string.cmi
17-
caml_string.cmo : caml_string.cmi
18-
curry.cmo :
17+
caml_string.cmj : caml_string.cmi
1918
curry.cmo :
19+
curry.cmj :

jscomp/runtime/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ CAMLC=../bin/osc
44
# INCLUDES= -I ../stdlib
55
SOURCE_LIST := $(shell cat runtime.mllib)
66

7-
RUNTIME := $(addsuffix .cmo, $(SOURCE_LIST))
7+
RUNTIME := $(addsuffix .cmj, $(SOURCE_LIST))
88

99
$(RUNTIME): $(CAMLC)
1010

1111
all: $(RUNTIME)
1212

1313

1414

15-
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
15+
.SUFFIXES: .mli .ml .cmi .cmj .cmx .p.cmx .js
1616

1717
clean::
1818
rm -f *.cm*
@@ -23,12 +23,12 @@ clean::
2323
.mli.cmi:
2424
$(CAMLC) $(INCLUDES) $(COMPFLAGS) -c $<
2525

26-
.ml.cmo:
26+
.ml.cmj:
2727
$(CAMLC) $(INCLUDES) $(COMPFLAGS) -c $<
2828

2929
-include .depend
3030

3131
depend:
3232
$(CAMLDEP) $(INCLUDES) *.mli *.ml > .depend
33-
$(CAMLDEP) $(INCLUDES) *.ml | sed -e 's/\.cmx/.cmo/g' >>.depend
33+
$(CAMLDEP) $(INCLUDES) *.ml | sed -e 's/\.cmx/.cmj/g' >>.depend
3434

jscomp/stdlib/.depend

+55-55
Original file line numberDiff line numberDiff line change
@@ -175,127 +175,127 @@ weak.cmo : sys.cmi obj.cmi hashtbl.cmi array.cmi weak.cmi
175175
weak.cmx : sys.cmx obj.cmx hashtbl.cmx array.cmx weak.cmi
176176
arg.cmo : sys.cmi string.cmi printf.cmi list.cmi buffer.cmi array.cmi \
177177
arg.cmi
178-
arg.cmo : sys.cmo string.cmo printf.cmo list.cmo buffer.cmo array.cmo \
178+
arg.cmj : sys.cmj string.cmj printf.cmj list.cmj buffer.cmj array.cmj \
179179
arg.cmi
180180
array.cmo : array.cmi
181-
array.cmo : array.cmi
181+
array.cmj : array.cmi
182182
arrayLabels.cmo : array.cmi arrayLabels.cmi
183-
arrayLabels.cmo : array.cmo arrayLabels.cmi
183+
arrayLabels.cmj : array.cmj arrayLabels.cmi
184184
buffer.cmo : sys.cmi string.cmi bytes.cmi buffer.cmi
185-
buffer.cmo : sys.cmo string.cmo bytes.cmo buffer.cmi
185+
buffer.cmj : sys.cmj string.cmj bytes.cmj buffer.cmi
186186
bytes.cmo : pervasives.cmi list.cmi char.cmi bytes.cmi
187-
bytes.cmo : pervasives.cmo list.cmo char.cmo bytes.cmi
187+
bytes.cmj : pervasives.cmj list.cmj char.cmj bytes.cmi
188188
bytesLabels.cmo : bytes.cmi bytesLabels.cmi
189-
bytesLabels.cmo : bytes.cmo bytesLabels.cmi
189+
bytesLabels.cmj : bytes.cmj bytesLabels.cmi
190190
callback.cmo : obj.cmi callback.cmi
191-
callback.cmo : obj.cmo callback.cmi
191+
callback.cmj : obj.cmj callback.cmi
192192
camlinternalFormat.cmo : sys.cmi string.cmi char.cmi \
193193
camlinternalFormatBasics.cmi bytes.cmi buffer.cmi camlinternalFormat.cmi
194-
camlinternalFormat.cmo : sys.cmo string.cmo char.cmo \
195-
camlinternalFormatBasics.cmo bytes.cmo buffer.cmo camlinternalFormat.cmi
196-
camlinternalFormatBasics.cmo : camlinternalFormatBasics.cmi
194+
camlinternalFormat.cmj : sys.cmj string.cmj char.cmj \
195+
camlinternalFormatBasics.cmj bytes.cmj buffer.cmj camlinternalFormat.cmi
197196
camlinternalFormatBasics.cmo : camlinternalFormatBasics.cmi
197+
camlinternalFormatBasics.cmj : camlinternalFormatBasics.cmi
198198
camlinternalLazy.cmo : obj.cmi camlinternalLazy.cmi
199-
camlinternalLazy.cmo : obj.cmo camlinternalLazy.cmi
199+
camlinternalLazy.cmj : obj.cmj camlinternalLazy.cmi
200200
camlinternalMod.cmo : obj.cmi camlinternalOO.cmi array.cmi \
201201
camlinternalMod.cmi
202-
camlinternalMod.cmo : obj.cmo camlinternalOO.cmo array.cmo \
202+
camlinternalMod.cmj : obj.cmj camlinternalOO.cmj array.cmj \
203203
camlinternalMod.cmi
204204
camlinternalOO.cmo : sys.cmi string.cmi obj.cmi map.cmi list.cmi char.cmi \
205205
array.cmi camlinternalOO.cmi
206-
camlinternalOO.cmo : sys.cmo string.cmo obj.cmo map.cmo list.cmo char.cmo \
207-
array.cmo camlinternalOO.cmi
206+
camlinternalOO.cmj : sys.cmj string.cmj obj.cmj map.cmj list.cmj char.cmj \
207+
array.cmj camlinternalOO.cmi
208208
char.cmo : char.cmi
209-
char.cmo : char.cmi
210-
complex.cmo : complex.cmi
209+
char.cmj : char.cmi
211210
complex.cmo : complex.cmi
211+
complex.cmj : complex.cmi
212212
digest.cmo : string.cmi char.cmi bytes.cmi digest.cmi
213-
digest.cmo : string.cmo char.cmo bytes.cmo digest.cmi
213+
digest.cmj : string.cmj char.cmj bytes.cmj digest.cmi
214214
filename.cmo : sys.cmi string.cmi random.cmi printf.cmi lazy.cmi buffer.cmi \
215215
filename.cmi
216-
filename.cmo : sys.cmo string.cmo random.cmo printf.cmo lazy.cmo buffer.cmo \
216+
filename.cmj : sys.cmj string.cmj random.cmj printf.cmj lazy.cmj buffer.cmj \
217217
filename.cmi
218218
format.cmo : string.cmi pervasives.cmi camlinternalFormatBasics.cmi \
219219
camlinternalFormat.cmi buffer.cmi format.cmi
220-
format.cmo : string.cmo pervasives.cmo camlinternalFormatBasics.cmo \
221-
camlinternalFormat.cmo buffer.cmo format.cmi
220+
format.cmj : string.cmj pervasives.cmj camlinternalFormatBasics.cmj \
221+
camlinternalFormat.cmj buffer.cmj format.cmi
222222
gc.cmo : sys.cmi printf.cmi gc.cmi
223-
gc.cmo : sys.cmo printf.cmo gc.cmi
223+
gc.cmj : sys.cmj printf.cmj gc.cmi
224224
genlex.cmo : string.cmi stream.cmi list.cmi hashtbl.cmi char.cmi bytes.cmi \
225225
genlex.cmi
226-
genlex.cmo : string.cmo stream.cmo list.cmo hashtbl.cmo char.cmo bytes.cmo \
226+
genlex.cmj : string.cmj stream.cmj list.cmj hashtbl.cmj char.cmj bytes.cmj \
227227
genlex.cmi
228228
hashtbl.cmo : sys.cmi string.cmi random.cmi obj.cmi lazy.cmi array.cmi \
229229
hashtbl.cmi
230-
hashtbl.cmo : sys.cmo string.cmo random.cmo obj.cmo lazy.cmo array.cmo \
230+
hashtbl.cmj : sys.cmj string.cmj random.cmj obj.cmj lazy.cmj array.cmj \
231231
hashtbl.cmi
232232
int32.cmo : pervasives.cmi int32.cmi
233-
int32.cmo : pervasives.cmo int32.cmi
233+
int32.cmj : pervasives.cmj int32.cmi
234234
int64.cmo : pervasives.cmi int64.cmi
235-
int64.cmo : pervasives.cmo int64.cmi
235+
int64.cmj : pervasives.cmj int64.cmi
236236
lazy.cmo : obj.cmi camlinternalLazy.cmi lazy.cmi
237-
lazy.cmo : obj.cmo camlinternalLazy.cmo lazy.cmi
237+
lazy.cmj : obj.cmj camlinternalLazy.cmj lazy.cmi
238238
lexing.cmo : sys.cmi string.cmi bytes.cmi array.cmi lexing.cmi
239-
lexing.cmo : sys.cmo string.cmo bytes.cmo array.cmo lexing.cmi
240-
list.cmo : list.cmi
239+
lexing.cmj : sys.cmj string.cmj bytes.cmj array.cmj lexing.cmi
241240
list.cmo : list.cmi
241+
list.cmj : list.cmi
242242
listLabels.cmo : list.cmi listLabels.cmi
243-
listLabels.cmo : list.cmo listLabels.cmi
244-
map.cmo : map.cmi
243+
listLabels.cmj : list.cmj listLabels.cmi
245244
map.cmo : map.cmi
245+
map.cmj : map.cmi
246246
marshal.cmo : bytes.cmi marshal.cmi
247-
marshal.cmo : bytes.cmo marshal.cmi
247+
marshal.cmj : bytes.cmj marshal.cmi
248248
moreLabels.cmo : set.cmi map.cmi hashtbl.cmi moreLabels.cmi
249-
moreLabels.cmo : set.cmo map.cmo hashtbl.cmo moreLabels.cmi
249+
moreLabels.cmj : set.cmj map.cmj hashtbl.cmj moreLabels.cmi
250250
nativeint.cmo : sys.cmi pervasives.cmi nativeint.cmi
251-
nativeint.cmo : sys.cmo pervasives.cmo nativeint.cmi
251+
nativeint.cmj : sys.cmj pervasives.cmj nativeint.cmi
252252
obj.cmo : marshal.cmi int32.cmi array.cmi obj.cmi
253-
obj.cmo : marshal.cmo int32.cmo array.cmo obj.cmi
253+
obj.cmj : marshal.cmj int32.cmj array.cmj obj.cmi
254254
oo.cmo : camlinternalOO.cmi oo.cmi
255-
oo.cmo : camlinternalOO.cmo oo.cmi
255+
oo.cmj : camlinternalOO.cmj oo.cmi
256256
parsing.cmo : obj.cmi lexing.cmi array.cmi parsing.cmi
257-
parsing.cmo : obj.cmo lexing.cmo array.cmo parsing.cmi
257+
parsing.cmj : obj.cmj lexing.cmj array.cmj parsing.cmi
258258
pervasives.cmo : camlinternalFormatBasics.cmi pervasives.cmi
259-
pervasives.cmo : camlinternalFormatBasics.cmo pervasives.cmi
259+
pervasives.cmj : camlinternalFormatBasics.cmj pervasives.cmi
260260
printexc.cmo : printf.cmi pervasives.cmi obj.cmi buffer.cmi array.cmi \
261261
printexc.cmi
262-
printexc.cmo : printf.cmo pervasives.cmo obj.cmo buffer.cmo array.cmo \
262+
printexc.cmj : printf.cmj pervasives.cmj obj.cmj buffer.cmj array.cmj \
263263
printexc.cmi
264264
printf.cmo : camlinternalFormatBasics.cmi camlinternalFormat.cmi buffer.cmi \
265265
printf.cmi
266-
printf.cmo : camlinternalFormatBasics.cmo camlinternalFormat.cmo buffer.cmo \
266+
printf.cmj : camlinternalFormatBasics.cmj camlinternalFormat.cmj buffer.cmj \
267267
printf.cmi
268268
queue.cmo : obj.cmi queue.cmi
269-
queue.cmo : obj.cmo queue.cmi
269+
queue.cmj : obj.cmj queue.cmi
270270
random.cmo : string.cmi pervasives.cmi nativeint.cmi int64.cmi int32.cmi \
271271
digest.cmi char.cmi array.cmi random.cmi
272-
random.cmo : string.cmo pervasives.cmo nativeint.cmo int64.cmo int32.cmo \
273-
digest.cmo char.cmo array.cmo random.cmi
272+
random.cmj : string.cmj pervasives.cmj nativeint.cmj int64.cmj int32.cmj \
273+
digest.cmj char.cmj array.cmj random.cmi
274274
scanf.cmo : string.cmi printf.cmi pervasives.cmi list.cmi \
275275
camlinternalFormatBasics.cmi camlinternalFormat.cmi bytes.cmi buffer.cmi \
276276
scanf.cmi
277-
scanf.cmo : string.cmo printf.cmo pervasives.cmo list.cmo \
278-
camlinternalFormatBasics.cmo camlinternalFormat.cmo bytes.cmo buffer.cmo \
277+
scanf.cmj : string.cmj printf.cmj pervasives.cmj list.cmj \
278+
camlinternalFormatBasics.cmj camlinternalFormat.cmj bytes.cmj buffer.cmj \
279279
scanf.cmi
280280
set.cmo : list.cmi set.cmi
281-
set.cmo : list.cmo set.cmi
281+
set.cmj : list.cmj set.cmi
282282
sort.cmo : array.cmi sort.cmi
283-
sort.cmo : array.cmo sort.cmi
283+
sort.cmj : array.cmj sort.cmi
284284
stack.cmo : list.cmi stack.cmi
285-
stack.cmo : list.cmo stack.cmi
285+
stack.cmj : list.cmj stack.cmi
286286
stdLabels.cmo : stringLabels.cmi listLabels.cmi bytesLabels.cmi \
287287
arrayLabels.cmi stdLabels.cmi
288-
stdLabels.cmo : stringLabels.cmo listLabels.cmo bytesLabels.cmo \
289-
arrayLabels.cmo stdLabels.cmi
290-
std_exit.cmo :
288+
stdLabels.cmj : stringLabels.cmj listLabels.cmj bytesLabels.cmj \
289+
arrayLabels.cmj stdLabels.cmi
291290
std_exit.cmo :
291+
std_exit.cmj :
292292
stream.cmo : string.cmi obj.cmi list.cmi lazy.cmi bytes.cmi stream.cmi
293-
stream.cmo : string.cmo obj.cmo list.cmo lazy.cmo bytes.cmo stream.cmi
293+
stream.cmj : string.cmj obj.cmj list.cmj lazy.cmj bytes.cmj stream.cmi
294294
string.cmo : pervasives.cmi list.cmi bytes.cmi string.cmi
295-
string.cmo : pervasives.cmo list.cmo bytes.cmo string.cmi
295+
string.cmj : pervasives.cmj list.cmj bytes.cmj string.cmi
296296
stringLabels.cmo : string.cmi stringLabels.cmi
297-
stringLabels.cmo : string.cmo stringLabels.cmi
298-
sys.cmo : sys.cmi
297+
stringLabels.cmj : string.cmj stringLabels.cmi
299298
sys.cmo : sys.cmi
299+
sys.cmj : sys.cmi
300300
weak.cmo : sys.cmi obj.cmi hashtbl.cmi array.cmi weak.cmi
301-
weak.cmo : sys.cmo obj.cmo hashtbl.cmo array.cmo weak.cmi
301+
weak.cmj : sys.cmj obj.cmj hashtbl.cmj array.cmj weak.cmi

jscomp/stdlib/Compflags

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
#########################################################################
1414

1515
case $1 in
16-
pervasives.cm[iox]|pervasives.p.cmx) echo ' -nopervasives';;
16+
pervasives.cm[ioxj]|pervasives.p.cmx) echo ' -nopervasives';;
1717
camlinternalOO.cmi) echo ' -nopervasives';;
1818
camlinternalOO.cmx|camlinternalOO.p.cmx) echo ' -inline 0';;
1919
buffer.cmx|buffer.p.cmx) echo ' -inline 3';;
2020
# make sure add_char is inlined (PR#5872)
21-
buffer.cm[io]) echo ' -w A';;
22-
camlinternalFormat.cm[io]) echo ' -w Ae';;
23-
camlinternalFormatBasics*.cm[iox]) echo ' -nopervasives';;
24-
printf.cm[io]|format.cm[io]|scanf.cm[io]) echo ' -w Ae';;
21+
buffer.cm[ioj]) echo ' -w A';;
22+
camlinternalFormat.cm[ioj]) echo ' -w Ae';;
23+
camlinternalFormatBasics*.cm[ioxj]) echo ' -nopervasives';;
24+
printf.cm[ioj]|format.cm[ioj]|scanf.cm[ioj]) echo ' -w Ae';;
2525
scanf.cmx|scanf.p.cmx) echo ' -inline 9';;
26-
*Labels.cm[ox]|*Labels.p.cmx) echo ' -nolabels -no-alias-deps';;
26+
*Labels.cm[oxj]|*Labels.p.cmx) echo ' -nolabels -no-alias-deps';;
2727
*) echo ' ';;
2828
esac

jscomp/stdlib/Makefile.shared

+13-15
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ OTHERS=array.cmo list.cmo char.cmo bytes.cmo string.cmo sys.cmo \
4545
arrayLabels.cmo listLabels.cmo bytesLabels.cmo \
4646
stringLabels.cmo moreLabels.cmo stdLabels.cmo
4747

48-
all: $(OBJS) std_exit.cmo $(COMPILER)
48+
all: $(OBJS:.cmo=.cmj) std_exit.cmj $(COMPILER)
4949
# all: stdlib.cma std_exit.cmo
5050
# all: stdlib.cma std_exit.cmo camlheader target_camlheader camlheader_ur
5151

@@ -78,36 +78,34 @@ stdlib.cmxa: $(OBJS:.cmo=.cmx)
7878
clean::
7979
rm -f camlheader target_camlheader camlheader_ur target_camlheaderd
8080

81-
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
81+
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx .cmj
8282

8383
.mli.cmi:
8484
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
8585

86-
.ml.cmo:
86+
.ml.cmj:
8787
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
8888

89-
.ml.cmx:
90-
$(CAMLOPT) $(COMPFLAGS) `./Compflags $@` -c $<
9189

92-
.ml.p.cmx:
93-
$(CAMLOPT) $(COMPFLAGS) `./Compflags $@` -p -c -o $*.p.cmx $<
90+
.ml.p.cmj:
91+
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -p -c -o $*.p.cmj $<
9492

9593
# Dependencies on the compiler
9694
$(OBJS) std_exit.cmo: $(COMPILER)
9795
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
98-
$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER)
99-
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: $(OPTCOMPILER)
96+
$(OBJS:.cmo=.cmj) std_exit.cmj: $(OPTCOMPILER)
97+
$(OBJS:.cmo=.p.cmj) std_exit.p.cmj: $(OPTCOMPILER)
10098

10199
# Dependencies on Pervasives (not tracked by ocamldep)
102100
$(OTHERS) std_exit.cmo: pervasives.cmi
103101
$(OTHERS:.cmo=.cmi) std_exit.cmi: pervasives.cmi
104-
$(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi
105-
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmi
106-
$(OTHERS:.cmo=.cmx) std_exit.cmx: pervasives.cmx
102+
$(OBJS:.cmo=.cmj) std_exit.cmj: pervasives.cmi
103+
$(OBJS:.cmo=.p.cmj) std_exit.p.cmj: pervasives.cmi
104+
$(OTHERS:.cmo=.cmj) std_exit.cmj: pervasives.cmj
107105

108106
# Add missing dependencies
109107
$(OTHERS) std_exit.cmo: pervasives.cmo
110-
$(OTHERS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmx
108+
$(OTHERS:.cmo=.p.cmj) std_exit.p.cmj: pervasives.cmj
111109

112110
clean::
113111
rm -f *.cm* *.$(O) *.$(A)
@@ -119,5 +117,5 @@ include .depend
119117

120118
depend:
121119
$(CAMLDEP) *.mli *.ml > .depend
122-
$(CAMLDEP) *.ml | sed -e 's/\.cmx/.cmo/g' >>.depend
123-
# $(CAMLDEP) *.ml | sed -e 's/\.cmx/.p.cmx/g' >>.depend
120+
$(CAMLDEP) *.ml | sed -e 's/\.cmx/.cmj/g' >>.depend
121+
# $(CAMLDEP) *.ml | sed -e 's/\.cmx/.p.cmj/g' >>.depend

0 commit comments

Comments
 (0)