From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: keir@xen.org, Ian Campbell <ian.campbell@citrix.com>,
stefano.stabellini@eu.citrix.com, tim@xen.org,
julien.grall@citrix.com, jbeulich@suse.com
Subject: [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
Date: Wed, 17 Jul 2013 16:37:53 +0100 [thread overview]
Message-ID: <1374075473-32502-3-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1374075441.26728.14.camel@kazak.uk.xensource.com>
This is consistent with the uninstall target and also shortens some longish
lines.
$(Z) be used in the depencies when it is declared in this way, so expand it.
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/Makefile | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/xen/Makefile b/xen/Makefile
index 0a20662..2bb5851 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -30,26 +30,28 @@ endif
.PHONY: _build
_build: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
-_build: $(TARGET)$(Z)
+_build: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
.PHONY: _install
_install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
-_install: $(TARGET)$(Z)
- [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
- $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION)
- ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)
- ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION)
- ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))
- $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
+_install: D=$(DESTDIR)
+_install: T=$(notdir $(TARGET))
+_install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
+ [ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot
+ $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION)
+ ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)
+ ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION)
+ ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)
+ $(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
- [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \
- $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \
- ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \
+ [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
+ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
+ ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \
+ ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
+ ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \
if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
- $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \
- elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \
+ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
+ elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \
echo 'EFI installation only partially done (EFI_VENDOR not set)' >&2; \
fi; \
fi
--
1.7.2.5
next prev parent reply other threads:[~2013-07-17 15:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 15:37 [PATCH 0/3] xen: various changes to what we install in /boot Ian Campbell
2013-07-17 15:37 ` [PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary Ian Campbell
2013-07-17 16:32 ` Keir Fraser
2013-07-17 16:44 ` Julien Grall
2013-07-18 7:34 ` Jan Beulich
2013-07-18 7:54 ` Ian Campbell
2013-07-17 15:37 ` [PATCH 2/3] xen: x86: drop the ".gz" suffix when installing Ian Campbell
2013-07-17 16:33 ` Keir Fraser
2013-07-17 16:53 ` Julien Grall
2013-07-17 15:37 ` Ian Campbell [this message]
2013-07-17 16:33 ` [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target Keir Fraser
2013-07-17 16:54 ` Julien Grall
2013-07-18 7:26 ` Jan Beulich
2013-07-18 7:54 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374075473-32502-3-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.