Skip to content

Commit

Permalink
Merge pull request #18 from djs55/fixes
Browse files Browse the repository at this point in the history
Fix the makefiles
  • Loading branch information
djs55 committed Oct 16, 2014
2 parents 66e2118 + 75b7337 commit 8907d69
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ generator/_build
generator/main.native
ocaml/lib/v.ml
ocaml/lib/d.ml
python/V.py
python/D.py
ocaml/lib/p.ml
doc
ocaml/examples
python/build
python/d.py
python/v.py
python/p.py
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@ build:
mkdir -p ocaml/examples
./generator/main.native
make -C ocaml
make -C python

.PHONY: html
html: build
./generator/main.native -html

.PHONY: install
install:
make -C ocaml install
make -C python install

.PHONY: reinstall
reinstall:
make -C ocaml reinstall
make -C python reinstall

.PHONY: clean
clean:
make -C generator clean
make -C ocaml clean
make -C python clean
1 change: 1 addition & 0 deletions generator/src/control.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
open Types
open Type

let api =
let volume_decl =
Expand Down
13 changes: 10 additions & 3 deletions generator/src/main.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
open Types
open Files

let _ =
let generate_html = ref false in
Arg.parse [
"-html", Arg.Set generate_html, "Output HTML docs";
] (fun x -> Printf.fprintf stderr "Unknown argument: %s\n%!" x; exit 1)
"Generate OCaml/Python/HTML documentation";

let open Types in
let open Files in
let apis = [
Plugin.api;
Control.api;
Expand All @@ -10,7 +16,8 @@ let _ =
(* Prepend the debug_info argument *)
let apis = List.map Types.prepend_dbg apis in

Www.write apis;
if !generate_html
then Www.write apis;

List.iter
(fun api ->
Expand Down
14 changes: 14 additions & 0 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PREFIX?=/

.PHONY: build
build:
python setup.py build

.PHONY: clean
clean:
python setup.py clean
rm -rf build

.PHONY: install
install: build
python setup.py install --prefix $(PREFIX)
3 changes: 3 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from distutils.core import setup
setup (name = "xapi-storage", version = "0.1",
py_modules = ["d", "p", "v", "xapi"])

0 comments on commit 8907d69

Please sign in to comment.