WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] 03: INSTALL.patch

===
Name: INSTALL.patch
Depends: proper-depends.patch, pic-lib.patch, doc-make-vars.patch
Description: use INSTALL everywhere
 Use install(by way of INSTALL variables) to create directories, install
 programs, and install data files.
DiffStat:
 Makefile                     |   22 +++++++++++++---------
 docs/Makefile                |   10 ++++++----
 tools/examples/Makefile      |   20 ++++++++++++--------
 tools/libxc/Makefile         |   12 ++++++++----
 tools/libxutil/Makefile      |    9 +++++++--
 tools/misc/Makefile          |   11 +++++++----
 tools/misc/miniterm/Makefile |    7 +++++--
 tools/sv/Makefile            |   18 ++++++++++--------
 tools/xentrace/Makefile      |   16 ++++++++++------
 tools/xfrd/Makefile          |    8 ++++++--
 xen/Makefile                 |   17 ++++++++++-------
 11 files changed, 94 insertions(+), 56 deletions(-)

===
Depends: proper-depends.patch, pic-lib.patch, doc-make-vars.patch
Description: use INSTALL everywhere
 Use install(by way of INSTALL variables) to create directories, install
 programs, and install data files.

--- xen-2.0.3.orig/xen/Makefile
+++ xen-2.0.3/xen/Makefile
@@ -1,3 +1,6 @@
+INSTALL                        = install
+INSTALL_DATA           = $(INSTALL) -m0644
+INSTALL_DIR            = $(INSTALL) -d -m0755

 # This is the correct place to edit the build version.
 # All other places this is stored (eg. compile.h) should be autogenerated.
@@ -18,13 +21,13 @@
        objdump -D -S $(TARGET)-syms > $(TARGET).s

 install: $(TARGET).gz
