Skip to content

Commit 45273a8

Browse files
authored
Merge pull request #620 from bloomberg/better_ocaml_pack_for_release
move ocaml_pack tools into normal source distribution
2 parents 9e4d9bc + 04b6a4b commit 45273a8

29 files changed

+3182
-2049
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ _build
3333
*.zip
3434
*.gz
3535
# special file
36-
ocaml_pack
36+
3737
bsc
3838
bscc
39-
ocaml_pack0.ml
40-
ocaml_pack1.ml
39+
jscomp/tools/ocamlpack*
40+
4141
.idea
4242
exports.js
4343
node_modules

jscomp/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ release:snapshot
3636
# TODO: should be done after we do the build
3737
# Carefully check the stored data if it is platform independent
3838

39-
./bin/ocaml_pack: ./bin/ocaml_pack.mli ./bin/ocaml_pack.ml
39+
./bin/ocamlpack: ./bin/ocamlpack.mli ./bin/ocamlpack.ml
4040
$(NATIVE) -w -a -I bin -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
4141

42-
snapshot: ./bin/ocaml_pack snapshotcmj
42+
## order matters
43+
_build/ocamlpack: _build/ext/ext.cmxa _build/common/common.cmxa _build/syntax/pack.cmxa _build/syntax/ocaml_pack_main.cmx
44+
$(NATIVE) -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
45+
46+
snapshot: ./bin/ocamlpack snapshotcmj
4347
$(MAKE) snapshotml
4448

45-
snapshotml:./bin/ocaml_pack ./bin/compiler.mllib
49+
snapshotml:./bin/ocamlpack ./bin/compiler.mllib
4650
@echo "Snapshot ml"
4751
$< bin/compiler.mllib > bin/compiler.ml
4852
snapshotcmj:
@@ -85,14 +89,14 @@ world-test:
8589
cd test && $(MAKE) all
8690
@echo "Making test finsihed"
8791

88-
travis-world-test:./bin/ocaml_pack
92+
travis-world-test:./bin/ocamlpack
8993
@echo "Generating the compiler"
9094
rm -f bin/compiler.ml
91-
./bin/ocaml_pack ./bin/compiler.mllib > bin/compiler.ml
95+
./bin/ocamlpack ./bin/compiler.mllib > bin/compiler.ml
9296
@echo "Generating the compiler finished"
9397
$(MAKE) world-test
9498

95-
# no depend on ./bin/ocaml_pack ./bin/bsc
99+
# no depend on ./bin/ocamlpack ./bin/bsc
96100
# since in npm mode, they are generated from a single file
97101
install:
98102
cp ./bin/bsc ../bin/

jscomp/bin/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ppx_metaquot
2-
ocaml_pack
2+
ocamlpack
33
bsc

0 commit comments

Comments
 (0)