tools/examples: cleanup Makefile

Don't check if a target exist before installing it. For directory,
install doesn't complain, and for file it would prevent from updating
them. Also remove the existing loop and instead install all files with
a single call to $(INSTALL_DATA).

Remove XEN_CONFIGS-y which isn't used.

Remove "build" target.

Add an empty line after the first comment. The comment isn't about
$(XEN_READMES), it is about the makefile as a whole.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
This commit is contained in:
Anthony PERARD authored and Jan Beulich committed 2022-07-11 12:13:24 +02:00
1 parent 524cf4da66
commit 6899af7609
1 file changed
+3 -16
+3 -16
View File
@@ -2,6 +2,7 @@ XEN_ROOT = $(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
# Xen configuration dir and configs to go there.
XEN_READMES = README
XEN_CONFIGS += xlexample.hvm
@@ -10,14 +11,9 @@ XEN_CONFIGS += xlexample.pvhlinux
XEN_CONFIGS += xl.conf
XEN_CONFIGS += cpupool
XEN_CONFIGS += $(XEN_CONFIGS-y)
.PHONY: all
all:
.PHONY: build
build:
.PHONY: install
install: all install-readmes install-configs
@@ -26,12 +22,8 @@ uninstall: uninstall-readmes uninstall-configs
.PHONY: install-readmes
install-readmes:
[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
set -e; for i in $(XEN_READMES); \
do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
$(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
done
$(INSTALL_DATA) $(XEN_READMES) $(DESTDIR)$(XEN_CONFIG_DIR)
.PHONY: uninstall-readmes
uninstall-readmes:
@@ -39,14 +31,9 @@ uninstall-readmes:
.PHONY: install-configs
install-configs: $(XEN_CONFIGS)
[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
[ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
set -e; for i in $(XEN_CONFIGS); \
do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
$(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
done
$(INSTALL_DATA) $(XEN_CONFIGS) $(DESTDIR)$(XEN_CONFIG_DIR)
.PHONY: uninstall-configs
uninstall-configs:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.