ia64/xen-unstable

changeset 14286:9be942ec0247

tools: Clean up use of 'install' command.

- convert raw "install" command to use $(INSTALL)
- convert some $(INSTALL) to $(INSTALL_DATA) as appropriate
- modify the specific $(INSTALL) definitions to use -p.

Original patch by Ben Thomas <ben@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Mar 07 10:49:20 2007 +0000 (2007-03-07)
parents c85d83074b54
children e68ee3665cba
files config/StdGNU.mk config/SunOS.mk tools/Makefile tools/blktap/lib/Makefile tools/console/Makefile tools/guest-headers/Makefile tools/ioemu/Makefile tools/libxen/Makefile tools/pygrub/Makefile tools/security/Makefile tools/vnet/libxutil/Makefile tools/xenfb/Makefile tools/xenstore/Makefile
line diff
     1.1 --- a/config/StdGNU.mk	Wed Mar 07 10:37:05 2007 +0000
     1.2 +++ b/config/StdGNU.mk	Wed Mar 07 10:49:20 2007 +0000
     1.3 @@ -12,9 +12,9 @@ OBJDUMP    = $(CROSS_COMPILE)objdump
     1.4  MSGFMT     = msgfmt
     1.5  
     1.6  INSTALL      = install
     1.7 -INSTALL_DIR  = $(INSTALL) -d -m0755
     1.8 -INSTALL_DATA = $(INSTALL) -m0644
     1.9 -INSTALL_PROG = $(INSTALL) -m0755
    1.10 +INSTALL_DIR  = $(INSTALL) -d -m0755 -p
    1.11 +INSTALL_DATA = $(INSTALL) -m0644 -p
    1.12 +INSTALL_PROG = $(INSTALL) -m0755 -p
    1.13  
    1.14  LIB64DIR = lib64
    1.15  
     2.1 --- a/config/SunOS.mk	Wed Mar 07 10:37:05 2007 +0000
     2.2 +++ b/config/SunOS.mk	Wed Mar 07 10:49:20 2007 +0000
     2.3 @@ -14,9 +14,9 @@ MSGFMT     = gmsgfmt
     2.4  SHELL      = bash
     2.5  
     2.6  INSTALL      = ginstall
     2.7 -INSTALL_DIR  = $(INSTALL) -d -m0755
     2.8 -INSTALL_DATA = $(INSTALL) -m0644
     2.9 -INSTALL_PROG = $(INSTALL) -m0755
    2.10 +INSTALL_DIR  = $(INSTALL) -d -m0755 -p
    2.11 +INSTALL_DATA = $(INSTALL) -m0644 -p
    2.12 +INSTALL_PROG = $(INSTALL) -m0755 -p
    2.13  
    2.14  LIB64DIR = lib/amd64
    2.15  
     3.1 --- a/tools/Makefile	Wed Mar 07 10:37:05 2007 +0000
     3.2 +++ b/tools/Makefile	Wed Mar 07 10:49:20 2007 +0000
     3.3 @@ -41,8 +41,8 @@ install: check
     3.4  		$(MAKE) -C $$subdir $@; \
     3.5  	done
     3.6  	$(MAKE) ioemuinstall
     3.7 -	$(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
     3.8 -	$(INSTALL_DIR) -p $(DESTDIR)/var/log/xen
     3.9 +	$(INSTALL_DIR) $(DESTDIR)/var/xen/dump
    3.10 +	$(INSTALL_DIR) $(DESTDIR)/var/log/xen
    3.11  
    3.12  .PHONY: clean
    3.13  clean: check_clean
     4.1 --- a/tools/blktap/lib/Makefile	Wed Mar 07 10:37:05 2007 +0000
     4.2 +++ b/tools/blktap/lib/Makefile	Wed Mar 07 10:49:20 2007 +0000
     4.3 @@ -40,8 +40,8 @@ build: libblktap.a
     4.4  libblktap: libblktap.a
     4.5  
     4.6  install: all
     4.7 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
     4.8 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
     4.9 +	$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
    4.10 +	$(INSTALL_DIR) $(DESTDIR)/usr/include
    4.11  	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/$(LIBDIR)
    4.12  	ln -sf libblktap.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libblktap.so.$(MAJOR)
    4.13  	ln -sf libblktap.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libblktap.so
     5.1 --- a/tools/console/Makefile	Wed Mar 07 10:37:05 2007 +0000
     5.2 +++ b/tools/console/Makefile	Wed Mar 07 10:49:20 2007 +0000
     5.3 @@ -30,7 +30,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcar
     5.4  
     5.5  .PHONY: install
     5.6  install: $(BIN)
     5.7 -	$(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
     5.8 +	$(INSTALL_DIR) $(DESTDIR)/$(DAEMON_INSTALL_DIR)
     5.9  	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
    5.10 -	$(INSTALL_DIR) -p $(DESTDIR)/$(CLIENT_INSTALL_DIR)
    5.11 +	$(INSTALL_DIR) $(DESTDIR)/$(CLIENT_INSTALL_DIR)
    5.12  	$(INSTALL_PROG) xenconsole $(DESTDIR)/$(CLIENT_INSTALL_DIR)
     6.1 --- a/tools/guest-headers/Makefile	Wed Mar 07 10:37:05 2007 +0000
     6.2 +++ b/tools/guest-headers/Makefile	Wed Mar 07 10:49:20 2007 +0000
     6.3 @@ -13,7 +13,7 @@ check:
     6.4  
     6.5  install-Linux:
     6.6  	mkdir -p $(DESTDIR)/usr/include/xen/linux
     6.7 -	install -m0644 $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
     6.8 +	$(INSTALL_DATA) $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
     6.9  
    6.10  install-SunOS:
    6.11  
     7.1 --- a/tools/ioemu/Makefile	Wed Mar 07 10:37:05 2007 +0000
     7.2 +++ b/tools/ioemu/Makefile	Wed Mar 07 10:49:20 2007 +0000
     7.3 @@ -65,10 +65,10 @@ common  de-ch  es     fo  fr-ca  hu     
     7.4  
     7.5  install-doc: $(DOCS)
     7.6  	mkdir -p "$(DESTDIR)$(docdir)"
     7.7 -	$(INSTALL) -m 644 qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
     7.8 +	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
     7.9  ifndef CONFIG_WIN32
    7.10  	mkdir -p "$(DESTDIR)$(mandir)/man1"
    7.11 -	$(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
    7.12 +	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
    7.13  endif
    7.14  
    7.15  install: all $(if $(BUILD_DOCS),install-doc)
    7.16 @@ -77,12 +77,12 @@ install: all $(if $(BUILD_DOCS),install-
    7.17  #	mkdir -p "$(DESTDIR)$(datadir)"
    7.18  #	for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
    7.19  #			video.x openbios-sparc32 linux_boot.bin; do \
    7.20 -#		$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
    7.21 +#		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
    7.22  #	done
    7.23  ifndef CONFIG_WIN32
    7.24  	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
    7.25  	for x in $(KEYMAPS); do \
    7.26 -		$(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
    7.27 +		$(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
    7.28  	done
    7.29  endif
    7.30  	for d in $(TARGET_DIRS); do \
     8.1 --- a/tools/libxen/Makefile	Wed Mar 07 10:37:05 2007 +0000
     8.2 +++ b/tools/libxen/Makefile	Wed Mar 07 10:49:20 2007 +0000
     8.3 @@ -57,8 +57,8 @@ test/test_hvm_bindings: test/test_hvm_bi
     8.4  
     8.5  .PHONY: install
     8.6  install: all
     8.7 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/include/xen/api
     8.8 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
     8.9 +	$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/api
    8.10 +	$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
    8.11  	$(INSTALL_PROG) libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
    8.12  	ln -sf libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenapi.so.$(MAJOR)
    8.13  	ln -sf libxenapi.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenapi.so
     9.1 --- a/tools/pygrub/Makefile	Wed Mar 07 10:37:05 2007 +0000
     9.2 +++ b/tools/pygrub/Makefile	Wed Mar 07 10:49:20 2007 +0000
     9.3 @@ -13,11 +13,11 @@ ifndef XEN_PYTHON_NATIVE_INSTALL
     9.4  install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
     9.5  install: all
     9.6  	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
     9.7 -	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xend/boot
     9.8 +	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
     9.9  else
    9.10  install: all
    9.11  	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
    9.12 -	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xend/boot
    9.13 +	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
    9.14  endif
    9.15  
    9.16  .PHONY: clean
    10.1 --- a/tools/security/Makefile	Wed Mar 07 10:37:05 2007 +0000
    10.2 +++ b/tools/security/Makefile	Wed Mar 07 10:49:20 2007 +0000
    10.3 @@ -58,23 +58,23 @@ ifndef XEN_PYTHON_NATIVE_INSTALL
    10.4  install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
    10.5  endif
    10.6  install: all $(ACM_CONFIG_FILE)
    10.7 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
    10.8 -	$(INSTALL_PROG) -p $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
    10.9 -	$(INSTALL_PROG) -p $(ACM_EZPOLICY) $(DESTDIR)/usr/sbin
   10.10 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_CONFIG_DIR)
   10.11 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)
   10.12 -	$(INSTALL_DATA) -p policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR)
   10.13 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example
   10.14 +	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
   10.15 +	$(INSTALL_PROG) $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
   10.16 +	$(INSTALL_PROG) $(ACM_EZPOLICY) $(DESTDIR)/usr/sbin
   10.17 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_CONFIG_DIR)
   10.18 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_POLICY_DIR)
   10.19 +	$(INSTALL_DATA) policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR)
   10.20 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_POLICY_DIR)/example
   10.21  	for i in $(ACM_EXAMPLES); do \
   10.22 -		$(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
   10.23 -		$(INSTALL_DATA) -p policies/example/$$i/client_v1-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
   10.24 +		$(INSTALL_DIR) $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
   10.25 +		$(INSTALL_DATA) policies/example/$$i/client_v1-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \
   10.26  	done
   10.27 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_SCRIPT_DIR)
   10.28 -	$(INSTALL_PROG) -p $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
   10.29 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
   10.30 -	$(INSTALL_DATA) -p $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
   10.31 -	$(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_CGIDIR)
   10.32 -	$(INSTALL_PROG) -p $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
   10.33 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_SCRIPT_DIR)
   10.34 +	$(INSTALL_PROG) $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
   10.35 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
   10.36 +	$(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
   10.37 +	$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
   10.38 +	$(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
   10.39  ifndef XEN_PYTHON_NATIVE_INSTALL
   10.40  	python python/setup.py install --home="$(DESTDIR)/usr" --install-lib="$(DESTDIR)$(LIBPATH)/python"
   10.41  else
    11.1 --- a/tools/vnet/libxutil/Makefile	Wed Mar 07 10:37:05 2007 +0000
    11.2 +++ b/tools/vnet/libxutil/Makefile	Wed Mar 07 10:49:20 2007 +0000
    11.3 @@ -71,7 +71,7 @@ check-for-zlib:
    11.4  
    11.5  .PHONY: install
    11.6  install: build
    11.7 -	[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
    11.8 +	[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
    11.9  	$(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
   11.10  	$(INSTALL_DATA) libxutil.a $(DESTDIR)/usr/$(LIBDIR)
   11.11  	ln -sf libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxutil.so.$(MAJOR)
    12.1 --- a/tools/xenfb/Makefile	Wed Mar 07 10:37:05 2007 +0000
    12.2 +++ b/tools/xenfb/Makefile	Wed Mar 07 10:49:20 2007 +0000
    12.3 @@ -1,13 +1,10 @@
    12.4  XEN_ROOT=../..
    12.5  include $(XEN_ROOT)/tools/Rules.mk
    12.6  
    12.7 -CFLAGS += -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_ROOT)/linux-2.6-xen-sparse/include -I$(XEN_ROOT)/tools/ioemu
    12.8 +CFLAGS  += -I$(XEN_LIBXC) -I$(XEN_XENSTORE)
    12.9 +CFLAGS  += -I$(XEN_ROOT)/linux-2.6-xen-sparse/include -I$(XEN_ROOT)/tools/ioemu
   12.10  LDFLAGS += -L$(XEN_LIBXC) -L$(XEN_XENSTORE)
   12.11  
   12.12 -INSTALL         = install
   12.13 -INSTALL_PROG    = $(INSTALL) -m0755
   12.14 -INSTALL_DIR     = $(INSTALL) -d -m0755
   12.15 -
   12.16  .PHONY: all
   12.17  all: build
   12.18  
   12.19 @@ -16,7 +13,7 @@ build:
   12.20  	$(MAKE) vncfb sdlfb
   12.21  
   12.22  install: all
   12.23 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)/xen/bin
   12.24 +	$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
   12.25  	$(INSTALL_PROG) vncfb $(DESTDIR)/usr/$(LIBDIR)/xen/bin/xen-vncfb
   12.26  	$(INSTALL_PROG) sdlfb $(DESTDIR)/usr/$(LIBDIR)/xen/bin/xen-sdlfb
   12.27  
    13.1 --- a/tools/xenstore/Makefile	Wed Mar 07 10:37:05 2007 +0000
    13.2 +++ b/tools/xenstore/Makefile	Wed Mar 07 10:49:20 2007 +0000
    13.3 @@ -168,16 +168,16 @@ tarball: clean
    13.4  
    13.5  .PHONY: install
    13.6  install: all
    13.7 -	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
    13.8 -	$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
    13.9 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/bin
   13.10 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
   13.11 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
   13.12 +	$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
   13.13 +	$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
   13.14 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   13.15 +	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
   13.16 +	$(INSTALL_DIR) $(DESTDIR)/usr/include
   13.17  	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
   13.18  	$(INSTALL_PROG) $(CLIENTS) $(DESTDIR)/usr/bin
   13.19  	$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
   13.20  	$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
   13.21 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
   13.22 +	$(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
   13.23  	$(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
   13.24  	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
   13.25  	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so