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

Re: [Xen-devel] [PATCH v3 7/7] systemd: add support initial xen systemd service files



On Wed, 2014-03-19 at 14:07 -0700, Luis R. Rodriguez wrote:
> As for integration with xen, we house keep all the systemd files
> under a new directory tools/hotplug/Linux/systemd/ and will be
> targetted
> by default when building on Linux systems (CONFIG_Linux) given the low
> overhead of only having to only sed the meta @VARIABLES@.

Could configure not generate these more easily than what you have below?
It could still be conditional on Linux I'd have though, given a little
bit of autofoo ninjutsu.

> +%.socket: %.socket.in
> +       cp $< $@
> +       @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g'                $@
> +       @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g'                  $@
> +       @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g'  $@
> +       @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g'                $@
> +
> +%.service: %.service.in
> +       cp $< $@
> +       @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g'                $@
> +       @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g'                  $@
> +       @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g'  $@
> +       @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g'                $@
> +
> +%.mount: %.mount.in
> +       cp $< $@
> +       @sed -i -e 's|\@SBINDIR\@|$(SBINDIR)|g'                $@
> +       @sed -i -e 's|\@BINDIR\@|$(BINDIR)|g'                  $@
> +       @sed -i -e 's|\@XEN_RUN_DIR\@|$(XEN_RUN_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LOG_DIR\@|$(XEN_LOG_DIR)|g'        $@
> +       @sed -i -e 's|\@XEN_LIB_STORED\@|$(XEN_LIB_STORED)|g'  $@
> +       @sed -i -e 's|\@LIBEXEC\@|$(LIBEXEC)|g'                $@ 

If you do keep this then itis crying out for a helper macro/make
function.

I though we had one TBH.




_______________________________________________
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®.