[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Clean up duplication of 'install' macros in the Makefiles.
# HG changeset patch # User john.levon@xxxxxxx # Date 1161088622 25200 # Node ID 833f04aee836304d5f232daf18576952bb436f1b # Parent 9edcfe091b8e080c461d432549f316fd5b264c7e Clean up duplication of 'install' macros in the Makefiles. Signed-off-by: John Levon <john.levon@xxxxxxx> diff --git a/docs/Makefile b/docs/Makefile --- a/docs/Makefile +++ b/docs/Makefile @@ -1,8 +1,9 @@ #!/usr/bin/make -f +XEN_ROOT=.. +include $(XEN_ROOT)/Config.mk + VERSION = xen-unstable -INSTALL = install -INSTALL_DIR = $(INSTALL) -d -m0755 PS2PDF := ps2pdf DVIPS := dvips diff --git a/tools/blktap/drivers/Makefile b/tools/blktap/drivers/Makefile --- a/tools/blktap/drivers/Makefile +++ b/tools/blktap/drivers/Makefile @@ -3,11 +3,9 @@ include $(XEN_ROOT)/tools/Rules.mk INCLUDES += -I.. -I../lib -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 IBIN = blktapctrl tapdisk QCOW_UTIL = img2qcow qcow2raw qcow-create -INSTALL_DIR = /usr/sbin +INST_DIR = /usr/sbin LIBAIO_DIR = ../../libaio/src CFLAGS += -Werror @@ -58,7 +56,7 @@ img2qcow qcow2raw qcow-create: %: $(BLK- $(CC) $(CFLAGS) -o $* $(BLK-OBJS) $*.c $(AIOLIBS) $(LIBS) install: all - $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(DESTDIR)$(INSTALL_DIR) + $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(DESTDIR)$(INST_DIR) clean: rm -rf *.o *~ $(DEPS) xen TAGS $(IBIN) $(LIB) $(QCOW_UTIL) diff --git a/tools/blktap/lib/Makefile b/tools/blktap/lib/Makefile --- a/tools/blktap/lib/Makefile +++ b/tools/blktap/lib/Makefile @@ -6,10 +6,6 @@ SONAME = libblktap.so.$(MAJOR) SONAME = libblktap.so.$(MAJOR) BLKTAP_INSTALL_DIR = /usr/sbin - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I $(XEN_XENSTORE) diff --git a/tools/console/Makefile b/tools/console/Makefile --- a/tools/console/Makefile +++ b/tools/console/Makefile @@ -4,10 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk DAEMON_INSTALL_DIR = /usr/sbin CLIENT_INSTALL_DIR = /usr/$(LIBDIR)/xen/bin - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 CFLAGS += -Werror -g diff --git a/tools/examples/Makefile b/tools/examples/Makefile --- a/tools/examples/Makefile +++ b/tools/examples/Makefile @@ -1,10 +1,5 @@ XEN_ROOT = ../../ XEN_ROOT = ../../ include $(XEN_ROOT)/tools/Rules.mk - -INSTALL = install -INSTALL_DIR = $(INSTALL) -d -m0755 -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DATA = $(INSTALL) -m0644 # Init scripts. XEND_INITD = init.d/xend diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk # hvmloader is a 32-bit protected mode binary. # It belongs in /usr/lib, not /usr/lib64. TARGET := hvmloader/hvmloader -INSTALL_DIR := $(DESTDIR)/usr/lib/xen/boot +INST_DIR := $(DESTDIR)/usr/lib/xen/boot SUBDIRS := SUBDIRS += rombios @@ -29,8 +29,8 @@ all: .PHONY: install install: all - [ -d $(INSTALL_DIR) ] || install -d -m0755 $(INSTALL_DIR) - [ ! -e $(TARGET) ] || install -m0644 $(TARGET) $(INSTALL_DIR) + [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR) + [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR) .PHONY: clean clean: diff --git a/tools/firmware/acpi/Makefile b/tools/firmware/acpi/Makefile --- a/tools/firmware/acpi/Makefile +++ b/tools/firmware/acpi/Makefile @@ -53,7 +53,7 @@ iasl: wget $(IASL_URL) tar xzf $(IASL_VER).tar.gz make -C $(IASL_VER)/compiler - install $(IASL_VER)/compiler/iasl /usr/bin/iasl + $(INSTALL_PROG) $(IASL_VER)/compiler/iasl /usr/bin/iasl $(ACPI_GEN):$(C_SRC) $(H_SRC) acpi_dsdt.c $(HOSTCC) -o $(ACPI_GEN) $(HOSTCFLAGS) $(shell ls *.c) diff --git a/tools/ioemu/Makefile.target b/tools/ioemu/Makefile.target --- a/tools/ioemu/Makefile.target +++ b/tools/ioemu/Makefile.target @@ -555,10 +555,10 @@ install: all install: all mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)" ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" -endif - install -m 755 $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)" - install -m 755 $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)" + $(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)" +endif + $(INSTALL_PROG) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)" + $(INSTALL_PROG) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)" ifneq ($(wildcard .depend),) include .depend diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -1,14 +1,8 @@ - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DATA = $(INSTALL) -m0644 -INSTALL_DIR = $(INSTALL) -d -m0755 +XEN_ROOT = ../.. +include $(XEN_ROOT)/tools/Rules.mk MAJOR = 3.0 MINOR = 0 - -XEN_ROOT = ../.. -include $(XEN_ROOT)/tools/Rules.mk CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c diff --git a/tools/misc/Makefile b/tools/misc/Makefile --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -1,7 +1,3 @@ INSTALL = install -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 - XEN_ROOT=../.. include $(XEN_ROOT)/tools/Rules.mk diff --git a/tools/misc/lomount/Makefile b/tools/misc/lomount/Makefile --- a/tools/misc/lomount/Makefile +++ b/tools/misc/lomount/Makefile @@ -1,8 +1,3 @@ INSTALL = install -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 -INSTALL_DATA = $(INSTALL) -m0644 - XEN_ROOT=../../.. include $(XEN_ROOT)/tools/Rules.mk diff --git a/tools/misc/mbootpack/Makefile b/tools/misc/mbootpack/Makefile --- a/tools/misc/mbootpack/Makefile +++ b/tools/misc/mbootpack/Makefile @@ -1,10 +1,6 @@ # # Makefile for mbootpack # -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 - XEN_ROOT=../../.. include $(XEN_ROOT)/tools/Rules.mk diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile --- a/tools/misc/miniterm/Makefile +++ b/tools/misc/miniterm/Makefile @@ -1,9 +1,5 @@ XEN_ROOT:=../../.. XEN_ROOT:=../../.. include $(XEN_ROOT)/tools/Rules.mk - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 TARGET = miniterm diff --git a/tools/vnet/doc/Makefile b/tools/vnet/doc/Makefile --- a/tools/vnet/doc/Makefile +++ b/tools/vnet/doc/Makefile @@ -1,11 +1,10 @@ #!/usr/bin/make -f # -*- mode: Makefile; -*- +XEN_ROOT = ../../.. +include $(XEN_ROOT)/tools/Rules.mk VERSION = 1.0 HEADER = Vnet - -INSTALL = install -INSTALL_DIR = $(INSTALL) -d -m0755 PS2PDF := ps2pdf DVIPS := dvips diff --git a/tools/vnet/examples/Makefile b/tools/vnet/examples/Makefile --- a/tools/vnet/examples/Makefile +++ b/tools/vnet/examples/Makefile @@ -1,9 +1,7 @@ # -*- mode: Makefile; -*- #============================================================================ - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 +XEN_ROOT = ../../.. +include $(XEN_ROOT)/tools/Rules.mk XEN_SCRIPT_DIR = $(DESTDIR)/etc/xen/scripts diff --git a/tools/vnet/libxutil/Makefile b/tools/vnet/libxutil/Makefile --- a/tools/vnet/libxutil/Makefile +++ b/tools/vnet/libxutil/Makefile @@ -2,11 +2,6 @@ export VNET_ROOT = $(shell cd .. && pwd) export VNET_ROOT = $(shell cd .. && pwd) include $(VNET_ROOT)/Make.env endif - -INSTALL = install -INSTALL_DATA = $(INSTALL) -m0644 -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 include $(XEN_ROOT)/tools/Rules.mk diff --git a/tools/vnet/scripts/Makefile b/tools/vnet/scripts/Makefile --- a/tools/vnet/scripts/Makefile +++ b/tools/vnet/scripts/Makefile @@ -1,9 +1,7 @@ # -*- mode: Makefile; -*- #============================================================================ - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 +XEN_ROOT = ../../.. +include $(XEN_ROOT)/tools/Rules.mk SBIN_DIR = $(DESTDIR)/usr/sbin diff --git a/tools/vnet/vnetd/Makefile b/tools/vnet/vnetd/Makefile --- a/tools/vnet/vnetd/Makefile +++ b/tools/vnet/vnetd/Makefile @@ -110,7 +110,7 @@ vnetd: $(VNETD_OBJ) .PHONY: install install: vnetd mkdir -p $(DESTDIR)$(VNETD_INSTALL_DIR) - install -m 0755 vnetd $(DESTDIR)$(VNETD_INSTALL_DIR) + $(INSTALL_PROG) vnetd $(DESTDIR)$(VNETD_INSTALL_DIR) .PHONY: clean clean: diff --git a/tools/vtpm/Rules.mk b/tools/vtpm/Rules.mk --- a/tools/vtpm/Rules.mk +++ b/tools/vtpm/Rules.mk @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk # # Tool definitions # - -# Installation program and options -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 # Xen tools installation directory TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin diff --git a/tools/vtpm_manager/Rules.mk b/tools/vtpm_manager/Rules.mk --- a/tools/vtpm_manager/Rules.mk +++ b/tools/vtpm_manager/Rules.mk @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk # # Tool definitions # - -# Installation program and options -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 # Xen tools installation directory TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile --- a/tools/xcutils/Makefile +++ b/tools/xcutils/Makefile @@ -7,10 +7,6 @@ # # Copyright (C) 2005 by Christian Limpach # - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Rules.mk diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile --- a/tools/xenmon/Makefile +++ b/tools/xenmon/Makefile @@ -10,15 +10,10 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 -INSTALL_DATA = $(INSTALL) -m0644 +XEN_ROOT=../.. +include $(XEN_ROOT)/tools/Rules.mk sbindir=/usr/sbin - -XEN_ROOT=../.. -include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror -g CFLAGS += -I $(XEN_XC) diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile --- a/tools/xenstat/libxenstat/Makefile +++ b/tools/xenstat/libxenstat/Makefile @@ -15,10 +15,6 @@ XEN_ROOT=../../.. XEN_ROOT=../../.. include $(XEN_ROOT)/tools/Rules.mk LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -D -INSTALL_DATA = $(INSTALL) -m0644 -D prefix=/usr includedir=$(prefix)/include diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile --- a/tools/xenstat/xentop/Makefile +++ b/tools/xenstat/xentop/Makefile @@ -17,10 +17,6 @@ ifneq ($(XENSTAT_XENTOP),y) .PHONY: all install xentop all install xentop: else - -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -D -INSTALL_DATA = $(INSTALL) -m0644 -D prefix=/usr mandir=$(prefix)/share/man diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -4,11 +4,6 @@ XEN_LIBXC = $(XEN_ROOT)/tools/l MAJOR = 3.0 MINOR = 0 - -INSTALL = install -INSTALL_DATA = $(INSTALL) -m0644 -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 PROFILE=#-pg BASECFLAGS=-Wall -g -Werror diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -1,8 +1,3 @@ INSTALL = install -INSTALL = install -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 -INSTALL_DATA = $(INSTALL) -m0644 - XEN_ROOT=../.. include $(XEN_ROOT)/tools/Rules.mk diff --git a/xen/Rules.mk b/xen/Rules.mk --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -34,10 +34,6 @@ HDRS += $(wildcard $(BASEDIR)/include/pu HDRS += $(wildcard $(BASEDIR)/include/public/*.h) HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h) HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h) - -INSTALL := install -INSTALL_DATA := $(INSTALL) -m0644 -INSTALL_DIR := $(INSTALL) -d -m0755 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |