blob: def0b316dd2582f6d1b10d798f98beb74afc7965 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
diff --git a/src/Makefile b/src/Makefile
index 8a88035..2f191af 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -91,10 +91,10 @@ install:
cp META.in META
$(OCAMLFIND) install num META
rm -f META
- $(INSTALL_DATA) $(TOINSTALL) $(STDLIBDIR)
+ $(INSTALL_DATA) $(TOINSTALL) $(DESTDIR)$(STDLIBDIR)
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
- $(INSTALL_DIR) $(STDLIBDIR)/stublibs
- $(INSTALL_DLL) $(TOINSTALL_STUBS) $(STDLIBDIR)/stublibs
+ $(INSTALL_DIR) $(DESTDIR)$(STDLIBDIR)/stublibs
+ $(INSTALL_DLL) $(TOINSTALL_STUBS) $(DESTDIR)$(STDLIBDIR)/stublibs
endif
findlib-install:
@@ -106,9 +106,9 @@ findlib-uninstall:
$(OCAMLFIND) remove num
uninstall: findlib-uninstall
- cd $(STDLIBDIR) && rm -f $(TOINSTALL)
+ cd $(DESTDIR)$(STDLIBDIR) && rm -f $(TOINSTALL)
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
- cd $(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
+ cd $(DESTDIR)$(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
endif
clean:
diff --git a/toplevel/Makefile b/toplevel/Makefile
index 8c91b0b..48a73ce 100644
--- a/toplevel/Makefile
+++ b/toplevel/Makefile
@@ -1,6 +1,7 @@
OCAMLC=ocamlc
OCAMLDEP=ocamldep
OCAMLFIND=ocamlfind
+STDLIBDIR=$(shell $(OCAMLC) -where)
CAMLCFLAGS=-I ../src -I +compiler-libs \
-w +a-4-9-41-42-44-45-48 -warn-error A \
@@ -22,10 +23,10 @@ TOINSTALL=\
num_top.cma num_top.cmi num_top_printers.cmi
install:
- $(OCAMLFIND) install num-top META $(TOINSTALL)
+ $(OCAMLFIND) install -destdir $(DESTDIR)$(STDLIBDIR) num-top META $(TOINSTALL)
uninstall:
- $(OCAMLFIND) remove num-top
+ $(OCAMLFIND) remove -destdir $(DESTDIR)$(STDLIBDIR) num-top
clean:
rm -f *.cm[ioxta] *.cmx[as] *.cmti
|