Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ api-doc: version

.PHONY: api-libs-doc
api-libs-doc:
@(cd ../xen-api-libs.hg 2> /dev/null && $(MAKE) doc) || \
@(cd ../xen-api-libs 2> /dev/null && $(MAKE) doc) || \
(echo ">>> If you have a myclone of xen-api-libs, its documentation will be included. <<<")

.PHONY: version
version:
echo "(* This file is autogenerated. Grep for e17512ce-ba7c-11df-887b-0026b9799147 (random uuid) to see where it comes from. ;o) *)" > ocaml/util/version.ml
echo "let hg_id = \"$(shell hg id | sed -r 's/(.+)\s.*/\1/g')\"" >> ocaml/util/version.ml
echo "let hg_id = \"$(shell git show-ref --head | grep -E ' HEAD$' | cut -f 1 -d ' ')\"" >> ocaml/util/version.ml
echo "let hostname = \"$(shell hostname)\"" >> ocaml/util/version.ml
echo "let date = \"$(shell date -u +%Y-%m-%d)\"" >> ocaml/util/version.ml
echo "let product_version = \"$(PRODUCT_VERSION)\"" >> ocaml/util/version.ml
Expand All @@ -105,7 +105,8 @@ version:
.PHONY: srpm
srpm:
mkdir -p $(RPM_SOURCESDIR) $(RPM_SPECSDIR) $(RPM_SRPMSDIR)
hg archive -t tbz2 $(RPM_SOURCESDIR)/xapi-0.2.tar.bz2
while ! [ -d .git ]; do cd ..; done; \
git archive --format=tar HEAD | bzip2 -z > $(RPM_SOURCESDIR)/xapi-0.2.tar.bz2
make -C $(REPO) version
rm -f $(RPM_SOURCESDIR)/xapi-version.patch
(cd $(REPO); diff -u /dev/null ocaml/util/version.ml > $(RPM_SOURCESDIR)/xapi-version.patch) || true
Expand Down
5 changes: 4 additions & 1 deletion mk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) $(OUTPUT_XAPI_SRC)
echo api gpl file $(JQUERY_TV_DIST) >> $@

$(OUTPUT_XAPI_SRC):
cd $(REPO) && hg archive -t tbz2 $(HG_EXCLUDE) $@
if cd $(REPO); then \
while ! [ -d .git ]; do cd ..; done; \
git archive --format=tar HEAD | bzip2 -z > $@; \
fi;

$(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(MY_MAIN_PACKAGES)/.dirstamp $(RPM_DIRECTORIES)
$(MAKE) clean
Expand Down
2 changes: 1 addition & 1 deletion ocaml/doc/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
else:
packages = ""

doc_command = 'ocamlfind ocamldoc -v ' + packages + ' -I +threads -sort -g /myrepos/xen-api.hg/ocaml/doc/odoc_json.cma -d ' + dest + ' '
doc_command = 'ocamlfind ocamldoc -v ' + packages + ' -I +threads -sort -g /myrepos/xen-api/ocaml/doc/odoc_json.cma -d ' + dest + ' '

files = []
for m in modules:
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xenops/device.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ open D
let qemu_dm_ready_timeout = 60. *. 20. (* seconds *)
let qemu_dm_shutdown_timeout = 60. *. 20. (* seconds *)

(* keys read by vif udev script (keep in sync with api.hg:scripts/vif) *)
(* keys read by vif udev script (keep in sync with api:scripts/vif) *)
let vif_udev_keys = "promiscuous" :: (List.map (fun x -> "ethtool-" ^ x) [ "rx"; "tx"; "sg"; "tso"; "ufo"; "gso" ])

(****************************************************************************************)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xenops/xenvm.readme
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following command are supported:
It's possible to run with xen-unstable directly, but you need the
qemu-dm-wrapper script and xenguest binary in /opt/xensource/bin/.
They are available in ocaml/xenguest/xenguest and scripts/qemu-dm-wrapper
in the api.hg repository. For people that can't build ocaml tools,
in the api repository. For people that can't build ocaml tools,
you can get the binary/script on some testings machines, but be careful about
architecture, and out-of-date-ness.

Expand Down
22 changes: 13 additions & 9 deletions scripts/build-xencloud
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,28 @@ fi
echo "Placing repositories in ${REPO}"
mkdir -p ${REPO}

for repo in xen-dist-ocaml.hg xen-api-libs.hg xen-api.hg; do
for repo in xen-dist-ocaml.hg xen-api-libs xen-api; do
if [ ! -e "$REPO/$repo" ]; then
echo Cloning $UPSTREAM_URL/$repo to $REPO/$repo
hg clone $UPSTREAM_URL/$repo $REPO/$repo
else
echo "$REPO/$repo already exists; no need to re-clone"
fi
echo Cloning $UPSTREAM_URL/$repo to $REPO/$repo;
if echo $UPSTREAM_URL/$repo | grep -E "\.hg$" > /dev/null; then
hg clone $UPSTREAM_URL/$repo $REPO/$repo;
else
git clone $UPSTREAM_URL/$repo $REPO/$repo;
fi;
else
echo "$REPO/$repo already exists; no need to re-clone";
fi;
done

echo "Building ocaml packages"
cd $REPO/xen-dist-ocaml.hg
make
make clean
echo "Building XCP-specific libraries"
cd $REPO/xen-api-libs.hg
cd $REPO/xen-api-libs
./rebuild
echo "Building XCP toolstack"
cd $REPO/xen-api.hg
cd $REPO/xen-api
COMPILE_JAVA=no make
COMPILE_JAVA=no make install
echo "XCP toolstack in $REPO/xen-api.hg/dist/staging"
echo "XCP toolstack in $REPO/xen-api/dist/staging"