aboutsummaryrefslogtreecommitdiff
blob: 91444f1d923fb9acdfc61bbf99906ca0533177ca (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
diff -Naur ocamlgraph-1.1-orig/Makefile.in ocamlgraph-1.1-ptch/Makefile.in
--- ocamlgraph-1.1-orig/Makefile.in	2009-06-23 13:05:21.000000000 +0000
+++ ocamlgraph-1.1-ptch/Makefile.in	2009-07-20 17:31:08.000000000 +0000
@@ -143,10 +143,13 @@
 
 viewer: $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.$(OCAMLBEST)
 
+ifeq (@LABLGNOMECANVAS@,yes)
 VIEWER_CMO=viewGraph viewGraph_select viewGraph_utils viewGraph_test
 VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO))
+endif
 VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx)
 VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi)
+VIEWER_O=$(VIEWER_CMO:.cmo=.o)
 
 VIEWER_INCLUDES= @INCLUDEGTK2@ -I $(VIEWER_DIR) $(INCLUDES) -I .
 
@@ -240,49 +243,38 @@
 
 DESTDIR	=
 
-install: install-$(OCAMLBEST) install-byte
-ifeq (@LABLGNOMECANVAS@,yes)
-ifeq ($(OCAMLBEST),byte)
-	cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE)
-	cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE)
+ifdef OCAMLFIND
+install-findlib: META install-bin
+	mkdir -p $(DESTDIR)/$(OCAMLLIB)
+ifeq ($(OCAMLBEST),opt)
+	$(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli view_graph/viewGraph_test.ml \
+		graph$(LIBEXT) graph.cmx graph.o graph.cmo graph.cmi $(CMA) $(CMXA) \
+		$(VIEWER_CMX) $(VIEWER_CMO) $(VIEWER_CMI) $(VIEWER_O)
 else
-	cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE)
-	cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE)
+	$(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli \
+		graph.cmo graph.cmi $(CMA) view_graph/viewGraph_test.ml \
+		$(VIEWER_CMO) $(VIEWER_CMI)
 endif
 endif
 
-install-byte: 
-	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 $(VIEWER_DIR)/viewgraph.byte $(BINDIR)/graph-viewer.byte
-endif
-
-install-opt: install-byte
-	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 $(VIEWER_DIR)/viewgraph.opt $(BINDIR)/graph-viewer.opt
-endif
+META: META.in Makefile
+	sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
+		$@.in > $@
 
-install-findlib: META
-ifdef OCAMLFIND
+install-bin:
 ifeq (@LABLGNOMECANVAS@,yes)
-	$(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
-		graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
-		$(VIEWER_CMX) $(VIEWER_CMO)
+	mkdir -p $(DESTDIR)/$(BINDIR)
+	cp -f $(ED_DIR)/editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte
+	cp -f $(VIEWER_DIR)/viewgraph.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte
+ifeq ($(OCAMLBEST),opt)
+	cp -f $(ED_DIR)/editor.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
+	cp -f $(VIEWER_DIR)/viewgraph.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
 else
-	$(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
-		graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA)
+	mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
+	mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
 endif
 endif
 
-META: META.in Makefile
-	sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
-		$@.in > $@
-
 # documentation
 ###############
 
@@ -298,7 +290,7 @@
 	mkdir -p doc
 	rm -f doc/*
 	$(OCAMLDOC) -d doc -html $(INCLUDES) $(DOC_SRC)
-	$(MAKE) -C $(VIEWER_DIR) doc
+	#$(MAKE) -C $(VIEWER_DIR) doc
 
 # literate programming
 $(NAME).tex: $(DOC_SRC)
@@ -336,7 +328,7 @@
 
 export: source export-doc export-web export-delaunay
 
-source: 
+source: svn-clean
 	mkdir -p export
 	cd export; rm -rf $(EXPORTDIR)
 	mkdir -p export/$(EXPORTDIR)/bin
@@ -345,10 +337,10 @@
 	cp export/$(TAR).gz $(FTP)
 	cp README FAQ CREDITS COPYING LICENSE CHANGES $(EXAMPLES) $(FTP)
 
-# Build and install the .tar.gz requiered by Frama-C
+# Build and install the .tar.gz required by Frama-C
 framac: EXPORTDIR=ocamlgraph
 framac: FTP=$$HOME/frama-c
-framac:
+framac: svn-clean
 	mkdir -p export
 	cd export; rm -rf $(EXPORTDIR)
 	mkdir -p export/$(EXPORTDIR)/bin
@@ -441,20 +433,22 @@
 #######
 
 clean:
-	rm -f *~
+	-$(RM) *~
 	for d in $(SRCDIR) $(LIBDIR) $(ED_DIR) $(VIEWER_DIR) tests examples; \
 	do \
-	  rm -f $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
+	  $(RM) $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
 	done
-	rm -f $(GENERATED) $(SRCDIR)/dot_parser.output
-	rm -f graph.*a graph.cm* graph.o graph$(LIBEXT) 
-	rm -f $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
-	rm -f $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
-	rm -f *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
-	rm -f $(EXAMPLESBIN)
+	-$(RM) $(GENERATED) $(SRCDIR)/dot_parser.output
+	-$(RM) graph.*a graph.cm* graph.o graph$(LIBEXT) 
+	-$(RM) $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
+	-$(RM) $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
+	-$(RM) *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
+	-$(RM) $(EXAMPLESBIN)
 
 dist-clean distclean:: clean
-	rm -f Makefile config.cache config.log config.status *.byte *.opt
+	-$(RM) Makefile config.cache config.log config.status *.byte *.opt
+	-$(RM) src/version.ml 
+	-$(RM) .depend
 
 svnclean svn-clean:: dist-clean
 	rm -f config.* configure configure.lineno