[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 2/7] tools: replace private BINDIR with automake bindir



Reuse automake variable instead of inventing a private variable.

The result of this command:
 git grep -wnl BINDIR | xargs sed -i 's@BINDIR@bindir@g'

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 Config.mk                                    |  2 +-
 config/Paths.mk.in                           |  1 -
 tools/Makefile                               | 16 ++++++++--------
 tools/hotplug/FreeBSD/rc.d/xencommons.in     |  2 +-
 tools/hotplug/FreeBSD/vif-bridge             |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in     |  6 +++---
 tools/hotplug/Linux/xen-hotplug-common.sh.in |  2 +-
 tools/hotplug/NetBSD/block                   |  2 +-
 tools/hotplug/NetBSD/rc.d/xencommons.in      |  2 +-
 tools/hotplug/NetBSD/vif-bridge              |  2 +-
 tools/hotplug/NetBSD/vif-ip                  |  2 +-
 tools/misc/Makefile                          |  4 ++--
 tools/pygrub/Makefile                        |  6 +++---
 tools/xenstore/Makefile                      | 14 +++++++-------
 tools/xentrace/Makefile                      |  6 +++---
 15 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/Config.mk b/Config.mk
index abb1e44..1312a80 100644
--- a/Config.mk
+++ b/Config.mk
@@ -157,7 +157,7 @@ define move-if-changed
        if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi
 endef
 
-BUILD_MAKE_VARS := sbindir BINDIR LIBEXEC LIBEXEC_BIN LIBDIR SHAREDIR \
+BUILD_MAKE_VARS := sbindir bindir LIBEXEC LIBEXEC_BIN LIBDIR SHAREDIR \
                    XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \
                    XEN_RUN_DIR XEN_PAGING_DIR
 
diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index 26674b1..1653f26 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -31,7 +31,6 @@ sysconfdir               := @sysconfdir@
 
 PREFIX                   := $(prefix)
 
-BINDIR                   := $(bindir)
 LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
 LIBEXEC_BIN              := @LIBEXEC_BIN@
 LIBEXEC_LIB              := $(LIBEXEC)/lib
diff --git a/tools/Makefile b/tools/Makefile
index 77625cb..b05d12a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -74,14 +74,14 @@ uninstall:
        rm -f  $(D)$(sbindir)/xendomains
        rm -f  $(D)$(SYSCONFIG_DIR)/xencommons
        rm -rf $(D)/var/lib/xen*
-       rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
-       rm -rf $(D)$(BINDIR)/xc_shadow
-       rm -rf $(D)$(BINDIR)/pygrub
-       rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl
-       rm -rf $(D)$(BINDIR)/xsls
-       rm -rf $(D)$(BINDIR)/xenstore* $(D)$(BINDIR)/xentrace*
-       rm -rf $(D)$(BINDIR)/xen-detect $(D)$(BINDIR)/xencons
-       rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen
+       rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen
+       rm -rf $(D)$(bindir)/xc_shadow
+       rm -rf $(D)$(bindir)/pygrub
+       rm -rf $(D)$(bindir)/setsize $(D)$(bindir)/tbctl
+       rm -rf $(D)$(bindir)/xsls
+       rm -rf $(D)$(bindir)/xenstore* $(D)$(bindir)/xentrace*
+       rm -rf $(D)$(bindir)/xen-detect $(D)$(bindir)/xencons
+       rm -rf $(D)$(bindir)/xenpvnetboot $(D)$(bindir)/qemu-*-xen
        rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h
        rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
        rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h 
$(D)$(INCLUDEDIR)/xenstore-compat/xs.h
diff --git a/tools/hotplug/FreeBSD/rc.d/xencommons.in 
b/tools/hotplug/FreeBSD/rc.d/xencommons.in
index 3e204d6..0ef9af9 100644
--- a/tools/hotplug/FreeBSD/rc.d/xencommons.in
+++ b/tools/hotplug/FreeBSD/rc.d/xencommons.in
@@ -46,7 +46,7 @@ xen_startcmd()
                        XENSTORED_ARGS="${XENSTORED_ARGS} -T 
/var/log/xen/xenstored-trace.log"
                fi
                ${sbindir}/xenstored ${XENSTORED_ARGS}
-               while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / 
>/dev/null 2>&1` ; do
+               while [ $time -lt $timeout ] && ! `${bindir}/xenstore-read -s / 
>/dev/null 2>&1` ; do
                        printf "."
                        time=$(($time+1))
                        sleep 1
diff --git a/tools/hotplug/FreeBSD/vif-bridge b/tools/hotplug/FreeBSD/vif-bridge
index 3319710..428c653 100644
--- a/tools/hotplug/FreeBSD/vif-bridge
+++ b/tools/hotplug/FreeBSD/vif-bridge
@@ -13,7 +13,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/hotplugpath.sh"
 
-PATH=${BINDIR}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
+PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
 export PATH
 
 path=$1
diff --git a/tools/hotplug/Linux/init.d/xencommons.in 
b/tools/hotplug/Linux/init.d/xencommons.in
index 82b3fcb..00d0f55 100644
--- a/tools/hotplug/Linux/init.d/xencommons.in
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -62,7 +62,7 @@ do_start () {
        mkdir -p ${XEN_RUN_DIR}
        mkdir -p ${XEN_LOCK_DIR}
 
-       if ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1`
+       if ! `${bindir}/xenstore-read -s / >/dev/null 2>&1`
        then
                test -z "$XENSTORED_ROOTDIR" && 
XENSTORED_ROOTDIR="@XEN_LIB_STORED@"
                rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
