[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] oxenstored: generate a paths module


  • To: Wei Liu <wei.liu2@xxxxxxxxxx>
  • From: David Scott <dave@xxxxxxxxxx>
  • Date: Fri, 10 Jun 2016 21:27:39 +0100
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 10 Jun 2016 20:27:44 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=recoil.org; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= selector1; b=wCuTbtaENkcUX149tDZehP6s1ISPmyz7iH08EHgElWMOEyIdoMH 57RDtF6e1swtULLgHfJi2o9HVHOJm2Q/w72xG+Os6ZgN+xI6W4JP6f5QGlKgjCg9 ZaBcmq7+b4QEpRMISsgUDpNjjO51cpNj+d1su1mXdBPDJo/JAFHbB8xI=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Looks fine to me:

Acked-by: David Scott <dave@xxxxxxxxxx>

> On 10 Jun 2016, at 15:25, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
> 
> That file includes all paths generated by configure. It will be used to
> get rid of hard-coded paths in code.
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: David Scot <dave@xxxxxxxxxx>
> 
> The paths module is the first one in object list so that it gets built
> first. This seems to be the practice for managing dependency in
> oxenstored?
> ---
> .gitignore                     |  1 +
> tools/ocaml/Makefile.rules     | 11 +++++++++++
> tools/ocaml/xenstored/Makefile |  6 ++++++
> 3 files changed, 18 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 1494c58..8e0a177 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -350,6 +350,7 @@ tools/ocaml/libs/xentoollog/xentoollog.ml
> tools/ocaml/libs/xentoollog/xentoollog.mli
> tools/ocaml/xenstored/oxenstored
> tools/ocaml/xenstored/oxenstored.conf
> +tools/ocaml/xenstored/paths.ml
> tools/ocaml/test/xtl
> tools/ocaml/test/send_debug_keys
> tools/ocaml/test/list_domains
> diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
> index 1796060..a893c42 100644
> --- a/tools/ocaml/Makefile.rules
> +++ b/tools/ocaml/Makefile.rules
> @@ -95,3 +95,14 @@ $(foreach lib,$(OCAML_LIBRARY),$(eval $(call 
> OCAML_LIBRARY_template,$(lib))))
> $(foreach lib,$(OCAML_NOC_LIBRARY),$(eval $(call 
> OCAML_NOC_LIBRARY_template,$(lib))))
> $(foreach p,$(OCAML_PROGRAM),$(eval $(call OCAML_PROGRAM_template,$(p))))
> $(foreach p,$(C_PROGRAM),$(eval $(call C_PROGRAM_template,$(p))))
> +
> +buildmakevars2module = $(eval $(call buildmakevars2module-closure,$(1)))
> +define buildmakevars2module-closure
> +    $(1): .phony
> +     rm -f $(1).tmp; \
> +     $(foreach var, $(BUILD_MAKE_VARS), \
> +               printf "let %s = \"%s\";;\n" \
> +                      $(shell echo $(var) | tr '[:upper:]' '[:lower:]') \
> +                      $($(var)) >>$(1).tmp;) \
> +     $(call move-if-changed,$(1).tmp,$(1))
> +endef
> diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
> index dce9e70..40aa288 100644
> --- a/tools/ocaml/xenstored/Makefile
> +++ b/tools/ocaml/xenstored/Makefile
> @@ -33,6 +33,7 @@ OCAML_LIBRARY += systemd
> LIBS_systemd += $(LDFLAGS-y)
> 
> OBJS = define \
> +     paths \
>       stdext \
>       trie \
>       config \
> @@ -87,3 +88,8 @@ install: all
>       $(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR)
> 
> include $(OCAML_TOPLEVEL)/Makefile.rules
> +
> +genpath-target = $(call buildmakevars2module,paths.ml)
> +$(eval $(genpath-target))
> +
> +GENERATED_FILES += paths.ml
> -- 
> 2.1.4
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.