[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH 2 of 6] Move the generation of ocaml/util/version.ml into the Makefile so that it can be done before the main build. This unbreaks the rpm build since 'hg id' will fail when run in a plain non-repo directory of sources
# HG changeset patch # User David Scott <dave.scott@xxxxxxxxxxxxx> # Date 1275056756 -3600 # Node ID 992d339655fcfeb047381988dec4ae8fa49cf9af # Parent 7dc324711406ed54269c32276db64b9458b152d9 Move the generation of ocaml/util/version.ml into the Makefile so that it can be done before the main build. This unbreaks the rpm build since 'hg id' will fail when run in a plain non-repo directory of sources. Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx> diff -r 7dc324711406 -r 992d339655fc Makefile --- a/Makefile Fri May 28 15:25:56 2010 +0100 +++ b/Makefile Fri May 28 15:25:56 2010 +0100 @@ -74,3 +74,15 @@ omake ocaml/util/version.ml omake phase1 phase2 omake doc + +.PHONY: version +version: + echo "let hg_id = \"$(shell hg id | sed -r 's/(.+)\s.*/\1/g')\"" > 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 + echo "let product_brand = \"$(PRODUCT_BRAND)\"" >> ocaml/util/version.ml + echo "let build_number = \"$(BUILD_NUMBER)\"" >> ocaml/util/version.ml + + .PHONY: clean + clean: diff -r 7dc324711406 -r 992d339655fc mk/Makefile --- a/mk/Makefile Fri May 28 15:25:56 2010 +0100 +++ b/mk/Makefile Fri May 28 15:25:56 2010 +0100 @@ -46,6 +46,7 @@ $(OUTPUT_XAPI) $(OUTPUT_XAPI_DEVEL) $(OUTPUT_CLI_RT) $(OUTPUT_SDK): $(call hg_req,xen-api) $(MY_MAIN_PACKAGES)/.dirstamp $(MAKE) clean + $(MAKE) -C $(REPO) version $(MAKE) -C $(REPO) rm -rf $(STAGING) $(STAGING_CLI_RT) diff -r 7dc324711406 -r 992d339655fc ocaml/util/OMakefile --- a/ocaml/util/OMakefile Fri May 28 15:25:56 2010 +0100 +++ b/ocaml/util/OMakefile Fri May 28 15:25:56 2010 +0100 @@ -19,15 +19,6 @@ OCamlLibrary(encodings, encodings) -version.ml: version.template - sed -e "s/@@@HG_ID@@@/$(shell hg id | sed -r 's/(.+)\s.*/\1/g')/" \ - -e "s/@@@HOSTNAME@@@/$(shell hostname)/" \ - -e "s/@@@DATE@@@/$(shell date -u +%Y-%m-%d)/" \ - -e "s/@@@PRODUCT_VERSION@@@/$(PRODUCT_VERSION)/" \ - -e "s/@@@PRODUCT_BRAND@@@/$(PRODUCT_BRAND)/" \ - -e "s/@@@BUILD_NUMBER@@@/$(BUILD_NUMBER)/" \ - < $< > $@ - .PHONY: clean clean: rm -f $(CLEAN_OBJS) diff -r 7dc324711406 -r 992d339655fc ocaml/util/version.template --- a/ocaml/util/version.template Fri May 28 15:25:56 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -let hg_id = "@@@HG_ID@@@" -let hostname = "@@@HOSTNAME@@@" -let date = "@@@DATE@@@" -let product_version = "@@@PRODUCT_VERSION@@@" -let product_brand = "@@@PRODUCT_BRAND@@@" -let build_number = "@@@BUILD_NUMBER@@@" _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |