direct-io.hg
changeset 3491:77ecf0226c2c
bitkeeper revision 1.1159.223.18 (41f2c6eamwtTkjdrv4CuL1WnOy4iGw)
Description: use INSTALL everywhere
Use install(by way of INSTALL variables) to create directories, install
programs, and install data files.
From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
Description: use INSTALL everywhere
Use install(by way of INSTALL variables) to create directories, install
programs, and install data files.
From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author | iap10@labyrinth.cl.cam.ac.uk |
---|---|
date | Sat Jan 22 21:34:34 2005 +0000 (2005-01-22) |
parents | 519af10797e4 |
children | 2ec8297d7032 |
files | Makefile tools/examples/Makefile tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile tools/misc/miniterm/Makefile tools/sv/Makefile tools/xentrace/Makefile tools/xfrd/Makefile xen/Makefile |
line diff
1.1 --- a/Makefile Sat Jan 22 21:32:44 2005 +0000 1.2 +++ b/Makefile Sat Jan 22 21:34:34 2005 +0000 1.3 @@ -4,6 +4,10 @@ 1.4 1.5 DIST_DIR ?= $(shell pwd)/dist 1.6 INSTALL_DIR ?= $(DIST_DIR)/install 1.7 +INSTALL := install 1.8 +INSTALL_DIR := $(INSTALL) -d -m0755 1.9 +INSTALL_DATA := $(INSTALL) -m0644 1.10 +INSTALL_PROG := $(INSTALL) -m0755 1.11 1.12 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU 1.13 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU 1.14 @@ -35,21 +39,21 @@ install-tools: 1.15 $(MAKE) -C tools install 1.16 1.17 install-kernels: 1.18 - $(shell cp -a $(INSTALL_DIR)/boot/* /boot/) 1.19 - $(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/) 1.20 - $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/) 1.21 - $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/) 1.22 + cp -a $(INSTALL_DIR)/boot/* /boot/ 1.23 + cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/ 1.24 + cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/ 1.25 + cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/ 1.26 1.27 install-docs: 1.28 sh ./docs/check_pkgs && $(MAKE) -C docs install || true 1.29 1.30 # build and install everything into local dist directory 1.31 dist: xen tools kernels docs 1.32 - install -m0644 ./COPYING $(DIST_DIR) 1.33 - install -m0644 ./README $(DIST_DIR) 1.34 - install -m0755 ./install.sh $(DIST_DIR) 1.35 - mkdir -p $(DIST_DIR)/check 1.36 - install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check 1.37 + $(INSTALL_DIR) $(DIST_DIR)/check 1.38 + $(INSTALL_DATA) ./COPYING $(DIST_DIR) 1.39 + $(INSTALL_DATA) ./README $(DIST_DIR) 1.40 + $(INSTALL_PROG) ./install.sh $(DIST_DIR) 1.41 + $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DIST_DIR)/check 1.42 1.43 xen: 1.44 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
2.1 --- a/tools/examples/Makefile Sat Jan 22 21:32:44 2005 +0000 2.2 +++ b/tools/examples/Makefile Sat Jan 22 21:34:34 2005 +0000 2.3 @@ -1,3 +1,7 @@ 2.4 +INSTALL = install 2.5 +INSTALL_DIR = $(INSTALL) -d -m0755 2.6 +INSTALL_PROG = $(INSTALL) -m0755 2.7 +INSTALL_DATA = $(INSTALL) -m0644 2.8 2.9 # Init scripts. 2.10 XEND_INITD = init.d/xend 2.11 @@ -21,23 +25,23 @@ all: 2.12 install: all install-initd install-configs install-scripts 2.13 2.14 install-initd: 2.15 - install -d $(prefix)/etc/init.d 2.16 - install -m0755 $(XEND_INITD) $(prefix)/etc/init.d 2.17 - install -m0755 $(XENDOMAINS_INITD) $(prefix)/etc/init.d 2.18 + $(INSTALL_DIR) $(prefix)/etc/init.d 2.19 + $(INSTALL_PROG) $(XEND_INITD) $(prefix)/etc/init.d 2.20 + $(INSTALL_PROG) $(XENDOMAINS_INITD) $(prefix)/etc/init.d 2.21 2.22 install-configs: 2.23 - install -d $(prefix)$(XEN_CONFIG_DIR) 2.24 - install -d $(prefix)$(XEN_CONFIG_DIR)/auto 2.25 + $(INSTALL_DIR) $(prefix)$(XEN_CONFIG_DIR) 2.26 + $(INSTALL_DIR) $(prefix)$(XEN_CONFIG_DIR)/auto 2.27 for i in $(XEN_CONFIGS); \ 2.28 do [ -a $(prefix)/$(XEN_CONFIG_DIR)/$$i ] || \ 2.29 - install -m0644 $$i $(prefix)$(XEN_CONFIG_DIR); \ 2.30 + $(INSTALL_DATA) $$i $(prefix)$(XEN_CONFIG_DIR); \ 2.31 done 2.32 2.33 install-scripts: 2.34 - install -d $(prefix)$(XEN_SCRIPT_DIR) 2.35 + $(INSTALL_DIR) $(prefix)$(XEN_SCRIPT_DIR) 2.36 for i in $(XEN_SCRIPTS); \ 2.37 do [ -a $(prefix)/$()/$$i ] || \ 2.38 - install -m0755 $$i $(prefix)$(XEN_SCRIPT_DIR); \ 2.39 + $(INSTALL_PROG) $$i $(prefix)$(XEN_SCRIPT_DIR); \ 2.40 done 2.41 2.42 clean:
3.1 --- a/tools/libxc/Makefile Sat Jan 22 21:32:44 2005 +0000 3.2 +++ b/tools/libxc/Makefile Sat Jan 22 21:34:34 2005 +0000 3.3 @@ -1,3 +1,7 @@ 3.4 +INSTALL = install 3.5 +INSTALL_PROG = $(INSTALL) -m0755 3.6 +INSTALL_DATA = $(INSTALL) -m0644 3.7 +INSTALL_DIR = $(INSTALL) -d -m0755 3.8 3.9 MAJOR := 2.0 3.10 MINOR := 0 3.11 @@ -64,12 +68,12 @@ mk-symlinks: 3.12 ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . ) 3.13 3.14 install: all 3.15 - mkdir -p $(prefix)/usr/lib 3.16 - mkdir -p $(prefix)/usr/include 3.17 - install -m0755 $(LIB) $(prefix)/usr/lib 3.18 + $(INSTALL_DIR) $(prefix)/usr/lib 3.19 + $(INSTALL_DIR) $(prefix)/usr/include 3.20 + $(INSTALL_PROG) $(LIB) $(prefix)/usr/lib 3.21 ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR) 3.22 ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so 3.23 - install -m0644 xc.h $(prefix)/usr/include 3.24 + $(INSTALL_DATA) xc.h $(prefix)/usr/include 3.25 3.26 clean: 3.27 rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
4.1 --- a/tools/libxutil/Makefile Sat Jan 22 21:32:44 2005 +0000 4.2 +++ b/tools/libxutil/Makefile Sat Jan 22 21:34:34 2005 +0000 4.3 @@ -1,4 +1,9 @@ 4.4 XEN_ROOT = ../.. 4.5 +INSTALL = install 4.6 +INSTALL_DATA = $(INSTALL) -m0644 4.7 +INSTALL_PROG = $(INSTALL) -m0755 4.8 +INSTALL_DIR = $(INSTALL) -d -m0755 4.9 + 4.10 include $(XEN_ROOT)/tools/Make.defs 4.11 4.12 CC = gcc 4.13 @@ -67,8 +72,8 @@ check-for-zlib: 4.14 fi 4.15 4.16 install: all 4.17 - mkdir -p $(prefix)/usr/lib 4.18 - install -m0755 $(LIB) $(prefix)/usr/lib 4.19 + $(INSTALL_DIR) -p $(prefix)/usr/lib 4.20 + $(INSTALL_PROG) $(LIB) $(prefix)/usr/lib 4.21 ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR) 4.22 ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so 4.23
5.1 --- a/tools/misc/Makefile Sat Jan 22 21:32:44 2005 +0000 5.2 +++ b/tools/misc/Makefile Sat Jan 22 21:34:34 2005 +0000 5.3 @@ -1,3 +1,6 @@ 5.4 +INSTALL = install 5.5 +INSTALL_PROG = $(INSTALL) -m0755 5.6 +INSTALL_DIR = $(INSTALL) -d -m0755 5.7 5.8 XEN_ROOT=../.. 5.9 include $(XEN_ROOT)/tools/Make.defs 5.10 @@ -20,10 +23,10 @@ all: $(TARGETS) 5.11 $(MAKE) -C miniterm 5.12 5.13 install: all 5.14 - mkdir -p $(prefix)/usr/bin 5.15 - mkdir -p $(prefix)/usr/sbin 5.16 - install -m0755 $(INSTALL_BIN) $(prefix)/usr/bin 5.17 - install -m0755 $(INSTALL_SBIN) $(prefix)/usr/sbin 5.18 + $(INSTALL_DIR) $(prefix)/usr/bin 5.19 + $(INSTALL_DIR) $(prefix)/usr/sbin 5.20 + $(INSTALL_PROG) $(INSTALL_BIN) $(prefix)/usr/bin 5.21 + $(INSTALL_PROG) $(INSTALL_SBIN) $(prefix)/usr/sbin 5.22 $(MAKE) -C miniterm install 5.23 5.24 clean:
6.1 --- a/tools/misc/miniterm/Makefile Sat Jan 22 21:32:44 2005 +0000 6.2 +++ b/tools/misc/miniterm/Makefile Sat Jan 22 21:34:34 2005 +0000 6.3 @@ -1,3 +1,6 @@ 6.4 +INSTALL = install 6.5 +INSTALL_PROG = $(INSTALL) -m0755 6.6 +INSTALL_DIR = $(INSTALL) -d -m0755 6.7 6.8 CC = gcc 6.9 CFLAGS = -Wall -O3 6.10 @@ -6,8 +9,8 @@ TARGET = miniterm 6.11 all: $(TARGET) 6.12 6.13 install: all 6.14 - mkdir -p $(prefix)/usr/bin 6.15 - install -m0755 $(TARGET) $(prefix)/usr/bin 6.16 + $(INSTALL_DIR) $(prefix)/usr/bin 6.17 + $(INSTALL_PROG) $(TARGET) $(prefix)/usr/bin 6.18 6.19 clean: 6.20 $(RM) *.o $(TARGET) *~
7.1 --- a/tools/sv/Makefile Sat Jan 22 21:32:44 2005 +0000 7.2 +++ b/tools/sv/Makefile Sat Jan 22 21:34:34 2005 +0000 7.3 @@ -1,4 +1,7 @@ 7.4 -sv_insdir := $(prefix)/var/xen/sv 7.5 +sv_insdir := $(prefix)/var/xen/sv 7.6 +INSTALL = install 7.7 +INSTALL_DIR = $(INSTALL) -d -m0755 7.8 +INSTALL_DATA = $(INSTALL) -m0644 7.9 7.10 all: 7.11 7.12 @@ -14,17 +17,16 @@ IMAGES += next.png previous.png finish.p 7.13 7.14 install: 7.15 # copy XenSV Main.rpy file 7.16 - @mkdir -p $(sv_insdir) 7.17 - @install -m0644 Main.rpy $(sv_insdir) 7.18 + @$(INSTALL_DIR) $(sv_insdir) 7.19 + @$(INSTALL_DATA) Main.rpy $(sv_insdir) 7.20 7.21 # copy XenSV images 7.22 - @mkdir -p $(sv_insdir)/images 7.23 - @(cd images && install -m0644 $(IMAGES) $(sv_insdir)/images) 7.24 + @($(INSTALL_DIR) $(sv_insdir)/images 7.25 + @(cd images && $(INSTALL_DATA) $(IMAGES) $(sv_insdir)/images) 7.26 7.27 # copy XenSV stylesheet 7.28 - @mkdir -p $(sv_insdir)/inc 7.29 - @install -m0644 inc/style.css $(sv_insdir)/inc 7.30 - @install -m0644 inc/script.js $(sv_insdir)/inc 7.31 + @$(INSTALL_DIR) $(sv_insdir)/inc 7.32 + @$(INSTALL_DATA) inc/style.css inc/script.js $(sv_insdir)/inc 7.33 7.34 clean: 7.35
8.1 --- a/tools/xentrace/Makefile Sat Jan 22 21:32:44 2005 +0000 8.2 +++ b/tools/xentrace/Makefile Sat Jan 22 21:34:34 2005 +0000 8.3 @@ -1,3 +1,7 @@ 8.4 +INSTALL = install 8.5 +INSTALL_PROG = $(INSTALL) -m0755 8.6 +INSTALL_DIR = $(INSTALL) -d -m0755 8.7 +INSTALL_DATA = $(INSTALL) -m0644 8.8 8.9 XEN_ROOT=../.. 8.10 include $(XEN_ROOT)/tools/Make.defs 8.11 @@ -20,12 +24,12 @@ MAN8 = $(wildcard *.8) 8.12 all: $(BIN) 8.13 8.14 install: all 8.15 - mkdir -p $(prefix)/usr/bin 8.16 - mkdir -p $(prefix)/usr/man/man1 8.17 - mkdir -p $(prefix)/usr/man/man8 8.18 - install -m0755 $(BIN) $(SCRIPTS) $(prefix)/usr/bin 8.19 - install -m0644 $(MAN1) $(prefix)/usr/man/man1 8.20 - install -m0644 $(MAN8) $(prefix)/usr/man/man8 8.21 + $(INSTALL_DIR) $(prefix)/usr/bin 8.22 + $(INSTALL_DIR) $(prefix)/usr/man/man1 8.23 + $(INSTALL_DIR) $(prefix)/usr/man/man8 8.24 + $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(prefix)/usr/bin 8.25 + $(INSTALL_DATA) $(MAN1) $(prefix)/usr/man/man1 8.26 + $(INSTALL_DATA) $(MAN8) $(prefix)/usr/man/man8 8.27 8.28 clean: 8.29 $(RM) *.a *.so *.o *.rpm $(BIN)
9.1 --- a/tools/xfrd/Makefile Sat Jan 22 21:32:44 2005 +0000 9.2 +++ b/tools/xfrd/Makefile Sat Jan 22 21:34:34 2005 +0000 9.3 @@ -4,6 +4,10 @@ 9.4 # Mike Wray <mike.wray@hp.com> 9.5 #============================================================================ 9.6 9.7 +INSTALL = install 9.8 +INSTALL_PROG = $(INSTALL) -m0755 9.9 +INSTALL_DIR = $(INSTALL) -d -m0755 9.10 + 9.11 XEN_ROOT = ../.. 9.12 include $(XEN_ROOT)/tools/Make.defs 9.13 9.14 @@ -68,8 +72,8 @@ xfrd: $(XFRD_PROG_OBJ) 9.15 9.16 .PHONY: install 9.17 install: xfrd 9.18 - mkdir -p $(prefix)/$(XFRD_INSTALL_DIR) 9.19 - install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR) 9.20 + $(INSTALL_DIR) $(prefix)/$(XFRD_INSTALL_DIR) 9.21 + $(INSTALL_PROG) xfrd $(prefix)/$(XFRD_INSTALL_DIR) 9.22 9.23 .PHONY: libutil 9.24 libutil: $(UTIL_LIB)
10.1 --- a/xen/Makefile Sat Jan 22 21:32:44 2005 +0000 10.2 +++ b/xen/Makefile Sat Jan 22 21:34:34 2005 +0000 10.3 @@ -1,3 +1,6 @@ 10.4 +INSTALL = install 10.5 +INSTALL_DATA = $(INSTALL) -m0644 10.6 +INSTALL_DIR = $(INSTALL) -d -m0755 10.7 10.8 # This is the correct place to edit the build version. 10.9 # All other places this is stored (eg. compile.h) should be autogenerated. 10.10 @@ -18,13 +21,13 @@ debug: 10.11 objdump -D -S $(TARGET)-syms > $(TARGET).s 10.12 10.13 install: $(TARGET).gz 10.14 - mkdir -p $(prefix)/boot 10.15 - install -m0644 $(TARGET).gz $(prefix)/boot 10.16 - install -m0644 $(TARGET)-syms $(prefix)/boot 10.17 - mkdir -p $(prefix)/usr/include/xen/io 10.18 - install -m0644 include/public/*.h $(prefix)/usr/include/xen 10.19 - install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io 10.20 - install -m0644 include/public/COPYING $(prefix)/usr/include/xen 10.21 + $(INSTALL_DIR) $(prefix)/boot 10.22 + $(INSTALL_DATA) $(TARGET).gz $(prefix)/boot 10.23 + $(INSTALL_DATA) $(TARGET)-syms $(prefix)/boot 10.24 + $(INSTALL_DIR) $(prefix)/usr/include/xen/io 10.25 + $(INSTALL_DATA) include/public/*.h $(prefix)/usr/include/xen 10.26 + $(INSTALL_DATA) include/public/io/*.h $(prefix)/usr/include/xen/io 10.27 + $(INSTALL_DATA) include/public/COPYING $(prefix)/usr/include/xen 10.28 10.29 dist: $(TARGET) 10.30 $(MAKE) prefix=`pwd`/../dist/install dist=yes install