aboutsummaryrefslogtreecommitdiff
blob: fd7b8de5c909400f8a97e24e1097b69300ef6feb (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
diff -Naurd ocamlgraph-1.2-orign/Makefile.in ocamlgraph-1.2-patch/Makefile.in
--- ocamlgraph-1.2-orign/Makefile.in	2009-08-31 05:57:53.000000000 +0000
+++ ocamlgraph-1.2-patch/Makefile.in	2009-09-11 13:23:51.000000000 +0000
@@ -31,7 +31,7 @@
 OCAMLDOC = @OCAMLDOC@
 OCAMLLEX = @OCAMLLEX@
 OCAMLYACC= @OCAMLYACC@
-OCAMLLIB = @OCAMLLIB@
+OCAMLLIB = @OCAMLLIB@/ocamlgraph/
 OCAMLBEST= @OCAMLBEST@
 OCAMLVERSION = @OCAMLVERSION@
 OCAMLWEB = @OCAMLWEB@
@@ -147,6 +147,7 @@
 VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO))
 VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx)
 VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi)
+VIEWER_OBJ=$(VIEWER_CMO:.cmo=.o)
 
 VIEWER_INCLUDES= @INCLUDEGTK2@ -I $(VIEWER_DIR) $(INCLUDES) -I .
 
@@ -175,6 +176,7 @@
 DGRAPH_CMO:=$(patsubst %,$(DGRAPH_DIR)/%.cmo, $(DGRAPH_CMO))
 DGRAPH_CMX=$(DGRAPH_CMO:.cmo=.cmx)
 DGRAPH_CMI=$(DGRAPH_CMO:.cmo=.cmi)
+DGRAPH_OBJ=$(DGRAPH_CMO:.cmo=.o)
 
 DGRAPH_INCLUDES= @INCLUDEGTK2@ -I $(DGRAPH_DIR) $(INCLUDES) -I .
 
@@ -270,42 +272,48 @@
 
 install: install-$(OCAMLBEST) install-byte
 ifeq (@LABLGNOMECANVAS@,yes)
+	mkdir -p $(DESTDIR)$(BINDIR)
 ifeq ($(OCAMLBEST),byte)
-	cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE)
-	cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE)
+	ln -s $(BINDIR)/ocamlgraph-editor.byte $(DESTDIR)$(BINDIR)/ocamlgraph-editor$(EXE)
+	ln -s $(BINDIR)/ocamlgraph-viewer.byte $(DESTDIR)$(BINDIR)/ocamlgraph-viewer$(EXE)
 else
-	cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE)
-	cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE)
+	mv $(DESTDIR)$(BINDIR)/ocamlgraph-editor.opt $(DESTDIR)$(BINDIR)/ocamlgraph-editor$(EXE)
+	mv $(DESTDIR)$(BINDIR)/ocamlgraph-viewer.opt $(DESTDIR)$(BINDIR)/ocamlgraph-viewer$(EXE)
 endif
 endif
 
 install-byte: 
+	mkdir -p "$(DESTDIR)$(OCAMLLIB)"
 	cp -f graph.cmo graph.cmi $(CMA) "$(DESTDIR)$(OCAMLLIB)"
 ifeq (@LABLGNOMECANVAS@,yes)
-	cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte
-	cp -f $(VIEWER_CMO) "$(DESTDIR)$(OCAMLLIB)"
-	cp -f $(DGRAPH_CMO) "$(DESTDIR)$(OCAMLLIB)"
-	cp -f $(DGRAPH_DIR)/dgraph.byte $(BINDIR)/graph-viewer.byte
+	mkdir -p $(DESTDIR)$(BINDIR)
+	cp -f $(ED_DIR)/editor.byte $(DESTDIR)$(BINDIR)/ocamlgraph-editor.byte
+	cp -f $(VIEWER_CMO) $(VIEWER_CMI) "$(DESTDIR)$(OCAMLLIB)"
+	cp -f $(DGRAPH_CMO) $(DGRAPH_CMI) "$(DESTDIR)$(OCAMLLIB)"
+	cp -f $(DGRAPH_DIR)/dgraph.byte $(DESTDIR)$(BINDIR)/ocamlgraph-viewer.byte
 endif
 
 install-opt: install-byte
+	mkdir -p "$(DESTDIR)$(OCAMLLIB)"
 	cp -f graph$(LIBEXT) graph.cmx $(CMXA) "$(DESTDIR)$(OCAMLLIB)"
 ifeq (@LABLGNOMECANVAS@,yes)
-	cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt
-	cp -f $(VIEWER_CMX) "$(DESTDIR)$(OCAMLLIB)"
-	cp -f $(DGRAPH_CMX) "$(DESTDIR)$(OCAMLLIB)"
-	cp -f $(DGRAPH_DIR)/dgraph.opt $(BINDIR)/graph-viewer.opt
+	mkdir -p $(DESTDIR)$(BINDIR)
+	cp -f $(ED_DIR)/editor.opt $(DESTDIR)$(BINDIR)/ocamlgraph-editor.opt
+	cp -f $(VIEWER_CMX) $(VIEWER_OBJ) "$(DESTDIR)$(OCAMLLIB)"
+	cp -f $(DGRAPH_CMX) $(DGRAPH_OBJ) "$(DESTDIR)$(OCAMLLIB)"
+	cp -f $(DGRAPH_DIR)/dgraph.opt $(DESTDIR)$(BINDIR)/ocamlgraph-viewer.opt
 endif
 
 install-findlib: META
 ifdef OCAMLFIND
+	mkdir -p $(DESTDIR)/$(OCAMLLIB)
 ifeq (@LABLGNOMECANVAS@,yes)
-	$(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
-		graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
-		$(VIEWER_CMX) $(VIEWER_CMO) $(DGRAPH_CMX) $(DGRAPH_CMO)
+	$(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) \
+		ocamlgraph META $(SRCDIR)/*.mli dgraph/*.mli dgraph/viewer.ml \
+		dgraph/dGraphViewer.ml view_graph/*.mli view_graph/viewGraph_test.ml
 else
-	$(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
-		graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA)
+	$(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) \
+		ocamlgraph META $(SRCDIR)/*.mli
 endif
 endif
 
@@ -328,7 +336,6 @@
 	mkdir -p doc
 	rm -f doc/*
 	$(OCAMLDOC) -d doc -html $(INCLUDES) $(DOC_SRC)
-	$(MAKE) -C $(VIEWER_DIR) doc
 
 # literate programming
 $(NAME).tex: $(DOC_SRC)