Permalink
Browse files

Add a first build skeleton

Doesn't work totally yet, as ocp-build succeeds but does not build the the targets ...
  • Loading branch information...
1 parent e230494 commit 750fc50395d3cd6fec4faaa909377d033e866cad @samoht samoht committed Mar 5, 2012
Showing with 216 additions and 1 deletion.
  1. +52 −0 Makefile
  2. +164 −1 ocp-get.ocp
View
@@ -0,0 +1,52 @@
+OCPBUILD ?= ./_obuild/unixrun ./boot/ocp-build.boot
+WGET ?= wget
+TARGET = ocp-get
+
+.PHONY: all
+
+all: ./_obuild/unixrun compile clone
+ @
+
+scan: ./_obuild/unixrun
+ $(OCPBUILD) -scan
+sanitize: ./_obuild/unixrun
+ $(OCPBUILD) -sanitize
+byte: ./_obuild/unixrun
+ $(OCPBUILD) -byte
+opt: ./_obuild/unixrun
+ $(OCPBUILD) -asm
+./_obuild/unixrun:
+ mkdir -p ./_obuild
+ ocamlc -o ./_obuild/unixrun -make-runtime unix.cma
+
+compile: ./_obuild/unixrun clone
+ $(OCPBUILD) -init -scan -sanitize $(TARGET)
+
+clone: cudf extlib ocaml-pcre ocamlgraph
+
+cudf:
+ git clone git://scm.gforge.inria.fr/mancoosi-tools/cudf.git
+
+extlib:
+ $(WGET) http://ocaml-extlib.googlecode.com/files/extlib-1.5.2.tar.gz
+ tar xfvz extlib-1.5.2.tar.gz
+ mv extlib-1.5.2 extlib
+
+dose:
+ git clone git://scm.gforge.inria.fr/mancoosi-tools/dose.git
+
+ocaml-pcre:
+ $(WGET) http://hg.ocaml.info/release/pcre-ocaml/archive/release-6.2.5.tar.gz
+ tar xfvz release-6.2.5.tar.gz
+ mv pcre-ocaml-release-6.2.5 ocaml-pcre
+
+ocamlgraph:
+ $(WGET) http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz
+ tar xvfz ocamlgraph-1.8.1.tar.gz
+ mv ocamlgraph-1.8.1 ocamlgraph
+
+clean:
+ $(OCPBUILD) -clean
+
+# ocaml-re:
+# git clone https://github.com/avsm/ocaml-re
View
@@ -1,4 +1,167 @@
+begin library "extlib"
+ sort = true
+ files = [
+ "extlib/unzip.ml"
+ "extlib/uTF8.ml"
+ "extlib/uChar.ml"
+ "extlib/std.ml"
+ "extlib/refList.ml"
+ "extlib/pMap.ml"
+ "extlib/option.ml"
+ "extlib/optParse.ml"
+ "extlib/install.ml"
+ "extlib/IO.ml"
+ "extlib/global.ml"
+ "extlib/extString.ml"
+ "extlib/extList.ml"
+ "extlib/extLib.ml"
+ "extlib/extHashtbl.ml"
+ "extlib/extArray.ml"
+ "extlib/enum.ml"
+ "extlib/dynArray.ml"
+ "extlib/dllist.ml"
+ "extlib/bitSet.ml"
+ "extlib/base64.ml"
+ ]
+end
+
+begin library "pcre"
+ sort = true
+ files = [
+ "ocaml-pcre/lib/pcre_stubs.c"
+ "ocaml-pcre/lib/pcre.ml"
+ ]
+end
+
+begin library "cudf"
+ sort = true
+ files = [
+ "cudf/main_cudf_parse_822.ml"
+ "cudf/main_cudf_check.ml"
+ "cudf/cudf_types_pp.ml"
+ "cudf/cudf_types.ml"
+ "cudf/cudf_type_parser.mly"
+ "cudf/cudf_type_lexer.mll"
+ "cudf/cudf_printer.ml"
+ "cudf/cudf_parser.ml"
+ "cudf/cudf_conf.ml"
+ "cudf/cudf_checker.ml"
+ "cudf/cudf_c.ml"
+ "cudf/cudf_822_parser.mly"
+ "cudf/cudf_822_lexer.mll"
+ "cudf/cudf.ml"
+ ]
+ requires = [
+ "extlib"
+ ]
+end
+
+begin library "graph"
+ sorted = true
+ files = [
+ "ocamlgraph/lib/bitv.ml"
+ "ocamlgraph/lib/unionfind.ml"
+ "ocamlgraph/lib/heap.ml"
+ pack Graph [
+ "ocamlgraph/src/version.ml"
+ "ocamlgraph/src/util.ml"
+ "ocamlgraph/src/traverse.ml"
+ "ocamlgraph/src/topological.ml"
+ "ocamlgraph/src/strat.ml"
+ "ocamlgraph/src/sig_pack.mli"
+ "ocamlgraph/src/sig.mli"
+ "ocamlgraph/src/rand.ml"
+ "ocamlgraph/src/persistent.ml"
+ "ocamlgraph/src/path.ml"
+ "ocamlgraph/src/pack.ml"
+ "ocamlgraph/src/oper.ml"
+ "ocamlgraph/src/minsep.ml"
+ "ocamlgraph/src/md.ml"
+ "ocamlgraph/src/mcs_m.ml"
+ "ocamlgraph/src/kruskal.ml"
+ "ocamlgraph/src/imperative.ml"
+ "ocamlgraph/src/graphviz.ml"
+ "ocamlgraph/src/gml.mll"
+ "ocamlgraph/src/gmap.ml"
+ "ocamlgraph/src/flow.ml"
+ "ocamlgraph/src/fixpoint.ml"
+ "ocamlgraph/src/dot_parser.mly"
+ "ocamlgraph/src/dot_lexer.mll"
+ "ocamlgraph/src/dot_ast.mli"
+ "ocamlgraph/src/dot.ml"
+ "ocamlgraph/src/delaunay.ml"
+ "ocamlgraph/src/components.ml"
+ "ocamlgraph/src/coloring.ml"
+ "ocamlgraph/src/cliquetree.ml"
+ "ocamlgraph/src/classic.ml"
+ "ocamlgraph/src/builder.ml"
+ "ocamlgraph/src/blocks.ml"
+ ]]
+end
+
+begin library "dose"
+ sort = true
+ pp = "camlp4o Camlp4MacroParser.cmo"
+ files = [
+ pack Common [
+ "dose/common/util.ml"
+ "dose/common/url.ml"
+ "dose/common/input.ml"
+ "dose/common/cudfDiff.ml"
+ "dose/common/cudfAdd.ml"
+ "dose/common/edosSolver.ml"
+(* "dose/common/minisatSolver.ml" *)
+ ]
+
+ pack Debian [
+ "dose/deb/format822_parser.mly"
+ "dose/deb/format822_lexer.mll"
+ "dose/deb/format822.ml"
+ "dose/deb/debcudf.ml"
+ "dose/deb/packages_parser.mly"
+ "dose/deb/packages_lexer.mll"
+ "dose/deb/packages.ml"
+ "dose/deb/version.ml"
+ "dose/deb/sources.ml"
+ "dose/deb/release.ml"
+ "dose/deb/evolution.ml"
+ "dose/deb/edsp.ml"
+ "dose/deb/debutil.ml"
+ "dose/deb/architecture.ml"
+ "dose/deb/apt.ml"
+ ]
+
+ pack Algo [
+ "dose/algo/tests.ml"
+ "dose/algo/strongdeps_int.ml"
+ "dose/algo/strongdeps.ml"
+ "dose/algo/strongconflicts_int.ml"
+ "dose/algo/strongconflicts.ml"
+ "dose/algo/statistics.ml"
+ "dose/algo/flatten.ml"
+ "dose/algo/dominators.ml"
+ "dose/algo/diagnostic_int.ml"
+ "dose/algo/diagnostic.ml"
+ "dose/algo/depsolver_int.ml"
+ "dose/algo/depsolver.ml"
+ "dose/algo/defaultgraphs.ml"
+ ]]
+
+ requires = [
+ "pcre"
+ "extlib"
+ "cudf"
+ "graph"
+ ]
+
+end
+
begin program "ocp-get"
files = [ "ocp.ml" ]
- requires = [ "bat" "unix" ]
+ requires = [
+ "cudf"
+ "dose"
+ "bat"
+ "unix"
+ ]
end

0 comments on commit 750fc50

Please sign in to comment.