Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ libs/ocaml-compiler-clean/parsing/lexer.ml
libs/ocaml-compiler-clean/parsing/linenum.ml
libs/ocaml-compiler-clean/parsing/parser.ml
libs/ocaml-compiler-clean/parsing/parser.mli
_esy
esy.lock
tools/ocp-ide/emacs/ocp-ide.el
tools/ocp-ide/emacs/tmp.el
autom4te.cache
Expand Down
2 changes: 1 addition & 1 deletion libs/ocplib-unix/build.ocp2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ begin
ocaml = ocaml + { bytecomp = []; asmcomp = [] };
ocaml.bytecomp += [ "-w"; "-50" ];
ocaml.asmcomp += [ "-w"; "-50" ];

ocaml.version = autoconf.package_version;
with_ocp_pp = { pp = ocp_pp; pp_requires = [ "ocp-pp:byte" ]; };
ocaml.files = [
Expand Down
2 changes: 2 additions & 0 deletions libs/ocplib-unix/onlyUnix_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ UNAVAILABLE_PRIM(unix_clear_close_on_exec)
UNAVAILABLE_PRIM(unix_closedir)

UNAVAILABLE_PRIM(unix_getppid)
#if (OCAML_VERSION < 4060)
UNAVAILABLE_PRIM(unix_isatty)
#endif
UNAVAILABLE_PRIM(unix_opendir)
UNAVAILABLE_PRIM(unix_readdir)
UNAVAILABLE_PRIM(unix_rewinddir)
Expand Down
7 changes: 3 additions & 4 deletions libs/ocplib-unix/onlyWin32_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ value onlyWin32_getFileInformationByHandle_ml(value handle_v)

value onlyWin32_getFileInformationByName_ml(value filename_v)
{
HANDLE hfile = CreateFile(String_val(filename_v), 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
NULL, OPEN_EXISTING,
HANDLE hfile = CreateFile(String_val(filename_v), 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS, NULL);
value res;

Expand All @@ -253,4 +253,3 @@ value onlyWin32_getFileInformationByName_ml(value filename_v)
uerror("onlyWin32_getFileInformationByName_ml", Nothing);
}
#endif

4 changes: 2 additions & 2 deletions ocp-autoconf.d/build.ocp2inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ List.map (function(pk){
*)

ocaml.bytecomp = [
"-strict-sequence";
"-principal";
"-strict-sequence";
"-principal";
(* "-absname"; *)
"-w"; "+a-4-9-41-42-44-45-48-3-33" (* -3 no-deprecated *)
];
Expand Down
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "ocp-build",
"version": "1.2.0",
"description": "A build manager for OCaml applications",
"contributors": [
"Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>",
"Élie BRAMI <elie.brami@epita.fr>"
],
"license": "LicenseRef-LICENSE",
"esy": {
"build": [
"echo host x86_64-w64-mingw32 can change in future",
"#{self.root}/configure #{os == 'windows' ? '--host x86_64-w64-mingw32' : ''} --prefix #{self.install} --exec-prefix #{self.install} --bindir #{self.install}/bin --libdir #{self.install}/lib --with-ocamldir=#{self.install}/lib/ocaml --datarootdir #{self.install}/share --mandir #{self.install}/share/man",
"make"
],
"install": "make install",
"exportedEnv": {
"PATH": {
"val": "#{self.bin : $PATH}",
"scope": "global"
}
}
},
"dependencies": {
"@opam/ocamlfind": "*",
"@opam/cmdliner": ">=1.0",
"@opam/re": ">=1.7.3"
},
"peerDependencies": {
"ocaml": ">=4.6.0 <4.8.0"
},
"devDependencies": {
"ocaml": ">=4.6.0 <4.8.0"
}
}
3 changes: 3 additions & 0 deletions tools/ocp-build/misc/buildMisc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,11 @@ end = struct
end

let open_for_pipe filename =
MinUnix.openfile filename MinUnix.[O_RDWR; O_APPEND; O_CREAT; O_SHARE_DELETE] 0o777
(*
let oc = open_out_bin filename in
MinUnix.descr_of_out_channel oc
*)

let create_process cmd maybe_chdir stdin stdout stderr =
match cmd with
Expand Down