-       mkdir -p $(prefix)/boot
-       install -m0644 $(TARGET).gz $(prefix)/boot
-       install -m0644 $(TARGET)-syms $(prefix)/boot
-       mkdir -p $(prefix)/usr/include/xen/io
-       install -m0644 include/public/*.h $(prefix)/usr/include/xen
-       install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io
-       install -m0644 include/public/COPYING $(prefix)/usr/include/xen
+       $(INSTALL_DIR) $(prefix)/boot
+       $(INSTALL_DATA) $(TARGET).gz $(prefix)/boot
+       $(INSTALL_DATA) $(TARGET)-syms $(prefix)/boot
+       $(INSTALL_DIR) $(prefix)/usr/include/xen/io
+       $(INSTALL_DATA) include/public/*.h $(prefix)/usr/include/xen
+       $(INSTALL_DATA) include/public/io/*.h $(prefix)/usr/include/xen/io
+       $(INSTALL_DATA) include/public/COPYING $(prefix)/usr/include/xen

 dist: $(TARGET)
        $(MAKE) prefix=`pwd`/../dist/install dist=yes install
--- xen-2.0.3.orig/tools/libxutil/Makefile
+++ xen-2.0.3/tools/libxutil/Makefile
@@ -1,4 +1,9 @@
 XEN_ROOT = ../..
+INSTALL                = install
+INSTALL_DATA   = $(INSTALL) -m0644
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DIR    = $(INSTALL) -d -m0755
+
 include $(XEN_ROOT)/tools/Make.defs

 CC = gcc
@@ -67,8 +72,8 @@
        fi

 install: all
-       mkdir -p $(prefix)/usr/lib
-       install -m0755 $(LIB) $(prefix)/usr/lib
+       $(INSTALL_DIR) -p $(prefix)/usr/lib
+       $(INSTALL_PROG) $(LIB) $(prefix)/usr/lib
        ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) 
$(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR)
        ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so

--- xen-2.0.3.orig/tools/libxc/Makefile
+++ xen-2.0.3/tools/libxc/Makefile
@@ -1,3 +1,7 @@
+INSTALL                = install
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DATA   = $(INSTALL) -m0644
+INSTALL_DIR    = $(INSTALL) -d -m0755

 MAJOR          := 2.0
 MINOR          := 0
@@ -64,12 +68,12 @@
          ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )

 install: all
-       mkdir -p $(prefix)/usr/lib
-       mkdir -p $(prefix)/usr/include
-       install -m0755 $(LIB) $(prefix)/usr/lib
+       $(INSTALL_DIR) $(prefix)/usr/lib
+       $(INSTALL_DIR) $(prefix)/usr/include
+       $(INSTALL_PROG) $(LIB) $(prefix)/usr/lib
        ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) 
$(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR)
        ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so
-       install -m0644 xc.h $(prefix)/usr/include
+       $(INSTALL_DATA) xc.h $(prefix)/usr/include

 clean:
        rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
--- xen-2.0.3.orig/tools/sv/Makefile
+++ xen-2.0.3/tools/sv/Makefile
@@ -1,4 +1,7 @@
-sv_insdir := $(prefix)/var/xen/sv
+sv_insdir      := $(prefix)/var/xen/sv
+INSTALL                = install
+INSTALL_DIR    = $(INSTALL) -d -m0755
+INSTALL_DATA   = $(INSTALL) -m0644

 all:

@@ -14,17 +18,16 @@

 install:
        # copy XenSV Main.rpy file
-       @mkdir -p $(sv_insdir)
-       @install -m0644 Main.rpy $(sv_insdir)
+       @$(INSTALL_DIR) $(sv_insdir)
+       @$(INSTALL_DATA) Main.rpy $(sv_insdir)

        # copy XenSV images
-       @mkdir -p $(sv_insdir)/images
-       @(cd images && install -m0644 $(IMAGES) $(sv_insdir)/images)
+       @($(INSTALL_DIR) $(sv_insdir)/images
+       @(cd images && $(INSTALL_DATA) $(IMAGES) $(sv_insdir)/images)

        # copy XenSV stylesheet
-       @mkdir -p $(sv_insdir)/inc
-       @install -m0644 inc/style.css $(sv_insdir)/inc
-       @install -m0644 inc/script.js $(sv_insdir)/inc
+       @$(INSTALL_DIR) $(sv_insdir)/inc
+       @$(INSTALL_DATA) inc/style.css inc/script.js $(sv_insdir)/inc

 clean:

--- xen-2.0.3.orig/tools/misc/miniterm/Makefile
+++ xen-2.0.3/tools/misc/miniterm/Makefile
@@ -1,3 +1,6 @@
+INSTALL                = install
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DIR    = $(INSTALL) -d -m0755

 CC     = gcc
 CFLAGS = -Wall -O3
@@ -6,8 +9,8 @@
 all: $(TARGET)

 install: all
-       mkdir -p $(prefix)/usr/bin
-       install -m0755 $(TARGET) $(prefix)/usr/bin
+       $(INSTALL_DIR) $(prefix)/usr/bin
+       $(INSTALL_PROG) $(TARGET) $(prefix)/usr/bin

 clean:
        $(RM) *.o $(TARGET) *~
--- xen-2.0.3.orig/tools/misc/Makefile
+++ xen-2.0.3/tools/misc/Makefile
@@ -1,3 +1,6 @@
+INSTALL                = install
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DIR    = $(INSTALL) -d -m0755

 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Make.defs
@@ -20,10 +23,10 @@
        $(MAKE) -C miniterm

 install: all
-       mkdir -p $(prefix)/usr/bin
-       mkdir -p $(prefix)/usr/sbin
-       install -m0755 $(INSTALL_BIN) $(prefix)/usr/bin
-       install -m0755 $(INSTALL_SBIN) $(prefix)/usr/sbin
+       $(INSTALL_DIR) $(prefix)/usr/bin
+       $(INSTALL_DIR) $(prefix)/usr/sbin
+       $(INSTALL_PROG) $(INSTALL_BIN) $(prefix)/usr/bin
+       $(INSTALL_PROG) $(INSTALL_SBIN) $(prefix)/usr/sbin
        $(MAKE) -C miniterm install

 clean:
--- xen-2.0.3.orig/tools/xentrace/Makefile
+++ xen-2.0.3/tools/xentrace/Makefile
@@ -1,3 +1,7 @@
+INSTALL                = install
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DIR    = $(INSTALL) -d -m0755
+INSTALL_DATA   = $(INSTALL) -m0644

 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Make.defs
@@ -20,12 +24,12 @@
 all: $(BIN)

 install: all
-       mkdir -p $(prefix)/usr/bin
-       mkdir -p $(prefix)/usr/man/man1
-       mkdir -p $(prefix)/usr/man/man8
-       install -m0755 $(BIN) $(SCRIPTS) $(prefix)/usr/bin
-       install -m0644 $(MAN1) $(prefix)/usr/man/man1
-       install -m0644 $(MAN8) $(prefix)/usr/man/man8
+       $(INSTALL_DIR) $(prefix)/usr/bin
+       $(INSTALL_DIR) $(prefix)/usr/man/man1
+       $(INSTALL_DIR) $(prefix)/usr/man/man8
+       $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(prefix)/usr/bin
+       $(INSTALL_DATA) $(MAN1) $(prefix)/usr/man/man1
+       $(INSTALL_DATA) $(MAN8) $(prefix)/usr/man/man8

 clean:
        $(RM) *.a *.so *.o *.rpm $(BIN)
--- xen-2.0.3.orig/tools/examples/Makefile
+++ xen-2.0.3/tools/examples/Makefile
@@ -1,3 +1,7 @@
+INSTALL                = install
+INSTALL_DIR    = $(INSTALL) -d -m0755
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DATA   = $(INSTALL) -m0644

 # Init scripts.
 XEND_INITD = init.d/xend
@@ -21,23 +25,23 @@
 install: all install-initd install-configs install-scripts

 install-initd:
-       install -d $(prefix)/etc/init.d
-       install -m0755 $(XEND_INITD) $(prefix)/etc/init.d
-       install -m0755 $(XENDOMAINS_INITD) $(prefix)/etc/init.d
+       $(INSTALL_DIR) $(prefix)/etc/init.d
+       $(INSTALL_PROG) $(XEND_INITD) $(prefix)/etc/init.d
+       $(INSTALL_PROG) $(XENDOMAINS_INITD) $(prefix)/etc/init.d

 install-configs:
-       install -d $(prefix)$(XEN_CONFIG_DIR)
-       install -d $(prefix)$(XEN_CONFIG_DIR)/auto
+       $(INSTALL_DIR) $(prefix)$(XEN_CONFIG_DIR)
+       $(INSTALL_DIR) $(prefix)$(XEN_CONFIG_DIR)/auto
        for i in $(XEN_CONFIGS); \
            do [ -a $(prefix)/$(XEN_CONFIG_DIR)/$$i ] || \
-           install -m0644 $$i $(prefix)$(XEN_CONFIG_DIR); \
+           $(INSTALL_DATA) $$i $(prefix)$(XEN_CONFIG_DIR); \
        done

 install-scripts:
-       install -d $(prefix)$(XEN_SCRIPT_DIR)
+       $(INSTALL_DIR) $(prefix)$(XEN_SCRIPT_DIR)
        for i in $(XEN_SCRIPTS); \
            do [ -a $(prefix)/$()/$$i ] || \
-           install -m0755 $$i $(prefix)$(XEN_SCRIPT_DIR); \
+           $(INSTALL_PROG) $$i $(prefix)$(XEN_SCRIPT_DIR); \
        done

 clean:
--- xen-2.0.3.orig/tools/xfrd/Makefile
+++ xen-2.0.3/tools/xfrd/Makefile
@@ -4,6 +4,10 @@
 # Mike Wray <mike.wray@xxxxxx>
 #============================================================================

+INSTALL                = install
+INSTALL_PROG   = $(INSTALL) -m0755
+INSTALL_DIR    = $(INSTALL) -d -m0755
+
 XEN_ROOT  = ../..
 include $(XEN_ROOT)/tools/Make.defs

@@ -68,8 +72,8 @@

 .PHONY: install
 install: xfrd
-       mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
-       install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
+       $(INSTALL_DIR) $(prefix)/$(XFRD_INSTALL_DIR)
+       $(INSTALL_PROG) xfrd $(prefix)/$(XFRD_INSTALL_DIR)

 .PHONY: libutil
 libutil: $(UTIL_LIB)
--- xen-2.0.3.orig/docs/Makefile
+++ xen-2.0.3/docs/Makefile
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f

+INSTALL                = install
+INSTALL_DIR    = $(INSTALL) -d -m0755

 PS2PDF         := ps2pdf
 DVIPS          := dvips
@@ -36,18 +38,18 @@

 install: all
        rm -rf $(prefix)$(pkgdocdir)
-       mkdir -p $(prefix)$(pkgdocdir)
+       $(INSTALL_DIR) $(prefix)$(pkgdocdir)
        cp -dR ps $(prefix)$(pkgdocdir)
        cp -dR pdf $(prefix)$(pkgdocdir)
        cp -dR html $(prefix)$(pkgdocdir)

 pdf/%.pdf: ps/%.ps
-       mkdir -p $(@D)
+       $(INSTALL_DIR) $(@D)
        $(PS2PDF) $< $@.new
        mv $@.new $@

 ps/%.ps: %.dvi
-       mkdir -p $(@D)
+       $(INSTALL_DIR) $(@D)
        $(DVIPS) -Ppdf -G0 -o $@.new $<
        mv $@.new $@

@@ -62,7 +64,7 @@
        $(TGIF) -print -color -eps $<

 html/%/index.html: src/%.tex
-       mkdir -p $(@D)
+       $(INSTALL_DIR) $(@D)
        $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation 
\
        -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
        $< 1>/dev/null 2>/dev/null
--- xen-2.0.3.orig/Makefile
+++ xen-2.0.3/Makefile
@@ -4,6 +4,10 @@

 DIST_DIR    ?= $(shell pwd)/dist
 INSTALL_DIR ?= $(DIST_DIR)/install
+INSTALL                := install
+INSTALL_DIR    := $(INSTALL) -d -m0755
+INSTALL_DATA   := $(INSTALL) -m0644
+INSTALL_PROG   := $(INSTALL) -m0755

 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
@@ -35,21 +40,21 @@
        $(MAKE) -C tools install

 install-kernels:
-       $(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
-       $(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
-       $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
-       $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
+       cp -a $(INSTALL_DIR)/boot/* /boot/
+       cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/
+       cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
+       cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/

 install-docs:
        sh ./docs/check_pkgs && $(MAKE) -C docs install || true

 # build and install everything into local dist directory
 dist: xen tools kernels docs
-       install -m0644 ./COPYING $(DIST_DIR)
-       install -m0644 ./README $(DIST_DIR)
-       install -m0755 ./install.sh $(DIST_DIR)
-       mkdir -p $(DIST_DIR)/check
-       install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
+       $(INSTALL_DIR) $(DIST_DIR)/check
+       $(INSTALL_DATA) ./COPYING $(DIST_DIR)
+       $(INSTALL_DATA) ./README $(DIST_DIR)
+       $(INSTALL_PROG) ./install.sh $(DIST_DIR)
+       $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DIST_DIR)/check

 xen:
        $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
===



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] 03: INSTALL.patch, Adam Heath <=