guix-more/ocaml-piqilib-fix-makefile.patch

ocaml-piqilib-fix-makefile.patch

1
From 336e69d6882a1b8d725c43f1c2e340ef4464bac5 Mon Sep 17 00:00:00 2001
2
From: Julien Lepiller <julien@lepiller.eu>
3
Date: Sat, 31 Dec 2016 11:21:14 +0100
4
Subject: [PATCH] fix OCAMLPATH in makefile
5
6
---
7
 Makefile            | 2 +-
8
 make/Makefile.ocaml | 3 ++-
9
 2 files changed, 3 insertions(+), 2 deletions(-)
10
11
diff --git a/Makefile b/Makefile
12
index 4db87da..9315887 100644
13
--- a/Makefile
14
+++ b/Makefile
15
@@ -23,7 +23,7 @@ OCAMLFIND_DESTDIR := $(shell cygpath -w $(OCAMLFIND_DESTDIR))
16
 endif
17
 export OCAMLFIND_DESTDIR
18
19
-OCAMLPATH := $(PIQI_ROOT)/deps
20
+OCAMLPATH := $(OCAMLPATH):$(PIQI_ROOT)/deps
21
 ifeq ($(SYSTEM),$(filter $(SYSTEM),mingw mingw64))
22
 OCAMLPATH := $(shell cygpath -w $(OCAMLPATH))
23
 endif
24
diff --git a/make/Makefile.ocaml b/make/Makefile.ocaml
25
index 2b6324d..b82c041 100644
26
--- a/make/Makefile.ocaml
27
+++ b/make/Makefile.ocaml
28
@@ -1,7 +1,7 @@
29
 OCAMLMAKEFILE := $(PIQI_ROOT)/make/OCamlMakefile
30
31
32
-OCAMLPATH := $(PIQI_BUILD)/lib/ocaml
33
+OCAMLPATH := $(OCAMLPATH):$(PIQI_BUILD)/lib/ocaml
34
 ifeq ($(SYSTEM),$(filter $(SYSTEM),mingw mingw64))
35
 OCAMLPATH := $(shell cygpath -w $(OCAMLPATH))
36
 endif
37
@@ -23,6 +23,7 @@ post_target::
38
39
40
 .ml.mli: $(EXTRADEPS)
41
+			echo $(OCAMLPATH)
42
 			$(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
43
 			if [ -z "$$pp" ]; then \
44
 			  $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
45
--
46
2.11.0
47
48