From: Ian Campbell Subject: Re: [PATCH 08/12] tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path Date: Fri, 2 May 2014 11:53:22 +0100 Message-ID: <1399028002.32736.33.camel@kazak.uk.xensource.com> References: <1398328615-28461-1-git-send-email-olaf@aepfle.de> <1398328615-28461-9-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398328615-28461-9-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-24 at 10:36 +0200, Olaf Hering wrote: > @@ -45,11 +46,15 @@ install: all install-initd install-scripts install-udev > install-initd: > [ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) > [ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) > - $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(INITD_DIR) > + set -e; for i in $(XEN_INIT_SCRIPTS); \ > + do \ > + o="$(DESTDIR)$(INITD_DIR)/$$i"; \ > + sed 's|@@XEN_SCRIPT_DIR@@|$(XEN_SCRIPT_DIR)|g' \ > + init.d/$$i > "$$o"; \ > + chmod 755 "$$o"; \ > + done I'm not entirely comfortable with doing this sort of thing at install, rather than build, time. It has subtle issues with partial success and the chmod etc. I think you should rename all the input files foo.in and generate foo from that at build time, then install as normal here using INSTALL_PROG. Don't forget to update .*ignore. Ian.