The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

no more Makefiles (switch to dune)

and moving unnecessary files out of the repo

+12 -1396
-26
.gitignore
··· 1 - *.cm* 2 - *.annot 3 - *.o 4 - *.install 5 1 .merlin 6 - /.depend 7 2 /META 8 - /Makefile 9 - /autom4te.cache/ 10 - /config.log 11 - /config.status 12 - /configure 13 - /graph.a 14 - /src/dot_lexer.ml 15 - /src/dot_parser.ml 16 - /src/dot_parser.mli 17 - /src/dot_parser.output 18 - /src/gml.ml 19 3 /www/index.en.html 20 4 /www/index.fr.html 21 5 /www/version.prehtml 22 - /bin/ 23 - /dgraph/dgraph.byte 24 - /dgraph/dgraph.opt 25 - /editor/editor.byte 26 - /editor/editor.opt 27 - /view_graph/viewgraph.byte 28 - /view_graph/viewgraph.opt 29 - /export 30 6 _build 31 - graph.cmo 32 - doc
-23
META.in
··· 1 - version = "VERSION" 2 - description = "Generic Graph Library" 3 - requires="" 4 - archive(byte) = "CMA" 5 - archive(byte,plugin) = "CMA" 6 - archive(native) = "CMXA" 7 - archive(native,plugin) = "CMXS" 8 - 9 - package "dgraph" ( 10 - exists_if = "dgraph.cmi" 11 - description = "Library to visualize graph in a Lablgtk canvas" 12 - requires = "ocamlgraph lablgtk2.gnomecanvas" 13 - archive(byte) = "dgraph.cmo" 14 - archive(native) = "dgraph.cmx" 15 - ) 16 - 17 - package "viewgraph" ( 18 - exists_if = "viewgraph.cmi" 19 - description = "Library to visualize graph in a Lablgtk canvas (deprecated)" 20 - requires = "ocamlgraph lablgtk2.gnomecanvas" 21 - archive(byte) = "viewgraph.cmo" 22 - archive(native) = "viewgraph.cmx" 23 - )
+12
Makefile
··· 1 + 2 + all: 3 + dune build 4 + 5 + test: 6 + dune runtest 7 + 8 + doc: 9 + dune build @doc 10 + 11 + clean: 12 + dune clean
-662
Makefile.in
··· 1 - ########################################################################## 2 - # # 3 - # Ocamlgraph: a generic graph library for OCaml # 4 - # Copyright (C) 2004-2010 # 5 - # Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles # 6 - # # 7 - # This software is free software; you can redistribute it and/or # 8 - # modify it under the terms of the GNU Library General Public # 9 - # License version 2.1, with the special exception on linking # 10 - # described in file LICENSE. # 11 - # # 12 - # This software is distributed in the hope that it will be useful, # 13 - # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 15 - # # 16 - ########################################################################## 17 - 18 - # Where to install the binaries 19 - DESTDIR = 20 - prefix =@prefix@ 21 - exec_prefix=@exec_prefix@ 22 - datarootdir=@datarootdir@ 23 - BINDIR =$(DESTDIR)@bindir@ 24 - 25 - # Where to install the man page 26 - MANDIR=@mandir@ 27 - 28 - # Other variables set by ./configure 29 - OCAMLC = @OCAMLC@ 30 - OCAMLOPT = @OCAMLOPT@ 31 - OCAMLDEP = @OCAMLDEP@ -slash 32 - OCAMLDOC = @OCAMLDOC@ 33 - OCAMLLEX = @OCAMLLEX@ 34 - OCAMLYACC= @OCAMLYACC@ -v 35 - OCAMLLIB = @OCAMLLIB@ 36 - OCAMLBEST= @OCAMLBEST@ 37 - OCAMLVERSION = @OCAMLVERSION@ 38 - OCAMLWEB = @OCAMLWEB@ 39 - OCAMLWIN32 = @OCAMLWIN32@ 40 - OCAMLFIND = @OCAMLFIND@ 41 - EXE = @EXE@ 42 - LIBEXT = @LIBEXT@ 43 - OBJEXT = @OBJEXT@ 44 - 45 - # Others global variables 46 - OCAMLGRAPH_SRCDIR = src 47 - OCAMLGRAPH_LIBDIR = src/lib 48 - 49 - INCLUDES= -I $(OCAMLGRAPH_SRCDIR) -I $(OCAMLGRAPH_LIBDIR) 50 - BFLAGS = $(INCLUDES) -g -dtypes -w +a -w -4 -w -44 -w -50 -w -48 -w -29 51 - OFLAGS = $(INCLUDES) 52 - 53 - # main target 54 - ############# 55 - 56 - NAME=ocamlgraph 57 - 58 - ifeq (@LABLGNOMECANVAS@,yes) 59 - all: byte $(OCAMLBEST) viewer dgraph editor 60 - else 61 - all: byte $(OCAMLBEST) 62 - endif 63 - 64 - # bytecode and native-code compilation 65 - ###################################### 66 - 67 - OCAMLGRAPH_LIB= unionfind heap bitv persistentQueue 68 - OCAMLGRAPH_LIB:=$(patsubst %, $(OCAMLGRAPH_LIBDIR)/%.cmo, $(OCAMLGRAPH_LIB)) 69 - 70 - CMO = util blocks persistent imperative \ 71 - delaunay builder classic rand \ 72 - components path nonnegative traverse oper \ 73 - coloring topological kruskal flow \ 74 - prim dominator graphviz gml dot_parser dot_lexer dot pack \ 75 - gmap minsep cliquetree mcs_m md strat fixpoint leaderlist contraction \ 76 - graphml merge mincut clique weakTopological chaoticIteration 77 - CMO := $(OCAMLGRAPH_LIB) $(patsubst %, $(OCAMLGRAPH_SRCDIR)/%.cmo, $(CMO)) 78 - 79 - CMX = $(CMO:.cmo=.cmx) 80 - CMA = graph.cma 81 - CMXA = graph.cmxa 82 - ifeq (@NATIVE_DYNLINK@,yes) 83 - CMXS = graph.cmxs 84 - endif 85 - 86 - CMI = sig sig_pack dot_ast 87 - CMI := $(patsubst %, src/%.cmi, $(CMI)) 88 - 89 - GENERATED = META \ 90 - src/gml.ml src/dot_parser.ml src/dot_parser.mli src/dot_lexer.ml 91 - 92 - $(CMX): OFLAGS += -for-pack Graph 93 - 94 - byte: $(CMA) 95 - opt: $(CMXA) $(CMXS) 96 - 97 - graph.cma: graph.cmo 98 - $(OCAMLC) $(INCLUDES) -a -g -o $@ $^ 99 - 100 - graph.cmxa: graph.cmx 101 - $(OCAMLOPT) $(INCLUDES) -a -o $@ $^ 102 - 103 - graph.cmxs: graph.cmx 104 - $(OCAMLOPT) $(INCLUDES) -shared -o $@ $^ 105 - 106 - graph.cmi: graph.cmo 107 - graph.o: graph.cmx 108 - 109 - graph.cmo: $(CMI) $(CMO) 110 - $(OCAMLC) $(INCLUDES) -pack -g -o $@ $^ 111 - 112 - graph.cmx: $(CMI) $(CMX) 113 - $(OCAMLOPT) $(INCLUDES) -pack -o $@ $^ 114 - 115 - VERSION=1.8.8 116 - 117 - # gtk2 graph editor 118 - ################### 119 - 120 - ED_DIR=editor 121 - 122 - editor: $(ED_DIR)/editor.byte $(ED_DIR)/editor.$(OCAMLBEST) 123 - 124 - ED_CMO = ed_hyper ed_graph ed_draw ed_display ed_main 125 - ED_CMO:= $(patsubst %, $(ED_DIR)/%.cmo, $(ED_CMO)) 126 - ED_CMX = $(ED_CMO:.cmo=.cmx) 127 - ED_CMI = $(ED_CMO:.cmo=.cmi) 128 - 129 - ED_INCLUDES = @INCLUDEGTK2@ -I +threads -I $(ED_DIR) -I . 130 - 131 - $(ED_CMI) $(ED_CMO): BFLAGS+= $(ED_INCLUDES) 132 - $(ED_CMI) $(ED_CMO): $(CMA) 133 - $(ED_CMX): OFLAGS+= $(ED_INCLUDES) 134 - $(ED_CMX): $(CMXA) 135 - 136 - $(ED_DIR)/editor.byte: $(CMA) $(ED_CMO) 137 - $(OCAMLC) -g -o $@ $(ED_INCLUDES) \ 138 - lablgtk.cma lablgnomecanvas.cma unix.cma $^ 139 - 140 - $(ED_DIR)/editor.opt: $(CMXA) $(ED_CMX) 141 - $(OCAMLOPT) -o $@ $(ED_INCLUDES) \ 142 - lablgtk.cmxa lablgnomecanvas.cmxa unix.cmxa $^ 143 - 144 - # gtk2 graph viewer (deprecated) 145 - ################### 146 - 147 - VIEWER_DIR=view_graph 148 - 149 - viewer: $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.$(OCAMLBEST) 150 - 151 - VIEWER_CMO=viewGraph_core viewGraph_select viewGraph_utils viewGraph_test 152 - VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO)) 153 - VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx) 154 - VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi) 155 - VIEWER_MLI=$(VIEWER_CMI:.cmi=.mli) 156 - 157 - VIEWER_INCLUDES= @INCLUDEGTK2@ -I $(VIEWER_DIR) -I . 158 - 159 - $(VIEWER_CMI) $(VIEWER_CMO): BFLAGS+= $(VIEWER_INCLUDES) 160 - $(VIEWER_CMX): OFLAGS+= $(VIEWER_INCLUDES) -for-pack Viewgraph 161 - $(VIEWER_CMI) $(VIEWER_CMO): $(CMA) 162 - $(VIEWER_CMX): $(CMXA) 163 - 164 - VIEWER_CMOLIB = $(VIEWER_DIR)/viewgraph.cmo 165 - VIEWER_CMILIB = $(VIEWER_DIR)/viewgraph.cmi 166 - VIEWER_CMXLIB = $(VIEWER_DIR)/viewgraph.cmx 167 - 168 - $(VIEWER_CMOLIB): $(filter-out $(VIEWER_DIR)/viewGraph_test.cmo, $(VIEWER_CMO)) 169 - $(OCAMLC) -o $@ $(VIEWER_INCLUDES) -pack $^ 170 - 171 - $(VIEWER_CMXLIB): $(filter-out $(VIEWER_DIR)/viewGraph_test.cmx, $(VIEWER_CMX)) 172 - $(OCAMLOPT) -o $@ $(VIEWER_INCLUDES) -pack $^ 173 - 174 - $(VIEWER_DIR)/viewgraph.byte: $(CMA) $(VIEWER_CMOLIB) 175 - $(OCAMLC) -g -o $@ $(VIEWER_INCLUDES) \ 176 - lablgtk.cma gtkInit.cmo lablgnomecanvas.cma unix.cma $^ 177 - 178 - $(VIEWER_DIR)/viewgraph.opt: $(CMXA) $(VIEWER_CMXLIB) 179 - $(OCAMLOPT) -o $@ $(VIEWER_INCLUDES) \ 180 - lablgtk.cmxa gtkInit.cmx lablgnomecanvas.cmxa unix.cmxa $^ 181 - 182 - # new gtk2 graph viewer: dgraph 183 - ############################### 184 - 185 - DGRAPH_DIR=dgraph 186 - 187 - dgraph: $(DGRAPH_DIR)/dgraph.byte $(DGRAPH_DIR)/dgraph.$(OCAMLBEST) 188 - 189 - DGRAPH_CMO=xDotDraw xDot \ 190 - dGraphModel \ 191 - dGraphTreeLayout dGraphSubTree dGraphTreeModel \ 192 - dGraphViewItem dGraphView \ 193 - dGraphRandModel dGraphContainer \ 194 - dGraphViewer 195 - DGRAPH_CMO:=$(patsubst %,$(DGRAPH_DIR)/%.cmo, $(DGRAPH_CMO)) 196 - DGRAPH_CMX=$(DGRAPH_CMO:.cmo=.cmx) 197 - DGRAPH_CMI=$(filter-out dgraph/dGraphViewer.cmi, $(DGRAPH_CMO:.cmo=.cmi)) 198 - 199 - DGRAPH_INCLUDES= @INCLUDEGTK2@ -I $(DGRAPH_DIR) -I . 200 - 201 - $(DGRAPH_CMI) $(DGRAPH_CMO): BFLAGS+= $(DGRAPH_INCLUDES) 202 - $(DGRAPH_CMX): OFLAGS+= $(DGRAPH_INCLUDES) -for-pack Dgraph 203 - 204 - $(DGRAPH_CMI) $(DGRAPH_CMO): $(CMA) 205 - $(DGRAPH_CMX): $(CMXA) 206 - 207 - DGRAPH_CMOLIB = $(DGRAPH_DIR)/dgraph.cmo 208 - DGRAPH_CMILIB = $(DGRAPH_DIR)/dgraph.cmi 209 - DGRAPH_CMXLIB = $(DGRAPH_DIR)/dgraph.cmx 210 - 211 - dgraph/dGraphViewer.cmo: $(DGRAPH_CMOLIB) 212 - dgraph/dGraphViewer.cmx: $(DGRAPH_CMXLIB) 213 - 214 - $(DGRAPH_CMOLIB): $(filter-out dgraph/dGraphViewer.cmo, $(DGRAPH_CMO)) 215 - $(OCAMLC) -o $@ $(DGRAPH_INCLUDES) -pack $^ 216 - 217 - $(DGRAPH_CMXLIB): $(filter-out dgraph/dGraphViewer.cmx, $(DGRAPH_CMX)) 218 - $(OCAMLOPT) -o $@ $(DGRAPH_INCLUDES) -pack $^ 219 - 220 - $(DGRAPH_DIR)/dgraph.byte: $(CMA) $(DGRAPH_CMOLIB) \ 221 - $(DGRAPH_DIR)/dGraphViewer.cmo 222 - $(OCAMLC) -g -o $@ $(DGRAPH_INCLUDES) \ 223 - lablgtk.cma gtkInit.cmo lablgnomecanvas.cma $^ 224 - 225 - $(DGRAPH_DIR)/dgraph.opt: $(CMXA) $(DGRAPH_CMXLIB) \ 226 - $(DGRAPH_DIR)/dGraphViewer.cmx 227 - $(OCAMLOPT) -o $@ $(DGRAPH_INCLUDES) \ 228 - lablgtk.cmxa gtkInit.cmx lablgnomecanvas.cmxa $^ 229 - 230 - # Fixing issue with "make -j" 231 - ############################# 232 - 233 - # wait than all bytecodes are done before packing the native library: 234 - # without these extra dependencies, building graph.cmx also rebuilds the .cmi 235 - # while graph.cmi may be required at the same time by some .cmo of the 236 - # bytecodes, leading to tentative access to a corrupted graph.cmi. 237 - 238 - ifeq (@LABLGNOMECANVAS@,yes) 239 - graph.cmx: | $(DGRAPH_DIR)/dgraph.byte \ 240 - $(VIEWER_DIR)/viewgraph.byte \ 241 - $(ED_DIR)/editor.byte 242 - endif 243 - 244 - $(CMX): | $(OCAMLGRAPH_SRCDIR)/blocks.cmo 245 - 246 - # No .mli for blocks.ml: so, to avoid clash when generating block.cmi 247 - # from both ocamlc and ocamlopt, force to fully compile the bytecode library 248 - # before the native one 249 - $(OCAMLGRAPH_SRCDIR)/blocks.cmx: | graph.cmo 250 - 251 - # Examples 252 - ########## 253 - 254 - EXAMPLESBIN=bin/demo.$(OCAMLBEST) bin/demo_planar.$(OCAMLBEST) \ 255 - bin/bench.$(OCAMLBEST) bin/color.$(OCAMLBEST) bin/sudoku.$(OCAMLBEST) \ 256 - bin/test.$(OCAMLBEST) bin/compare_prim_kruskal.$(OCAMLBEST) 257 - 258 - .PHONY: examples 259 - examples: $(EXAMPLESBIN) 260 - 261 - .PHONY: demo 262 - demo: bin/demo.$(OCAMLBEST) 263 - 264 - bin/demo.byte: $(CMXA) examples/demo.cmo 265 - mkdir -p bin 266 - $(OCAMLOPT) -o $@ graphics.cma unix.cma $^ 267 - 268 - bin/demo.opt: $(CMXA) examples/demo.cmx 269 - mkdir -p bin 270 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 271 - 272 - bin/fgtest.opt: $(CMXA) myTest/fgtest.cmx 273 - mkdir -p bin 274 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 275 - 276 - bin/demo_planar.byte: $(CMA) examples/demo_planar.cmo 277 - mkdir -p bin 278 - $(OCAMLC) -o $@ graphics.cma unix.cma $^ 279 - 280 - bin/demo_planar.opt: $(CMXA) examples/demo_planar.cmx 281 - mkdir -p bin 282 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 283 - 284 - bin/compare_prim_kruskal.opt: $(CMXA) examples/compare_prim_kruskal.ml 285 - mkdir -p bin 286 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 287 - 288 - bin/demo_prim.opt: $(CMXA) examples/demo_prim.ml 289 - mkdir -p bin 290 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 291 - 292 - bin/color.byte: $(CMA) examples/color.cmo 293 - mkdir -p bin 294 - $(OCAMLC) -o $@ graphics.cma unix.cma $^ 295 - 296 - bin/color.opt: $(CMXA) examples/color.cmx 297 - mkdir -p bin 298 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 299 - 300 - bin/sudoku.byte: $(CMA) examples/sudoku.cmo 301 - mkdir -p bin 302 - $(OCAMLC) -o $@ graphics.cma unix.cma $^ 303 - 304 - bin/sudoku.opt: $(CMXA) examples/sudoku.cmx 305 - mkdir -p bin 306 - $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^ 307 - 308 - test: $(CMA) tests/test.ml 309 - ocaml -I . unix.cma graphics.cma $^ 310 - 311 - test-bf: $(CMA) tests/test_bf.ml 312 - ocaml unix.cma graphics.cma $^ 313 - 314 - test-fixpoint: $(CMA) tests/test_fixpoint.ml 315 - ocaml $^ 316 - 317 - test-johnson: $(CMA) tests/test_johnson.ml 318 - ocaml unix.cma graphics.cma $^ 319 - 320 - bin/test-ts: $(CMXA) tests/test_topsort.ml 321 - mkdir -p bin 322 - $(OCAMLOPT) -o $@ unix.cmxa $^ 323 - 324 - test-ts: bin/test-ts 325 - bin/test-ts 10 326 - 327 - nonneg: $(CMA) tests/nonneg.ml 328 - ocaml unix.cma graphics.cma $^ 329 - 330 - test-graphml: $(CMA) tests/testgraphml.ml 331 - ocaml unix.cma $^ 332 - 333 - bin/test.byte: $(CMA) tests/test.cmo 334 - $(OCAMLC) -g -unsafe -o $@ unix.cma graphics.cma $^ 335 - 336 - bin/test.opt: $(CMXA) tests/test.cmx 337 - $(OCAMLOPT) -unsafe -inline 100 -o $@ unix.cmxa graphics.cmxa $^ 338 - 339 - bin/test_bf.byte: $(CMA) tests/test_bf.ml 340 - $(OCAMLC) -g -o $@ unix.cma graphics.cma $^ 341 - 342 - bin/nonneg.byte: $(CMA) tests/nonneg.ml 343 - $(OCAMLC) -g -o $@ unix.cma graphics.cma $^ 344 - 345 - bench: bin/bench.$(OCAMLBEST) 346 - bin/bench.opt 347 - 348 - bin/bench.opt: $(CMXA) tests/bench.ml 349 - $(OCAMLOPT) -unsafe -inline 100 -o $@ unix.cmxa $^ 350 - 351 - bin/testunix.opt: $(CMXA) myTest/testunix.ml 352 - $(OCAMLOPT) -unsafe -inline 100 -o $@ unix.cmxa $^ 353 - 354 - check: $(CMA) tests/check.ml bin/test-ts 355 - ocaml -I . $(CMA) tests/check.ml 356 - bin/test-ts 10 357 - 358 - # Additional rules 359 - ################## 360 - 361 - EXAMPLES = demo color demo_planar sudoku 362 - EXAMPLESBIN:=$(patsubst %, bin/%.opt, $(EXAMPLES)) 363 - EXAMPLES:= $(patsubst %, examples/%.ml, $(EXAMPLES)) 364 - 365 - examples: $(EXAMPLESBIN) 366 - 367 - TESTS = test check 368 - TESTS := $(patsubst %, tests/%.ml, $(TESTS)) 369 - 370 - DPD_GRAPH_ML= $(TESTS) $(EXAMPLES) 371 - 372 - $(DPD_GRAPH_ML:.ml=.cmo): $(CMA) 373 - $(DPD_GRAPH_ML:.ml=.cmx): $(CMXA) 374 - 375 - # installation 376 - ############## 377 - 378 - INSTALL_LIBDIR=$(DESTDIR)$(OCAMLLIB)/ocamlgraph 379 - 380 - install: install-$(OCAMLBEST) install-byte 381 - mkdir -p $(BINDIR) 382 - ifeq (@LABLGNOMECANVAS@,yes) 383 - ifeq ($(OCAMLBEST),byte) 384 - cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE) 385 - cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE) 386 - else 387 - cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE) 388 - cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE) 389 - endif 390 - endif 391 - 392 - install-byte: META 393 - mkdir -p $(INSTALL_LIBDIR) 394 - cp -f graph.cmo graph.cmi $(CMA) $(INSTALL_LIBDIR) 395 - cp -f $(OCAMLGRAPH_SRCDIR)/*.mli $(INSTALL_LIBDIR) 396 - cp -f META $(INSTALL_LIBDIR) 397 - ifeq (@LABLGNOMECANVAS@,yes) 398 - mkdir -p $(BINDIR) 399 - cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte 400 - cp -f $(VIEWER_CMILIB) $(VIEWER_CMOLIB) $(INSTALL_LIBDIR) 401 - cp -f $(DGRAPH_CMILIB) $(DGRAPH_CMOLIB) $(INSTALL_LIBDIR) 402 - cp -f $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli $(INSTALL_LIBDIR) 403 - cp -f $(DGRAPH_DIR)/dgraph.byte $(BINDIR)/graph-viewer.byte 404 - endif 405 - 406 - install-opt: install-byte 407 - mkdir -p $(INSTALL_LIBDIR) 408 - cp -f graph$(OBJEXT) graph$(LIBEXT) graph.cmi graph.cmx \ 409 - $(CMXA) $(CMXS) $(INSTALL_LIBDIR) 410 - cp -f $(OCAMLGRAPH_SRCDIR)/*.mli $(INSTALL_LIBDIR) 411 - ifeq (@LABLGNOMECANVAS@,yes) 412 - mkdir -p $(BINDIR) 413 - cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt 414 - cp -f $(VIEWER_CMILIB) $(VIEWER_CMXLIB) $(VIEWER_CMXLIB:.cmx=.o) \ 415 - $(INSTALL_LIBDIR) 416 - cp -f $(DGRAPH_CMILIB) $(DGRAPH_CMXLIB) $(DGRAPH_CMXLIB:.cmx=.o) \ 417 - $(INSTALL_LIBDIR) 418 - cp -f $(DGRAPH_DIR)/dgraph.opt $(BINDIR)/graph-viewer.opt 419 - cp -f $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli $(INSTALL_LIBDIR) 420 - endif 421 - 422 - ifdef DESTDIR 423 - OCAMLFINDDEST := -destdir $(DESTDIR) 424 - endif 425 - 426 - ifeq ($(OCAMLBEST),byte) 427 - OCAMLFIND_OPT_FILES= 428 - else 429 - OCAMLFIND_OPT_FILES=graph$(OBJEXT) graph$(LIBEXT) graph.cmx $(CMXA) $(CMXS) 430 - ifeq (@LABLGNOMECANVAS@,yes) 431 - OCAMLFIND_OPT_FILES+=\ 432 - $(VIEWER_CMXLIB) $(VIEWER_CMXLIB:.cmx=.o) \ 433 - $(DGRAPH_CMXLIB) $(DGRAPH_CMXLIB:.cmx=.o) 434 - endif 435 - endif 436 - 437 - install-findlib: META 438 - ifdef OCAMLFIND 439 - ifeq (@LABLGNOMECANVAS@,yes) 440 - $(OCAMLFIND) install $(OCAMLFINDDEST) ocamlgraph META \ 441 - $(OCAMLGRAPH_SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \ 442 - graph.cmo graph.cmi \ 443 - $(CMA) \ 444 - $(VIEWER_CMOLIB) $(VIEWER_CMILIB) \ 445 - $(DGRAPH_CMOLIB) $(DGRAPH_CMILIB) \ 446 - $(OCAMLFIND_OPT_FILES) 447 - else 448 - $(OCAMLFIND) install $(OCAMLFINDDEST) ocamlgraph META \ 449 - $(OCAMLGRAPH_SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \ 450 - graph$(LIBEXT) graph.cmo graph.cmi $(CMA) \ 451 - $(OCAMLFIND_OPT_FILES) 452 - endif 453 - endif 454 - 455 - META: META.in Makefile 456 - sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ -e s/CMXS/$(CMXS)/ \ 457 - $@.in > $@ 458 - 459 - # documentation 460 - ############### 461 - 462 - DOCFILES=$(NAME).ps $(NAME).html 463 - 464 - NODOC = blocks dot_parser dot_lexer 465 - NODOC := $(patsubst %, $(OCAMLGRAPH_SRCDIR)/%.cmo, $(NODOC)) 466 - DOC_CMO = $(filter-out $(NODOC) $(OCAMLGRAPH_LIB), $(CMO)) 467 - DOC_SRC = $(CMI:.cmi=.mli) $(DOC_CMO:.cmo=.mli) $(DOC_CMO:.cmo=.ml) 468 - ifeq (@LABLGNOMECANVAS@,yes) 469 - DOC_SRC := $(DOC_SRC) $(DGRAPH_CMI:.cmi=.mli) 470 - endif 471 - DOC_CHARSET = utf-8 472 - 473 - .PHONY: doc 474 - doc: $(DOC_CMO) 475 - mkdir -p doc 476 - rm -f doc/* 477 - $(OCAMLDOC) -charset $(DOC_CHARSET) -d doc -html $(DGRAPH_INCLUDES) \ 478 - -I src/lib -I src $(DOC_SRC) 479 - 480 - # literate programming 481 - $(NAME).tex: $(DOC_SRC) 482 - $(OCAMLWEB) -o $@ $^ 483 - 484 - wc: 485 - ocamlwc -p $(OCAMLGRAPH_SRCDIR)/*.mli $(OCAMLGRAPH_SRCDIR)/*.ml 486 - 487 - # file headers 488 - ############## 489 - 490 - headers: 491 - headache \ 492 - -c misc/headache_config.txt \ 493 - -h misc/header.txt \ 494 - Makefile.in configure.in README.adoc \ 495 - $(OCAMLGRAPH_LIBDIR)/*.ml $(OCAMLGRAPH_LIBDIR)/*.ml[ily] \ 496 - $(OCAMLGRAPH_SRCDIR)/*.ml $(OCAMLGRAPH_SRCDIR)/*.ml[ily] \ 497 - $(ED_DIR)/*.ml $(ED_DIR)/*.mli 498 - headache \ 499 - -c misc/headache_config.txt \ 500 - -h $(DGRAPH_DIR)/headers/CEA_LGPL \ 501 - $(DGRAPH_DIR)/*.ml $(DGRAPH_DIR)/*.mli 502 - # export 503 - ######## 504 - 505 - EXPORTDIR=$(NAME)-$(VERSION) 506 - TAR=$(EXPORTDIR).tar 507 - 508 - FTP = /users/www-perso/projets/ocamlgraph/download 509 - WWW = /users/www-perso/projets/ocamlgraph 510 - 511 - FILES = src/*.ml* lib/*.ml* Makefile.in configure configure.in META.in \ 512 - .depend editor/ed_*.ml* editor/Makefile \ 513 - editor/tests/*.dot editor/tests/*.gml \ 514 - view_graph/*.ml view_graph/*.mli \ 515 - view_graph/README view_graph/Makefile \ 516 - dgraph/*.ml dgraph/*.mli \ 517 - examples/*.ml tests/*.ml \ 518 - README.adoc FAQ CREDITS INSTALL.adoc COPYING LICENSE CHANGES 519 - 520 - export: source export-doc export-web export-delaunay 521 - 522 - source: 523 - mkdir -p export 524 - cd export; rm -rf $(EXPORTDIR) 525 - mkdir -p export/$(EXPORTDIR)/bin 526 - cp --parents $(FILES) export/$(EXPORTDIR) 527 - cd export ; tar cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR) 528 - cp export/$(TAR).gz $(FTP) 529 - cp README.adoc FAQ CREDITS COPYING LICENSE CHANGES $(EXAMPLES) $(FTP) 530 - 531 - # Build and install the .tar.gz requiered by Frama-C 532 - framac: EXPORTDIR=ocamlgraph 533 - framac: FTP=$$HOME/GIT/frama-c.master 534 - framac: 535 - mkdir -p export 536 - cd export; rm -rf $(EXPORTDIR) 537 - mkdir -p export/$(EXPORTDIR)/bin 538 - cp --parents $(FILES) export/$(EXPORTDIR) 539 - cd export ; tar cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR) 540 - cp export/$(TAR).gz $(FTP) 541 - make -C $(FTP) force-ocamlgraph 542 - 543 - www/version.prehtml: Makefile.in 544 - echo "<#def version>$(VERSION)</#def>" > www/version.prehtml 545 - 546 - export-web: www/version.prehtml 547 - make -C www install 548 - 549 - export-doc: $(DOC_CMO) 550 - rm -f $(WWW)/doc/* 551 - -$(OCAMLDOC) -d $(WWW)/doc -html $(DGRAPH_INCLUDES) -I src/lib -I src $(DOC_SRC) 552 - 553 - MISCFTP = $(HOME)/WWW/ftp/ocaml/misc 554 - DELAUNAY=delaunay.ml delaunay.mli 555 - export-delaunay: 556 - cd src; cp -f $(DELAUNAY) $(MISCFTP) 557 - cd src; rm -f delaunay.annot; caml2html -noannot -d $(MISCFTP) $(DELAUNAY) 558 - 559 - # generic rules 560 - ############### 561 - 562 - .SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .tex .dvi .ps .html 563 - 564 - .mli.cmi: 565 - $(OCAMLC) -c $(BFLAGS) $< 566 - 567 - .ml.cmo: 568 - $(OCAMLC) -c $(BFLAGS) $< 569 - 570 - .ml.o: 571 - $(OCAMLOPT) -c $(OFLAGS) $< 572 - 573 - .ml.cmx: 574 - $(OCAMLOPT) -c $(OFLAGS) $< 575 - 576 - .mll.ml: 577 - $(OCAMLLEX) $< 578 - 579 - .mly.ml: 580 - $(OCAMLYACC) -v $< 581 - 582 - .mly.mli: 583 - $(OCAMLYACC) -v $< 584 - 585 - .tex.dvi: 586 - latex $< && latex $< 587 - 588 - .dvi.ps: 589 - dvips $< -o $@ 590 - 591 - .tex.html: 592 - hevea $< 593 - 594 - # Emacs tags 595 - ############ 596 - 597 - otags: 598 - otags -r src editor view_graph 599 - 600 - tags: 601 - find . -name "*.ml*" | sort -r | xargs \ 602 - etags "--regex=/let[ \t]+\([^ \t]+\)/\1/" \ 603 - "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \ 604 - "--regex=/and[ \t]+\([^ \t]+\)/\1/" \ 605 - "--regex=/type[ \t]+\([^ \t]+\)/\1/" \ 606 - "--regex=/exception[ \t]+\([^ \t]+\)/\1/" \ 607 - "--regex=/val[ \t]+\([^ \t]+\)/\1/" \ 608 - "--regex=/module[ \t]+\([^ \t]+\)/\1/" 609 - 610 - # Makefile is rebuilt whenever Makefile.in or configure.in is modified 611 - ###################################################################### 612 - 613 - Makefile: Makefile.in config.status 614 - if test -e $@; then chmod a+w $@; fi 615 - ./config.status 616 - chmod a-w $@ 617 - 618 - config.status: configure 619 - ./config.status --recheck 620 - 621 - configure: configure.in 622 - autoconf 623 - 624 - # clean 625 - ####### 626 - 627 - clean: 628 - rm -f *~ 629 - for d in $(OCAMLGRAPH_SRCDIR) $(OCAMLGRAPH_LIBDIR) $(ED_DIR) $(VIEWER_DIR) $(DGRAPH_DIR) \ 630 - tests examples; \ 631 - do \ 632 - rm -f $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~ $$d/*.annot; \ 633 - done 634 - rm -f $(GENERATED) $(OCAMLGRAPH_SRCDIR)/dot_parser.output 635 - rm -f graph.*a graph.cm* graph.o graph$(LIBEXT) 636 - rm -f $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt 637 - rm -f $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt 638 - rm -f $(DGRAPH_DIR)/dgraph.byte $(DGRAPH_DIR)/dgraph.opt 639 - rm -f $(DGRAPH_DIR)/dgraph 640 - rm -f *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES) 641 - rm -f $(EXAMPLESBIN) 642 - 643 - dist-clean distclean:: clean 644 - rm -f Makefile config.cache config.log config.status *.byte *.opt 645 - 646 - svnclean svn-clean:: dist-clean 647 - rm -f config.* configure configure.lineno 648 - 649 - # depend 650 - ######## 651 - 652 - .PHONY: depend 653 - .depend depend: $(GENERATED) 654 - rm -f .depend 655 - $(OCAMLDEP) $(INCLUDES) -I $(ED_DIR) -I $(VIEWER_DIR) -I $(DGRAPH_DIR)\ 656 - $(OCAMLGRAPH_LIBDIR)/*.ml $(OCAMLGRAPH_LIBDIR)/*.mli \ 657 - $(OCAMLGRAPH_SRCDIR)/*.ml $(OCAMLGRAPH_SRCDIR)/*.mli \ 658 - $(ED_DIR)/*.mli $(ED_DIR)/*.ml \ 659 - $(VIEWER_DIR)/*.mli $(VIEWER_DIR)/*.ml \ 660 - $(DGRAPH_DIR)/*.mli $(DGRAPH_DIR)/*.ml > .depend 661 - 662 - include .depend
-242
configure.in
··· 1 - ########################################################################## 2 - # # 3 - # Ocamlgraph: a generic graph library for OCaml # 4 - # Copyright (C) 2004-2010 # 5 - # Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles # 6 - # # 7 - # This software is free software; you can redistribute it and/or # 8 - # modify it under the terms of the GNU Library General Public # 9 - # License version 2.1, with the special exception on linking # 10 - # described in file LICENSE. # 11 - # # 12 - # This software is distributed in the hope that it will be useful, # 13 - # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 15 - # # 16 - ########################################################################## 17 - 18 - # the script generated by autoconf from this input will set the following 19 - # variables: 20 - # OCAMLC "ocamlc" if present in the path, or a failure 21 - # or "ocamlc.opt" if present with same version number as ocamlc 22 - # OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no" 23 - # OCAMLBEST either "byte" if no native compiler was found, 24 - # or "opt" otherwise 25 - # OCAMLDEP "ocamldep" 26 - # OCAMLLEX "ocamllex" (or "ocamllex.opt" if present) 27 - # OCAMLYACC "ocamlyac" 28 - # OCAMLLIB the path to the ocaml standard library 29 - # OCAMLVERSION the ocaml version number 30 - # OCAMLWEB "ocamlweb" (not mandatory) 31 - # OCAMLWIN32 "yes"/"no" depending on Sys.os_type = "Win32" 32 - # EXE ".exe" if OCAMLWIN32=yes, "" otherwise 33 - 34 - # check for one particular file of the sources 35 - # ADAPT THE FOLLOWING LINE TO YOUR SOURCES! 36 - AC_INIT(src/sig.mli) 37 - 38 - # Check for Ocaml compilers 39 - 40 - # we first look for ocamlc in the path; if not present, we fail 41 - AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no) 42 - if test "$OCAMLC" = no ; then 43 - AC_MSG_ERROR(Cannot find ocamlc.) 44 - fi 45 - 46 - # we extract Ocaml version number and library path 47 - OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|The O.*, version *\(.*\)$|\1|p' ` 48 - echo "ocaml version is $OCAMLVERSION" 49 - 50 - case $OCAMLVERSION in 51 - 0.*|1.*|2.*|3.0*) 52 - AC_MSG_ERROR(ocamlgraph needs ocaml version 3.10.0 or higher);; 53 - 3.10*) 54 - NATIVE_DYNLINK=no;; 55 - *) 56 - NATIVE_DYNLINK=yes 57 - ;; 58 - esac 59 - 60 - # OCAMLLIB=`$OCAMLC -v | tail -n 1 | cut -f 4 -d " "` 61 - # OCAMLLIB=`$OCAMLC -v | tail -n 1 | sed -e 's|[[^:]]*: \(.*\)|\1|' ` 62 - OCAMLLIB=`$OCAMLC -where | tr -d '\\r' | tr '\\\\' '/'` 63 - echo "ocaml library path is $OCAMLLIB" 64 - 65 - # then we look for ocamlopt; if not present, we issue a warning 66 - # if the version is not the same, we also discard it 67 - # we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not 68 - AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no) 69 - OCAMLBEST=byte 70 - if test "$OCAMLOPT" = no ; then 71 - AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.) 72 - else 73 - AC_MSG_CHECKING(ocamlopt version) 74 - TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` 75 - if test "$TMPVERSION" != "$OCAMLVERSION" ; then 76 - AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.) 77 - OCAMLOPT=no 78 - else 79 - AC_MSG_RESULT(ok) 80 - OCAMLBEST=opt 81 - fi 82 - fi 83 - 84 - # checking for ocamlc.opt 85 - AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no) 86 - if test "$OCAMLCDOTOPT" != no ; then 87 - AC_MSG_CHECKING(ocamlc.opt version) 88 - TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` 89 - if test "$TMPVERSION" != "$OCAMLVERSION" ; then 90 - AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.) 91 - else 92 - AC_MSG_RESULT(ok) 93 - OCAMLC=$OCAMLCDOTOPT 94 - fi 95 - fi 96 - 97 - # checking for ocamlopt.opt 98 - if test "$OCAMLOPT" != no ; then 99 - AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt,no) 100 - if test "$OCAMLOPTDOTOPT" != no ; then 101 - AC_MSG_CHECKING(ocamlc.opt version) 102 - TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` 103 - if test "$TMPVER" != "$OCAMLVERSION" ; then 104 - AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.) 105 - else 106 - AC_MSG_RESULT(ok) 107 - OCAMLOPT=$OCAMLOPTDOTOPT 108 - fi 109 - fi 110 - fi 111 - 112 - # ocamldep, ocamllex and ocamlyacc should also be present in the path 113 - AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no) 114 - if test "$OCAMLDEP" = no ; then 115 - AC_MSG_ERROR(Cannot find ocamldep.) 116 - fi 117 - 118 - AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex,no) 119 - if test "$OCAMLLEX" = no ; then 120 - AC_MSG_ERROR(Cannot find ocamllex.) 121 - else 122 - AC_CHECK_PROG(OCAMLLEXDOTOPT,ocamllex.opt,ocamllex.opt,no) 123 - if test "$OCAMLLEXDOTOPT" != no ; then 124 - OCAMLLEX=$OCAMLLEXDOTOPT 125 - fi 126 - fi 127 - 128 - AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,no) 129 - if test "$OCAMLYACC" = no ; then 130 - AC_MSG_ERROR(Cannot find ocamlyacc.) 131 - fi 132 - 133 - AC_CHECK_PROG(OCAMLDOC,ocamldoc,ocamldoc,true) 134 - if test "$OCAMLDOC" = true ; then 135 - AC_MSG_WARN(Cannot find ocamldoc) 136 - else 137 - AC_CHECK_PROG(OCAMLDOCOPT,ocamldoc.opt,ocamldoc.opt,no) 138 - if test "$OCAMLDOCOPT" != no ; then 139 - OCAMLDOC=$OCAMLDOCOPT 140 - fi 141 - fi 142 - 143 - AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true) 144 - 145 - AC_CHECK_PROG(OCAMLFIND,ocamlfind,ocamlfind) 146 - if test "$OCAMLFIND" = "" ; then 147 - echo "No ocamlfind detected" 148 - else 149 - OCAMLLIB_BY_FINDLIB=`ocamlfind printconf stdlib | tr -d '\\r' | tr '\\\\' '/'` 150 - if test "$OCAMLLIB_BY_FINDLIB" = "$OCAMLLIB" ; then 151 - echo "OCamlfind detected and enabled" 152 - else 153 - echo "OCamlfind detected but disabled. Standard libraries differ:" 154 - echo " ocamlc: '$OCAMLLIB'" 155 - echo " ocamlfind: '$OCAMLLIB_BY_FINDLIB'" 156 - OCAMLFIND="" 157 - fi 158 - fi 159 - 160 - if test "$OCAMLBEST" = "opt"; then 161 - SUFFIX=cmxa; 162 - else 163 - SUFFIX=cma; 164 - fi 165 - 166 - # checking for lablgtk2 and lablgnomecanvas 167 - ########################################### 168 - 169 - # lablgtk2 now uses ocamlfind while older version uses `ocamlc -where ` 170 - # its installation path is not the same 171 - if test "$OCAMLFIND" = "" ; then 172 - LABLGTK_PATH=+lablgtk2 173 - LABLGTKPATH_FOR_CONFIGURE=$OCAMLLIB/lablgtk2 174 - else 175 - LABLGTK_PATH=`ocamlfind query lablgtk2 | tr -d '\\r\\n'` 176 - if test "$LABLGTK_PATH" = "" -o "$LABLGTK_PATH" -ef "$OCAMLLIB/lablgtk2" ; \ 177 - then 178 - LABLGTK_PATH=+lablgtk2 179 - LABLGTKPATH_FOR_CONFIGURE=$OCAMLLIB/lablgtk2 180 - else 181 - LABLGTKPATH_FOR_CONFIGURE=$LABLGTK_PATH 182 - fi 183 - fi 184 - 185 - AC_CHECK_FILE($LABLGTKPATH_FOR_CONFIGURE/lablgtk.$SUFFIX, 186 - LABLGTK2=yes, 187 - LABLGTK2=no) 188 - 189 - if test "$LABLGTK2" = yes ; then 190 - INCLUDEGTK2="-I $LABLGTK_PATH" 191 - AC_CHECK_FILE($LABLGTKPATH_FOR_CONFIGURE/lablgnomecanvas.$SUFFIX, 192 - LABLGNOMECANVAS=yes, 193 - LABLGNOMECANVAS=no) 194 - else 195 - LABLGTK2=no 196 - LABLGNOMECANVAS=no 197 - fi 198 - 199 - # platform 200 - AC_MSG_CHECKING(Win32 platform) 201 - echo "print_endline Sys.os_type" > check_arch.ml 202 - if ocaml check_arch.ml | grep -q Win32; then 203 - AC_MSG_RESULT(yes) 204 - OCAMLWIN32=yes 205 - EXE=.exe 206 - else 207 - AC_MSG_RESULT(no) 208 - OCAMLWIN32=no 209 - EXE= 210 - fi 211 - rm -f check_arch.ml 212 - 213 - LIBEXT=`ocamlc -config | grep ext_lib | sed -e 's/.*\(\..*\)/\1/' ` 214 - OBJEXT=`ocamlc -config | grep ext_obj | sed -e 's/.*\(\..*\)/\1/' ` 215 - 216 - if test "$LABLGNOMECANVAS" = no ; then 217 - AC_MSG_WARN([lablgnomecanvas not found: the graph editor and view_graph will not be compiled]) 218 - fi 219 - 220 - # substitutions to perform 221 - AC_SUBST(OCAMLC) 222 - AC_SUBST(OCAMLOPT) 223 - AC_SUBST(OCAMLDEP) 224 - AC_SUBST(OCAMLLEX) 225 - AC_SUBST(OCAMLDOC) 226 - AC_SUBST(OCAMLYACC) 227 - AC_SUBST(OCAMLBEST) 228 - AC_SUBST(OCAMLVERSION) 229 - AC_SUBST(OCAMLLIB) 230 - AC_SUBST(OCAMLWEB) 231 - AC_SUBST(LABLGTK2) 232 - AC_SUBST(LABLGNOMECANVAS) 233 - AC_SUBST(OCAMLWIN32) 234 - AC_SUBST(EXE) 235 - AC_SUBST(LIBEXT) 236 - AC_SUBST(OBJEXT) 237 - AC_SUBST(INCLUDEGTK2) 238 - AC_SUBST(NATIVE_DYNLINK) 239 - 240 - # Finally create the Makefile from Makefile.in 241 - AC_OUTPUT(Makefile) 242 - chmod a-w Makefile
-28
editor/Makefile
··· 1 - 2 - test: 3 - make -C .. editor-test 4 - 5 - editor.opt: ed_*.ml 6 - make -C .. editor/editor.opt 7 - 8 - # tortuegpoint: tortue.ml 9 - # ocamlopt outils_math.ml 10 - # ocamlopt -o $@ graphics.cmxa outils_math.cmx $^ 11 - 12 - 13 - # graphEd.opt : outils_math.ml outils_tort.ml graphEd.ml 14 - # ocamlopt -o $@ graphics.cmxa -I .. ../graph.cmxa $^ 15 - 16 - 17 - # graphEdGTK : outils_math.ml outils_tort.ml graphEdGTK.ml 18 - # ocamlopt.opt -o $@ -I +lablgtk2 lablgtk.cmxa lablgnomecanvas.cmxa unix.cmxa -I .. ../graph.cmxa $^ 19 - 20 - # graphEdGTK.byte : outils_math.ml outils_tort.ml graphEdGTK.ml 21 - # ocamlc.opt -g -o $@ -I +lablgtk2 lablgtk.cma lablgnomecanvas.cma unix.cma -I .. ../graph.cma $^ 22 - 23 - # editor.opt: 24 - # make -C .. 25 - 26 - clean: 27 - rm -f *.opt 28 - rm -f *.cm[iox]
-9
misc/headache_config.txt
··· 1 - # Objective Caml source 2 - | ".*\\.ml[il4]?" -> frame open:"(*" line:"*" close:"*)" 3 - | ".*\\.mly" -> frame open:"/*" line:"*" close:"*/" 4 - # C source 5 - | ".*\\.c" -> frame open:"/*" line:"*" close:"*/" 6 - # Misc 7 - | "configure.in" -> frame open:"#" line:"#" close:"#" 8 - | "Makefile.in" -> frame open:"#" line:"#" close:"#" 9 - | "README" -> frame open:"*" line:"*" close:"*"
-14
misc/header.txt
··· 1 - 2 - OCamlgraph: a generic graph library for OCaml 3 - Copyright (C) 2004-2013 4 - Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles 5 - 6 - This software is free software; you can redistribute it and/or 7 - modify it under the terms of the GNU Library General Public 8 - License version 2.1, with the special exception on linking 9 - described in file LICENSE. 10 - 11 - This software is distributed in the hope that it will be useful, 12 - but WITHOUT ANY WARRANTY; without even the implied warranty of 13 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 -
-50
misc/make_intf.ml
··· 1 - (**************************************************************************) 2 - (* *) 3 - (* Ocamlgraph: a generic graph library for OCaml *) 4 - (* Copyright (C) 2004-2007 *) 5 - (* Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles *) 6 - (* *) 7 - (* This software is free software; you can redistribute it and/or *) 8 - (* modify it under the terms of the GNU Library General Public *) 9 - (* License version 2, with the special exception on linking *) 10 - (* described in file LICENSE. *) 11 - (* *) 12 - (* This software is distributed in the hope that it will be useful, *) 13 - (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) 14 - (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *) 15 - (* *) 16 - (**************************************************************************) 17 - 18 - (* $Id:$ *) 19 - 20 - (* script to build graph.mli from the set of all .mli files passed on the 21 - command line *) 22 - 23 - open Printf 24 - 25 - let cout = open_out "graph.mli" 26 - 27 - let is_cvs_line s = String.length s > 5 && String.sub s 0 6 = "(* $Id" 28 - 29 - let copy f = 30 - let cin = open_in f in 31 - while not (is_cvs_line (input_line cin)) do () done; 32 - begin 33 - try while true do fprintf cout " %s\n" (input_line cin) done 34 - with End_of_file -> () 35 - end; 36 - close_in cin 37 - 38 - let () = 39 - for i = 1 to Array.length Sys.argv - 1 do 40 - let f = Sys.argv.(i) in 41 - if not (Sys.file_exists f) then failwith (f ^ ": no suh file"); 42 - let m = String.capitalize (Filename.chop_suffix f ".mli") in 43 - fprintf cout "module %s : sig\n" m; 44 - copy f; 45 - fprintf cout "end\n\n" 46 - 47 - done 48 - 49 - let () = close_out cout 50 -
-50
view_graph/Makefile
··· 1 - OCAMLC=ocamlc.opt -dtypes 2 - OCAMLOPT=ocamlopt.opt 3 - OCAMLDOC=ocamldoc.opt 4 - 5 - GRAPH_DIR=.. 6 - GRAPH_LIB=graph.cmo 7 - 8 - INCLUDES=-I . -I +lablgtk2 -I $(GRAPH_DIR) 9 - 10 - FILES = viewGraph viewGraph_select viewGraph_utils viewGraph_test 11 - SRCS = $(wildcard *.ml *.mli) 12 - CMOS = $(FILES:%=%.cmo) 13 - CMXS = $(FILES:%=%.cmx) 14 - 15 - EXEC=viewgraph 16 - 17 - all : $(EXEC) $(CMXS) doc 18 - 19 - $(EXEC) : $(CMOS) $(GRAPH_DIR)/$(GRAPH_LIB) 20 - $(OCAMLC) $(INCLUDES) -o $@ \ 21 - unix.cma lablgtk.cma lablgnomecanvas.cma $(GRAPH_LIB) \ 22 - $(CMOS) 23 - 24 - depend: .depend 25 - 26 - .depend : $(SRCS) 27 - ocamldep $(SRCS) > $@ 28 - 29 - include .depend 30 - 31 - .PHONY: doc 32 - doc : $(CMOS) doc/intro.txt doc/style.css 33 - $(OCAMLDOC) -d doc \ 34 - -stars -html -intro doc/intro.txt -css-style style.css \ 35 - $(INCLUDES) $(SRCS) 36 - 37 - %.cmo :%.ml 38 - $(OCAMLC) $(INCLUDES) -c $< 39 - 40 - %.cmx :%.ml 41 - $(OCAMLOPT) $(INCLUDES) -c $< 42 - 43 - %.cmi :%.mli 44 - $(OCAMLC) $(INCLUDES) -c $< 45 - 46 - clean : 47 - rm -f $(EXEC) 48 - rm -f .depend 49 - rm -f $(FILES:%=%.cmo) $(FILES:%=%.cmx) $(FILES:%=%.o) $(FILES:%=%.cmi) $(FILES:%=%.annot) 50 - rm -f doc/*.html
-3
www/.cvsignore
··· 1 - *.fr.html 2 - *.en.html 3 - version.prehtml
-33
www/Makefile
··· 1 - 2 - INCLUDES = macros.prehtml version.prehtml 3 - 4 - OCAMLGRAPHHOME = /users/www-perso/projets/ocamlgraph 5 - 6 - ALL = index.fr.html index.en.html 7 - 8 - install: all 9 - scp $(ALL) filliatr@acces:$(OCAMLGRAPHHOME) 10 - 11 - all: $(ALL) 12 - 13 - clean:: 14 - rm -f *~ *.fr.html *.en.html 15 - 16 - YAMLPP=yamlpp macros.prehtml version.prehtml 17 - 18 - version.prehtml: 19 - make -C .. www/version.prehtml 20 - 21 - # RULES 22 - 23 - .SUFFIXES: .html .prehtml .fr.html .en.html 24 - 25 - %.fr.html: %.prehtml $(INCLUDES) 26 - $(YAMLPP) -l fr $< -o $@ 27 - 28 - %.html: %.prehtml $(INCLUDES) 29 - $(YAMLPP) $< -o $@ 30 - 31 - %.en.html: %.prehtml $(INCLUDES) 32 - $(YAMLPP) -l en $< -o $@ 33 -
-240
www/index.prehtml
··· 1 - <#def thisfile>index</#def> 2 - <#def top>../index</#def> 3 - 4 - <html> 5 - 6 - <head> 7 - <#iso> 8 - <title> 9 - ocamlgraph: <#fr>une biblioth�que de graphes pour Objective 10 - Caml</#fr><#en>an ocaml graph library</#en> 11 - </title> 12 - <meta name="Keywords" content="ocaml graph library"> 13 - </head> 14 - 15 - <body> 16 - 17 - <h1>OCamlgraph</h1> 18 - 19 - <#fr>OCamlgraph est une biblioth�que de graphes pour 20 - <a href="http://caml.inria.fr/">Objective Caml</a>. 21 - Elle pr�sente trois aspects diff�rents: 22 - <ul> 23 - <li> 24 - Elle fournit un module <a href="doc/Pack.html">Graph.Pack</a> 25 - regroupant une structure de donn�es pour des graphes et de nombreux 26 - op�rations et algorithmes sur ces graphes. 27 - <p> 28 - Il est conseill� de jeter un oeil � ce module en premier lieu pour 29 - comprendre le genre de choses fournies par OCamlgraph. Voir aussi le 30 - fichier <a href="demo.ml">demo.ml</a>. 31 - 32 - <li>Ensuite, OCamlgraph fournit plusieurs autres structrures de 33 - donn�es pour les graphes, pour ceux qui ne se satisferaient pas de 34 - la pr�c�dente. Certaines sont <a 35 - href="doc/Persistent.html">persistentes</a> et d'autre <a 36 - href="doc/Imperative.html">imp�ratives</a>. Certaines correspondent 37 - � des graphes orient�s et d'autres � des graphes 38 - non-orient�s. Certaines �tiquettent les noeuds, d'autres les ar�tes, 39 - d'autres les deux. etc. 40 - <p> 41 - L'interface <a href="doc/Sig.html">Sig</a> d�crit les signatures des 42 - structures de donn�es pour les graphes 43 - et les modules <a 44 - href="doc/Persistent.html">Persistent</a> et 45 - <a href="doc/Imperative.html">Imperative</a> fournissent des 46 - implantations. 47 - <p> 48 - Ces implantations sont �crites sous la forme de foncteurs : on 49 - sp�cifie le type des sommets, des ar�tes, de leurs labels, etc. et 50 - on r�cup�re alors une structure de donn�es. 51 - 52 - <p> 53 - 54 - <li>Enfin, OCamlgraph fournit plusieurs op�rations et algorithmes 55 - classiques sur les graphes. Ils sont �galement �crits comme des 56 - foncteurs, c'est-�-dire ind�pendamment de la structure de donn�es 57 - pour les graphes. En cons�quence, vous pouvez d�finir votre propre 58 - structure de donn�es et r�utiliser tous les algorithmes de cette 59 - biblioth�que -- il suffit de fournir quelques op�rations telles que 60 - l'it�ration sur tous les sommets, sur tous les successeurs d'un 61 - noeud, etc. Voir par exmple le module <a href="doc/Path.html">Path</a>. 62 - 63 - </ul> 64 - </#fr> 65 - 66 - <#en> 67 - OCamlgraph is a graph library for <a 68 - href="http://caml.inria.fr/">Objective Caml</a>. 69 - Its contribution is three-fold: 70 - <ul> 71 - <li> It provides an easy-to-use graph data structure together with several 72 - operations and algorithms over graphs, 73 - in <a href="doc/Pack.html">Graph.Pack</a>. 74 - It is a reasonably efficient imperative data structure for directed graphs 75 - with vertices and edges labeled with integers. 76 - <p> 77 - Have a look at this module first in order to get an overview of what 78 - this library provides. See also <a href="demo.ml">demo.ml</a>. 79 - 80 - <li> Then OCamlgraph provides several other graph implementations for those 81 - not satisfied with the one above. Some are <a 82 - href="doc/Persistent.html">persistent</a> (imutable) and other 83 - <a href="doc/Imperative.html">imperative</a> (mutable). Some are 84 - directed and other are not. 85 - Some have labels for vertices, or labels for edges, or both. 86 - Some have abstract types for vertices. etc. 87 - <p> 88 - See interface <a href="doc/Sig.html">Sig</a> for the graph 89 - signatures and modules <a 90 - href="doc/Persistent.html">Persistent</a> and 91 - <a href="doc/Imperative.html">Imperative</a> for the implementations. 92 - <p> 93 - These implementations are written as functors: you give the types of 94 - vertices labels, edge labels, etc. and you get the data structure as a 95 - result. 96 - 97 - <p> 98 - 99 - <li> Finally, OCamlgraph provides several classic operations and algorithms 100 - over graphs. They are also written as functors i.e. independently of the 101 - data structure for graphs. One consequence is that you can define your own 102 - data structure for graphs and yet re-use all the algorithms from this 103 - library -- you only need to provide a few operations such as iterating over 104 - all vertices, over the successors of a vertex, etc. 105 - See module <a href="doc/Path.html">Path</a> for an example. 106 - 107 - </ul> 108 - </#en> 109 - 110 - 111 - <h4>Documentation</h4> 112 - 113 - <#fr>Parcourir l'</#fr><#en>Browse the </#en><a href="doc">API</a>. 114 - <#fr>Note : Tous les modules sont regroup�s � l'int�rieur d'un unique module 115 - Graph.</#fr> 116 - <#en>Note: all modules are packaged into a single module Graph</#en>. 117 - 118 - <p> 119 - 120 - <a href="FAQ">FAQ</a> 121 - 122 - <p> 123 - <#fr>Articles pr�sentant OCamlgraph :</#fr> 124 - <#en>Papers describing OCamlgraph:</#en> 125 - <ul> 126 - <#fr> 127 - <li> <a href="http://www.lri.fr/~filliatr/ftp/publis/jfla05.ps.gz">Le foncteur 128 - sonne toujours deux fois</a> (<a 129 - href="http://pauillac.inria.fr/jfla/2005/">JFLA 2005</a>) 130 - </#fr> 131 - <li> 132 - <a href="http://www.lri.fr/~filliatr/ftp/publis/ocamlgraph.ps"> 133 - Designing a Generic Graph Library using ML Functors</a> 134 - (<a href="http://cs.shu.edu/tfp2007/">TFP 2007</a>) 135 - </ul> 136 - 137 - <p> 138 - 139 - <#fr>Exemples de code :</#fr><#en>Code Examples:</#en> 140 - <ul> 141 - <li><a href="sudoku.ml">sudoku.ml</a> : 142 - <#fr>r�solution du Sudoku en utilisant le module de coloration </#fr> 143 - <#en>solving the Sudoku using the graph coloring module</#en> 144 - <a href="doc/Coloring.html">Coloring</a> 145 - 146 - <li><a href="demo_planar.ml">demo_planar.ml</a> : 147 - <#fr>dessine un <a href="doc/Rand.html">graphe planaire 148 - al�atoire</a> 149 - et illustre les <a href="doc/Traverse.html">parcours</a> 150 - en profondeur et en largeur et l'algorithme de <a 151 - href="doc/Path.html">Dijkstra</a></#fr> 152 - <#en>displays a <a href="doc/Rand.html">random planar graph</a> 153 - and demonstrates <a href="doc/Traverse.html">depth-first 154 - and breadth-first traversals</a> and <a 155 - href="doc/Path.html">Dijkstra's algorithm</a></#en> 156 - 157 - <li><a href="color.ml">color.ml</a> : 158 - <#fr>dessine un <a href="doc/Rand.html">graphe planaire 159 - al�atoire</a> 160 - et le colorie avec 4 couleurs</#fr> 161 - <#en>displays a <a href="doc/Rand.html">random planar graph</a> 162 - and 4-color it</#en> 163 - </ul> 164 - 165 - <h4>Distribution</h4> 166 - 167 - <#def LICENSE><a href="download/LICENSE">LICENSE</a></#def> 168 - 169 - <#fr> 170 - OCamlgraph est distribu� librement, sous la licence GNU Library 171 - General Public License version 2, avec une exception concernant 172 - l'�dition de lien d�crite dans le fichier <#LICENSE>. <br> 173 - Il est disponible sous forme de sources : 174 - <ul> 175 - <li><a href="download/ocamlgraph-<#version>.tar.gz">ocamlgraph-<#version>.tar.gz</a> 176 - </ul> 177 - Vous pouvez acc�der � la <a href="download/">zone de t�l�chargement</a> directement. 178 - Voici les derniers <a href="download/CHANGES">changements</a>. 179 - </#fr> 180 - <#en> 181 - OCamlgraph is freely available, under the terms of the GNU Library 182 - General Public License version 2, with the special exception on linking 183 - described in file <#LICENSE>. 184 - <br> 185 - It is available as a source tarball: 186 - <ul> 187 - <li><a href="download/ocamlgraph-<#version>.tar.gz">ocamlgraph-<#version>.tar.gz</a> 188 - </ul> 189 - <p> 190 - You can access the <a href="download/">download zone</a> directly. 191 - Here are the recent <a href="download/CHANGES">CHANGES</a>. 192 - </#en> 193 - 194 - <p> 195 - 196 - <#fr>Vous pouvez �galement acc�der en lecture � la version de 197 - d�veloppement d'OCamlgraph sur github</#fr> 198 - <#en>Alternatively, you can access the current development version 199 - on github:</#en> 200 - <pre> 201 - <a href="https://github.com/backtracking/ocamlgraph">https://github.com/backtracking/ocamlgraph</a> 202 - </pre> 203 - 204 - <h4><#fr>Cr�dits</#fr><#en>Credits</#en></h4> 205 - 206 - <#fr>Auteurs</#fr> 207 - <#en>Authors</#en> 208 - <ul> 209 - <li><a href="http://www.lri.fr/~conchon/">Sylvain Conchon</a> 210 - <li><a href="http://www.lri.fr/~filliatr/">Jean-Christophe Filli�tre</a> 211 - <!-- <li><a href="http://www.lri.fr/~signoles/">Julien Signoles</a> --> 212 - <li>Julien Signoles 213 - </ul> 214 - 215 - <p> 216 - 217 - <#fr>Contributeurs ext�rieurs :</#fr> 218 - <#en>External contributors:</#en> 219 - <ul> 220 - <li>Nicolas Ayache 221 - <li><a href="http://www.ece.cmu.edu/~dbrumley/index.html">David Brumley</a> 222 - <li>Pierre-Lo�c Garoche 223 - <li>Ivan Jager 224 - <li>Ted Kremenek 225 - <li>Marc Lasson 226 - <li><a href="http://pauillac.inria.fr/~fpottier/">Fran�ois Pottier</a> 227 - <li><a href="http://cristal.inria.fr/~simonet/">Vincent Simonet</a> 228 - <li><a href="http://mattam.org">Matthieu Sozeau</a> 229 - <li><a href="http://www-imai.is.s.u-tokyo.ac.jp/~yuto/">Yuto Takei</a> 230 - <li><a href="http://www.mweissmann.de/">Markus Wei&szlig;mann</a> 231 - <li>Boris Yakobowski 232 - </ul> 233 - 234 - <p> 235 - <hr> 236 - 237 - <#drapeaux> 238 - 239 - </body> 240 - </html>
-16
www/macros.prehtml
··· 1 - 2 - <#def absolute>http://www.lri.fr/~filliatr</#def> 3 - 4 - <#def iso> 5 - <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 6 - <link rel="stylesheet" type="text/css" href="http://www.lri.fr/~filliatr/style.css"> 7 - </#def> 8 - 9 - <#def drapfr><img src="<#absolute>/icons/france.gif" alt="Fran�ais"></#def> 10 - <#def drapen><img src="<#absolute>/icons/us.gif" alt=American></#def> 11 - 12 - <#def drapeaux> 13 - <#fr><a href="<#thisfile>.en.html"><#drapen></a></#fr> 14 - <#en><a href="<#thisfile>.fr.html"><#drapfr></a></#en> 15 - </#def> 16 -