@@ -77,7 +77,7 @@ do_start () {
                fi
 
                # Wait for xenstored to actually come up, timing out after 30 
seconds
-                while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s 
/ >/dev/null 2>&1` ; do
+                while [ $time -lt $timeout ] && ! `${bindir}/xenstore-read -s 
/ >/dev/null 2>&1` ; do
                     echo -n .
                    time=$(($time+1))
                     sleep 1
@@ -126,7 +126,7 @@ case "$1" in
        do_start
        ;;
   status)
-        ${BINDIR}/xenstore-read -s /
+        ${bindir}/xenstore-read -s /
        ;;
   stop)
        do_stop
diff --git a/tools/hotplug/Linux/xen-hotplug-common.sh.in 
b/tools/hotplug/Linux/xen-hotplug-common.sh.in
index f698880..eee8845 100644
--- a/tools/hotplug/Linux/xen-hotplug-common.sh.in
+++ b/tools/hotplug/Linux/xen-hotplug-common.sh.in
@@ -30,7 +30,7 @@ dir=$(dirname "$0")
 
 exec 2>>/var/log/xen/xen-hotplug.log
 
-export 
PATH="${BINDIR}:${sbindir}:${LIBEXEC_BIN}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
+export 
PATH="${bindir}:${sbindir}:${LIBEXEC_BIN}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
 export LD_LIBRARY_PATH="${LIBDIR}${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH"
 export LANG="POSIX"
 unset $(set | grep ^LC_ | cut -d= -f1)
diff --git a/tools/hotplug/NetBSD/block b/tools/hotplug/NetBSD/block
index 3a78ea2..32c20b6 100644
--- a/tools/hotplug/NetBSD/block
+++ b/tools/hotplug/NetBSD/block
@@ -7,7 +7,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/hotplugpath.sh"
 
-PATH=${BINDIR}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
+PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
 export PATH
 
 error() {
diff --git a/tools/hotplug/NetBSD/rc.d/xencommons.in 
b/tools/hotplug/NetBSD/rc.d/xencommons.in
index 82c2171..8217ae8 100644
--- a/tools/hotplug/NetBSD/rc.d/xencommons.in
+++ b/tools/hotplug/NetBSD/rc.d/xencommons.in
@@ -50,7 +50,7 @@ xen_startcmd()
                        XENSTORED_ARGS="${XENSTORED_ARGS} -T 
/var/log/xen/xenstored-trace.log"
                fi
                ${sbindir}/xenstored ${XENSTORED_ARGS}
-               while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / 
>/dev/null 2>&1` ; do
+               while [ $time -lt $timeout ] && ! `${bindir}/xenstore-read -s / 
>/dev/null 2>&1` ; do
                        printf "."
                        time=$(($time+1))
                        sleep 1
diff --git a/tools/hotplug/NetBSD/vif-bridge b/tools/hotplug/NetBSD/vif-bridge
index d6a2b16..b58e922 100644
--- a/tools/hotplug/NetBSD/vif-bridge
+++ b/tools/hotplug/NetBSD/vif-bridge
@@ -7,7 +7,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/hotplugpath.sh"
 
-PATH=${BINDIR}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
+PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
 export PATH
 
 xpath=$1
diff --git a/tools/hotplug/NetBSD/vif-ip b/tools/hotplug/NetBSD/vif-ip
index fd60b7e..83cbfe2 100644
--- a/tools/hotplug/NetBSD/vif-ip
+++ b/tools/hotplug/NetBSD/vif-ip
@@ -7,7 +7,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/hotplugpath.sh"
 
-PATH=${BINDIR}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
+PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
 export PATH
 
 xpath=$1
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index a3007c2..3817317 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -51,10 +51,10 @@ all build: $(TARGETS_BUILD)
 
 .PHONY: install
 install: build
-       $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(bindir)
        $(INSTALL_DIR) $(DESTDIR)$(sbindir)
        $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-       $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
+       $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(bindir)
        $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(sbindir)
        $(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
 
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index 00e654a..fe8e03b 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -15,10 +15,10 @@ install: all
        CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \
                $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
                --install-scripts=$(LIBEXEC_BIN) --force
-       set -e; if [ $(BINDIR) != $(LIBEXEC_BIN) -a \
-                    "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
+       set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
+                    "`readlink -f $(DESTDIR)/$(bindir)`" != \
                     "`readlink -f $(LIBEXEC_BIN)`" ]; then \
-           ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(BINDIR); \
+           ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
        fi
 
 .PHONY: clean
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index a4664ec..a809d74 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -128,7 +128,7 @@ tarball: clean
 
 .PHONY: install
 install: all
-       $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(bindir)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
 ifeq ($(XENSTORE_XENSTORED),y)
@@ -136,10 +136,10 @@ ifeq ($(XENSTORE_XENSTORED),y)
        $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED)
        $(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
 endif
-       $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
-       $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
+       $(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir)
+       $(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
        set -e ; for c in $(CLIENTS) ; do \
-               ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
+               ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
        done
        $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
        $(INSTALL_SHLIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
@@ -155,10 +155,10 @@ endif
 
 .PHONY: clients-install
 clients-install: clients
-       $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-       $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(bindir)
+       $(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
        set -e ; for c in $(CLIENTS) ; do \
-               ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
+               ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
        done
 
 -include $(DEPS)
diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index a64db86..8b80541 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -20,12 +20,12 @@ build: $(BIN) $(LIBBIN)
 
 .PHONY: install
 install: build
-       $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+       $(INSTALL_DIR) $(DESTDIR)$(bindir)
        [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
        $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
-       $(INSTALL_PROG) $(BIN) $(DESTDIR)$(BINDIR)
-       $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+       $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir)
+       $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
        [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
        $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.