forked from camlspotter/opam-repository-mingw
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
packages/menhir/menhir.20180703/files/menhir-20180703.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- ./Makefile | ||
+++ ./Makefile | ||
@@ -60,13 +60,8 @@ | ||
|
||
# If the compiler is MSVC, then object file names end in .obj instead of .o. | ||
|
||
-ifneq (,$(shell ocamlc -config | grep -E "ccomp_type: msvc")) | ||
- OBJ := obj | ||
-# LIBSUFFIX := lib | ||
-else | ||
- OBJ := o | ||
-# LIBSUFFIX := a | ||
-endif | ||
+OBJ := $(shell ocamlc -config | awk -F '[\t \r]+' '/^ext_obj:/ {print $$2}' | tr -d '.') | ||
+#LIBSUFFIX := $(shell ocamlc -config | awk -F '[\t \r]+' '/^ext_lib:/ {print $$2}' | tr -d '.') | ||
|
||
# If we are under Windows (regardless of whether we are using MSVC or mingw) | ||
# then the name of the executable file ends in .exe. | ||
@@ -92,8 +87,9 @@ | ||
# performed if "os_type" is "Win32" or "Win64", and must not be performed if | ||
# "os_type" is "Cygwin" or "Unix". | ||
|
||
-ifneq (,$(shell ocamlc -config | grep -E "os_type: (Win32|Win64)")) | ||
-installation_libdir := $(shell cygpath -m $(libdir)) | ||
+OS_TYPE:= $(shell ocamlc -config | awk -F '[\t \r]+' '/^os_type:/ {print $$2}') | ||
+ifeq ($(OS_TYPE),Win32) | ||
+installation_libdir := $(shell cygpath -m $(libdir) || echo $(libdir)) | ||
else | ||
installation_libdir := $(libdir) | ||
endif | ||
--- ./src/cmly_write.ml | ||
+++ ./src/cmly_write.ml | ||
@@ -168,6 +168,6 @@ | ||
output_value oc (t : grammar) | ||
|
||
let write filename = | ||
- let oc = open_out filename in | ||
+ let oc = open_out_bin filename in | ||
write oc (encode()); | ||
close_out oc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters