forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request xapi-project#12 from kc284/master
CA-276606: Ported build from _oasis to jbuilder.
- Loading branch information
Showing
13 changed files
with
148 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
*.swp | ||
_build/ | ||
setup.data | ||
setup.log | ||
setup.bin | ||
*.install | ||
.merlin | ||
|
||
*.orig | ||
*.rej | ||
xcp_inventory_config.ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,22 @@ | ||
.PHONY: all clean install build distclean | ||
all: build doc | ||
.PHONY: build clean release test reindent install uninstall | ||
|
||
NAME=xcp-inventory | ||
J=4 | ||
build: | ||
jbuilder build @install --dev | ||
|
||
export OCAMLRUNPARAM=b | ||
|
||
setup.ml: | ||
oasis setup | ||
|
||
setup.bin: setup.ml lib/xcp_inventory_config.ml | ||
@ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $< | ||
@rm -f setup.cmx setup.cmi setup.o setup.cmo | ||
|
||
setup.data: setup.bin | ||
@./setup.bin -configure --enable-tests | ||
|
||
build: setup.data setup.bin | ||
@./setup.bin -build -j $(J) | ||
|
||
doc: setup.data setup.bin | ||
@./setup.bin -doc -j $(J) | ||
|
||
install: setup.bin | ||
@./setup.bin -install | ||
|
||
uninstall: | ||
@ocamlfind remove $(NAME) || true | ||
|
||
test: setup.bin build | ||
@./setup.bin -test | ||
clean: | ||
jbuilder clean | ||
|
||
reinstall: setup.bin | ||
@ocamlfind remove $(NAME) || true | ||
@./setup.bin -reinstall | ||
release: | ||
jbuilder build @install | ||
|
||
clean: | ||
@ocamlbuild -clean | ||
@rm -f setup.data setup.log setup.bin | ||
test: | ||
jbuilder runtest --no-buffer | ||
|
||
lib/xcp_inventory_config.ml: | ||
@echo "You need to run configure first" | ||
@exit 1 | ||
reindent: | ||
git ls-files '*.ml*' | xargs ocp-indent --syntax cstruct -i | ||
|
||
real-configure: configure.ml | ||
ocamlfind ocamlc -linkpkg -package findlib,cmdliner -o real-configure configure.ml | ||
@rm -f configure.cm* | ||
#requires odoc | ||
doc: | ||
jbuilder build @doc | ||
|
||
distclean: clean | ||
rm -f lib/xcp_inventory_config.ml | ||
.DEFAULT_GOAL := release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
make real-configure | ||
./real-configure $* | ||
D=$(mktemp -d /tmp/configure.XXXXX) | ||
function cleanup { | ||
cd / | ||
rm -rf $D | ||
} | ||
trap cleanup EXIT | ||
|
||
cp configure.ml $D | ||
(cd $D; ocamlfind ocamlc -linkpkg -package findlib,cmdliner -o configure configure.ml) | ||
$D/configure $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(jbuild_version 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(jbuild_version 1) | ||
|
||
(library ( | ||
(name inventory) | ||
(public_name xcp-inventory) | ||
(wrapped false) | ||
(libraries ( | ||
uuidm | ||
astring | ||
xapi-stdext-unix | ||
xapi-stdext-threads | ||
threads | ||
)) | ||
)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
opam-version: "1.2" | ||
name: "xapi-inventory" | ||
maintainer: "xen-api@lists.xen.org" | ||
authors: "xen-api@lists.xen.org" | ||
homepage: "https://github.com/xapi-project/xcp-inventory" | ||
bug-reports: "https://github.com/xapi-project/xcp-inventory/issues" | ||
dev-repo: "git://github.com/xapi-project/xcp-inventory.git" | ||
tags: [ "org:xapi-project" ] | ||
build: [ | ||
["./configure" "--default_inventory=%{prefix}%/etc"] | ||
[ "jbuilder" "build" "-p" name "-j" jobs ] | ||
] | ||
build-test: [[ "jbuilder" "runtest" "-p" name "-j" jobs ]] | ||
depends: [ | ||
"xcp-inventory" | ||
] |
Oops, something went wrong.