Skip to content

Commit

Permalink
make version correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongbo Zhang committed May 12, 2016
1 parent 6c8abbc commit bea88d1
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,17 @@ bin/*

# for npm publish
!bin/bsc
!bin/ocaml
!bin/ocamldep
!bin/ocamldep.opt
!bin/ocamlyacc
!bin/ocamllex.opt
!bin/ocamllex
!bin/ocamlobjinfo
!bin/ocamlopt
!bin/ocamlopt.opt
!bin/ocamlrun
!bin/ocamlc
!bin/ocamlc.opt

!ocaml.tar.gz
3 changes: 3 additions & 0 deletions bin/ocaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlc.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamldep
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamldep.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamllex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamllex.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlobjinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlopt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlopt.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
3 changes: 3 additions & 0 deletions bin/ocamlyacc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
echo "PLEASE RUN NPM POSTINSTALL TO GET BSC BINARY"
exit 2
33 changes: 30 additions & 3 deletions jscomp/js_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,31 @@

open Config
open Clflags
open Compenv
(* open Compenv *)

let output_prefix = Compenv.output_prefix
let readenv = Compenv.readenv
let first_ccopts = Compenv.first_ccopts
let first_ppx = Compenv.first_ppx

let bs_version_string =
"BuckleScript " ^ Js_config.version ^
" (Using OCaml" ^ Config.version ^ " )"

let print_version_and_library compiler =
Printf.printf "The OCaml %s, version " compiler;
print_string bs_version_string; print_newline();
print_string "Standard library directory: ";
print_string Config.standard_library; print_newline();
exit 0

let print_standard_library = Compenv.print_standard_library

let print_version_string () =
print_string bs_version_string;
print_newline ();
exit 0



let process_interface_file ppf name =
Expand Down Expand Up @@ -131,11 +155,14 @@ end)

let add_include_path s =
let (//) = Filename.concat in
(*TODO: check its existence *)
let path =
Ext_filename.resolve
(Lazy.force Ext_filename.cwd) s // "lib"// "ocaml" in
Clflags.include_dirs := path :: ! Clflags.include_dirs
if Ext_sys.is_directory_no_exn path then
Clflags.include_dirs := path :: ! Clflags.include_dirs
else
Ext_pervasives.failwithf "%s is not a directory" s


let buckle_script_flags =
("-js-npm-output-path", Arg.String Js_config.set_npm_package_path,
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
"url": "git+https://github.com/bloomberg/bucklescript.git"
},
"bin" : {
"bsc" : "./bin/bsc"
"bsc" : "./bin/bsc",
"ocaml": "./bin/ocaml",
"ocamlc":"./bin/ocamlc.opt",
"ocamldep" : "./bin/ocamldep.opt",
"ocamllex" : "./bin/ocamllex.opt",
"ocamlobjinfo" : "./bin/ocamlobjinfo",
"ocamlopt.opt" : "./bin/ocamlopt",
"ocamlrun": "./bin/ocamlrun",
"ocamlyacc" : "./bin/ocamlyacc"
} ,
"keywords": [
"ocaml",
Expand Down

0 comments on commit bea88d1

Please sign in to comment.