diff --git a/.gitmodules b/.gitmodules index b7c960a76c..a812cdff65 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ path = syntax url = https://github.com/rescript-lang/syntax branch = master +[submodule "ninja"] + path = ninja + url = git@github.com:rescript-lang/ninja.git diff --git a/ninja b/ninja new file mode 160000 index 0000000000..6deefad975 --- /dev/null +++ b/ninja @@ -0,0 +1 @@ +Subproject commit 6deefad975e77cb22d3514f3aff083d8471a2457 diff --git a/scripts/prebuilt.js b/scripts/prebuilt.js index 9367ac6ce8..bbaad81494 100755 --- a/scripts/prebuilt.js +++ b/scripts/prebuilt.js @@ -14,7 +14,7 @@ var hostPlatform = "darwin"; function rebuild() { cp.execSync(`node ${path.join(__dirname, "ninja.js")} cleanbuild`, { cwd: __dirname, - stdio: [0, 1, 2] + stdio: [0, 1, 2], }); } @@ -28,7 +28,7 @@ function buildCompiler() { ? `ocamlopt.opt.exe` : `../native/${ocamlVersion}/bin/ocamlopt.opt`, INCL: ocamlVersion, - isWin: is_windows + isWin: is_windows, }); fs.writeFileSync(path.join(root, "lib", prebuilt), content, "ascii"); @@ -52,12 +52,19 @@ if (!is_windows) { function createOCamlTar() { if (process.platform === hostPlatform) { require("./installUtils.js").install(); + console.log(`status in ocaml submodule:`) cp.execSync(`git -C ocaml status -uno`, { cwd: root, stdio: [0, 1, 2] }); cp.execSync( `git -C ocaml archive --format=tar.gz HEAD -o ../vendor/ocaml.tar.gz`, { cwd: root, stdio: [0, 1, 2] } ); } + console.log(`status in ninja submodule:`) + cp.execSync(`git -C ninja status -uno`, { cwd: root, stdio: [0, 1, 2] }); + cp.execSync( + `git -C ninja archive --format=tar.gz HEAD -o ../vendor/ninja.tar.gz`, + { cwd: root, stdio: [0, 1, 2] } + ); } createOCamlTar(); diff --git a/vendor/ninja.tar.gz b/vendor/ninja.tar.gz deleted file mode 100644 index e60b95537f..0000000000 Binary files a/vendor/ninja.tar.gz and /dev/null differ