Skip to contentSkip to conversation

tools: remove private Makefile variables

PATCH Superseded Olaf Hering 4 participants 14 messages Apr 24, 2015 – May 7, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover tools: remove private Makefile variables

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Olaf

Olaf Hering (7):
tools: replace private SBINDIR with automake sbindir
tools: replace private BINDIR with automake bindir
tools: replace private PREFIX with automake prefix
tools: replace private INCLUDEDIR with automake includedir
tools: replace private MANDIR with automake mandir
tools: replace private LIBDIR with automake libdir
tools: replace private DOCDIR with automake docdir

 Config.mk                                    | 10 +++---
 config/Paths.mk.in                           | 12 ++------
 docs/Makefile                                | 10 +++---
 stubdom/Makefile                             |  4 +--
 tools/Makefile                               | 46 ++++++++++++++--------------
 tools/blktap2/control/Makefile               | 12 ++++----
 tools/blktap2/drivers/Makefile               |  2 +-
 tools/blktap2/include/Makefile               |  2 +-
 tools/blktap2/vhd/Makefile                   |  2 +-
 tools/blktap2/vhd/lib/Makefile               |  2 +-
 tools/console/Makefile                       |  4 +--
 tools/debugger/gdbsx/Makefile                |  4 +--
 tools/debugger/kdd/Makefile                  |  4 +--
 tools/flask/utils/Makefile                   |  4 +--
 tools/hotplug/FreeBSD/rc.d/xencommons.in     | 16 +++++-----
 tools/hotplug/FreeBSD/vif-bridge             |  2 +-
 tools/hotplug/Linux/init.d/xen-watchdog.in   |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in     |  8 ++---
 tools/hotplug/Linux/xen-hotplug-common.sh.in |  4 +--
 tools/hotplug/Linux/xendomains.in            |  2 +-
 tools/hotplug/NetBSD/block                   |  2 +-
 tools/hotplug/NetBSD/rc.d/xen-watchdog       |  6 ++--
 tools/hotplug/NetBSD/rc.d/xencommons.in      | 16 +++++-----
 tools/hotplug/NetBSD/rc.d/xendomains         |  4 +--
 tools/hotplug/NetBSD/vif-bridge              |  2 +-
 tools/hotplug/NetBSD/vif-ip                  |  2 +-
 tools/include/Makefile                       | 40 ++++++++++++------------
 tools/libfsimage/Rules.mk                    |  2 +-
 tools/libfsimage/common/Makefile             | 16 +++++-----
 tools/libvchan/Makefile                      | 14 ++++-----
 tools/libxc/Makefile                         | 24 +++++++--------
 tools/libxl/Makefile                         | 26 ++++++++--------
 tools/misc/Makefile                          |  8 ++---
 tools/ocaml/xenstored/Makefile               |  4 +--
 tools/pygrub/Makefile                        |  6 ++--
 tools/tests/mce-test/tools/Makefile          |  2 +-
 tools/xenbackendd/Makefile                   |  4 +--
 tools/xenmon/Makefile                        | 12 ++++----
 tools/xenpmd/Makefile                        |  4 +--
 tools/xenstat/libxenstat/Makefile            | 10 +++---
 tools/xenstat/xentop/Makefile                |  4 +--
 tools/xenstore/Makefile                      | 44 +++++++++++++-------------
 tools/xentrace/Makefile                      |  6 ++--
 43 files changed, 201 insertions(+), 209 deletions(-)
#1 lore raw

PATCH 1/7 tools: replace private SBINDIR with automake sbindir

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Mukesh Rathor <[email protected]>
Cc Tim Deegan <[email protected]>
Cc Daniel De Graaf <[email protected]>
Cc David Scott <[email protected]>
---
 Config.mk                                    |  2 +-
 config/Paths.mk.in                           |  1 -
 tools/Makefile                               |  6 +++---
 tools/blktap2/control/Makefile               |  4 ++--
 tools/blktap2/drivers/Makefile               |  2 +-
 tools/blktap2/vhd/Makefile                   |  2 +-
 tools/console/Makefile                       |  4 ++--
 tools/debugger/gdbsx/Makefile                |  4 ++--
 tools/debugger/kdd/Makefile                  |  4 ++--
 tools/flask/utils/Makefile                   |  4 ++--
 tools/hotplug/FreeBSD/rc.d/xencommons.in     | 12 ++++++------
 tools/hotplug/FreeBSD/vif-bridge             |  2 +-
 tools/hotplug/Linux/init.d/xen-watchdog.in   |  2 +-
 tools/hotplug/Linux/init.d/xencommons.in     |  2 +-
 tools/hotplug/Linux/xen-hotplug-common.sh.in |  2 +-
 tools/hotplug/Linux/xendomains.in            |  2 +-
 tools/hotplug/NetBSD/block                   |  2 +-
 tools/hotplug/NetBSD/rc.d/xen-watchdog       |  4 ++--
 tools/hotplug/NetBSD/rc.d/xencommons.in      | 12 ++++++------
 tools/hotplug/NetBSD/rc.d/xendomains         |  2 +-
 tools/hotplug/NetBSD/vif-bridge              |  2 +-
 tools/hotplug/NetBSD/vif-ip                  |  2 +-
 tools/libxl/Makefile                         |  4 ++--
 tools/misc/Makefile                          |  4 ++--
 tools/ocaml/xenstored/Makefile               |  4 ++--
 tools/tests/mce-test/tools/Makefile          |  2 +-
 tools/xenbackendd/Makefile                   |  4 ++--
 tools/xenmon/Makefile                        |  8 ++++----
 tools/xenpmd/Makefile                        |  4 ++--
 tools/xenstat/xentop/Makefile                |  4 ++--
 tools/xenstore/Makefile                      |  4 ++--
 31 files changed, 58 insertions(+), 59 deletions(-)
Config.mk +1 -1
index 28b77d6..abb1e44 100644
@@ -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
 
config/Paths.mk.in +0 -1
index 150bae7..26674b1 100644
@@ -31,7 +31,6 @@ sysconfdir               := @sysconfdir@
 
 PREFIX                   := $(prefix)
 
-SBINDIR                  := $(sbindir)
 BINDIR                   := $(bindir)
 LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
 LIBEXEC_BIN              := @LIBEXEC_BIN@
tools/Makefile +3 -3
index 966354a..77625cb 100644
@@ -71,7 +71,7 @@ uninstall:
 	rm -f  $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules
 	rm -f  $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules
 	rm -f  $(D)$(SYSCONFIG_DIR)/xendomains
-	rm -f  $(D)$(SBINDIR)/xendomains
+	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
@@ -93,8 +93,8 @@ uninstall:
 	rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil*
 	rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
 	rm -rf $(D)$(LIBEXEC)
-	rm -rf $(D)$(SBINDIR)/setmask
-	rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm
+	rm -rf $(D)$(sbindir)/setmask
+	rm -rf $(D)$(sbindir)/xen* $(D)$(sbindir)/netfix $(D)$(sbindir)/xm
 	rm -rf $(D)$(SHAREDIR)/doc/xen
 	rm -rf $(D)$(SHAREDIR)/xen
 	rm -rf $(D)$(SHAREDIR)/qemu-xen
tools/blktap2/control/Makefile +2 -2
index 1ae6902..9ae2e51 100644
@@ -61,8 +61,8 @@ $(LIB_SHARED): $(CTL_PICS)
 	$(CC) $(LDFLAGS) -fPIC  -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@  $(APPEND_LDFLAGS)
 
 install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
-	$(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) -p $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir)
 	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
 	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
 	ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
tools/blktap2/drivers/Makefile +1 -1
index 2f96c91..5328c40 100644
@@ -7,7 +7,7 @@ LIBVHDDIR  = $(BLKTAP_ROOT)/vhd/lib
 IBIN       = tapdisk2 td-util tapdisk-client tapdisk-stream tapdisk-diff
 QCOW_UTIL  = img2qcow qcow-create qcow2raw
 LOCK_UTIL  = lock-util
-INST_DIR   = $(SBINDIR)
+INST_DIR   = $(sbindir)
 
 CFLAGS    += -Werror
 CFLAGS    += -Wno-unused
tools/blktap2/vhd/Makefile +1 -1
index 9e21cce..fabd665 100644
@@ -6,7 +6,7 @@ SUBDIRS-y         :=
 SUBDIRS-y         += lib
 
 IBIN               = vhd-util vhd-update
-INST_DIR           = $(SBINDIR)
+INST_DIR           = $(sbindir)
 
 CFLAGS            += -Werror
 CFLAGS            += -Wno-unused
tools/console/Makefile +2 -2
index 239ec60..71f8088 100644
@@ -33,8 +33,8 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
 
 .PHONY: install
 install: $(BIN)
-	$(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
-	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)/$(sbindir)
+	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN)
 
tools/debugger/gdbsx/Makefile +2 -2
index 31eb900..4ed6d76 100644
@@ -18,8 +18,8 @@ distclean: clean
 
 .PHONY: install
 install: all
-	[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) gdbsx $(DESTDIR)$(SBINDIR)/gdbsx
+	[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) gdbsx $(DESTDIR)$(sbindir)/gdbsx
 
 gdbsx: gx/gx_all.a xg/xg_all.a 
 	$(CC) -o $@ $^
tools/debugger/kdd/Makefile +2 -2
index 8eafc82..a79d7cf 100644
@@ -21,5 +21,5 @@ distclean: clean
 
 .PHONY: install
 install: all
-	[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) kdd $(DESTDIR)$(SBINDIR)/kdd
+	[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) kdd $(DESTDIR)$(sbindir)/kdd
tools/flask/utils/Makefile +2 -2
index 5dfd271..91a53b4 100644
@@ -52,7 +52,7 @@ print-end:
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(sbindir)
 
 -include $(DEPS)
tools/hotplug/FreeBSD/rc.d/xencommons.in +6 -6
index 900990b..3e204d6 100644
@@ -33,7 +33,7 @@ xen_startcmd()
 	local time=0
 	local timeout=30
 
-	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${sbindir}/xenstored)
 	if test -z "$xenstored_pid"; then
 		printf "Cleaning xenstore database.\n"
 		if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -45,7 +45,7 @@ xen_startcmd()
 		if [ -n "${XENSTORED_TRACE}" ]; then
 			XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
 		fi
-		${SBINDIR}/xenstored ${XENSTORED_ARGS}
+		${sbindir}/xenstored ${XENSTORED_ARGS}
 		while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` ; do
 			printf "."
 			time=$(($time+1))
@@ -60,7 +60,7 @@ xen_startcmd()
 		XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
 	fi
 
-	${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
+	${sbindir}/xenconsoled ${XENCONSOLED_ARGS}
 
 	printf "\n"
 
@@ -74,7 +74,7 @@ xen_stop()
 	printf "Stopping xencommons.\n"
 	printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
 
-	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${sbindir}/xenconsoled)
 	pids="$pids $rc_pid"
 
 	kill -${sig_stop:-TERM} $pids
@@ -83,12 +83,12 @@ xen_stop()
 
 xen_status()
 {
-	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${sbindir}/xenstored)
 	if test -n ${xenstored_pid}; then
 		pids="$pids $xenstored_pid"
 	fi
 
-	xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+	xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${sbindir}/xenconsoled)
 	if test -n ${xenconsoled_pid}; then
 		pids="$pids $xenconsoled_pid"
 	fi
tools/hotplug/FreeBSD/vif-bridge +1 -1
index 062b20a..3319710 100644
@@ -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
tools/hotplug/Linux/init.d/xen-watchdog.in +1 -1
index 32c7268..c05f1f6 100644
@@ -19,7 +19,7 @@
 
 . @XEN_SCRIPT_DIR@/hotplugpath.sh
 
-DAEMON=${SBINDIR}/xenwatchdogd
+DAEMON=${sbindir}/xenwatchdogd
 base=$(basename $DAEMON)
 
 # Source function library.
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index a1095c2..82b3fcb 100644
@@ -96,7 +96,7 @@ do_start () {
 
 	echo Starting xenconsoled...
 	test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" --log=$XENCONSOLED_TRACE"
-	${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
+	${sbindir}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
 	echo Starting QEMU as disk backend for dom0
 	test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
 	$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
tools/hotplug/Linux/xen-hotplug-common.sh.in +1 -1
index 1deafe1..f698880 100644
@@ -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)
tools/hotplug/Linux/xendomains.in +1 -1
index 2e65ac6..0603842 100644
@@ -29,7 +29,7 @@
 
 . @XEN_SCRIPT_DIR@/hotplugpath.sh
 
-CMD=${SBINDIR}/xl
+CMD=${sbindir}/xl
 HEADCOMP="Xen saved domain"
 $CMD list &> /dev/null
 if test $? -ne 0
tools/hotplug/NetBSD/block +1 -1
index b2e9af5..3a78ea2 100644
@@ -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() {
tools/hotplug/NetBSD/rc.d/xen-watchdog +2 -2
index ff4a52c..0941fe7 100644
@@ -16,8 +16,8 @@ export LD_LIBRARY_PATH
 
 name="xenwatchdog"
 rcvar=$name
-command="${SBINDIR}/xenwatchdogd"
-start_cmd="echo Starting ${name}. && PATH=${PATH}:${SBINDIR} ${command} 30 15"
+command="${sbindir}/xenwatchdogd"
+start_cmd="echo Starting ${name}. && PATH=${PATH}:${sbindir} ${command} 30 15"
 
 load_rc_config $name
 run_rc_command "$1"
tools/hotplug/NetBSD/rc.d/xencommons.in +6 -6
index db03f22..82c2171 100644
@@ -37,7 +37,7 @@ xen_startcmd()
 	local time=0
 	local timeout=30
 
-	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${sbindir}/xenstored)
 	if test -z "$xenstored_pid"; then
 		printf "Cleaning xenstore database.\n"
 		if [ -z "${XENSTORED_ROOTDIR}" ]; then
@@ -49,7 +49,7 @@ xen_startcmd()
 		if [ -n "${XENSTORED_TRACE}" ]; then
 			XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
 		fi
-		${SBINDIR}/xenstored ${XENSTORED_ARGS}
+		${sbindir}/xenstored ${XENSTORED_ARGS}
 		while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` ; do
 			printf "."
 			time=$(($time+1))
@@ -64,7 +64,7 @@ xen_startcmd()
 		XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
 	fi
 
-	${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
+	${sbindir}/xenconsoled ${XENCONSOLED_ARGS}
 
 	printf "\n"
 
@@ -78,7 +78,7 @@ xen_stop()
 	printf "Stopping xencommons.\n"
 	printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
 
-	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${sbindir}/xenconsoled)
 	pids="$pids $rc_pid"
 
 	kill -${sig_stop:-TERM} $pids
@@ -87,12 +87,12 @@ xen_stop()
 
 xen_status()
 {
-	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+	xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${sbindir}/xenstored)
 	if test -n ${xenstored_pid}; then
 		pids="$pids $xenstored_pid"
 	fi
 
-	xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+	xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${sbindir}/xenconsoled)
 	if test -n ${xenconsoled_pid}; then
 		pids="$pids $xenconsoled_pid"
 	fi
tools/hotplug/NetBSD/rc.d/xendomains +1 -1
index b0e7111..204a8f0 100644
@@ -34,7 +34,7 @@ LD_LIBRARY_PATH="${LIBDIR}"
 export LD_LIBRARY_PATH
 
 name="xendomains"
-ctl_command="${SBINDIR}/xl"
+ctl_command="${sbindir}/xl"
 start_cmd="xendomains_start"
 stop_cmd="xendomains_stop"
 list_cmd="xendomains_list"
tools/hotplug/NetBSD/vif-bridge +1 -1
index 960303e..d6a2b16 100644
@@ -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
tools/hotplug/NetBSD/vif-ip +1 -1
index 28c43de..fd60b7e 100644
@@ -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
tools/libxl/Makefile +2 -2
index 1b16598..ef8b407 100644
@@ -256,13 +256,13 @@ $(PKG_CONFIG): % : %.in Makefile
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig
-	$(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
+	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
 	$(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
tools/misc/Makefile +2 -2
index ccd36af..a3007c2 100644
@@ -52,10 +52,10 @@ all build: $(TARGETS_BUILD)
 .PHONY: install
 install: build
 	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
-	$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(sbindir)
 	$(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
 
 .PHONY: clean
tools/ocaml/xenstored/Makefile +2 -2
index 48f1079..bcf09d4 100644
@@ -77,8 +77,8 @@ bins: $(PROGRAMS)
 libs: $(LIBS)
 
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) oxenstored $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) oxenstored $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
 	$(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR)
 
tools/tests/mce-test/tools/Makefile +1 -1
index 4a0db49..924e4dd 100644
@@ -13,7 +13,7 @@ CFLAGS += $(CFLAGS_xeninclude)
 all: xen-mceinj
 
 install: xen-mceinj
-	$(INSTALL_PROG) xen-mceinj $(DESTDIR)$(SBINDIR)
+	$(INSTALL_PROG) xen-mceinj $(DESTDIR)$(sbindir)
 
 .PHONY: clean
 clean:
tools/xenbackendd/Makefile +2 -2
index b6bc160..f52be74 100644
@@ -25,8 +25,8 @@ build: xenbackendd
 
 .PHONY: install
 install: build
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) xenbackendd $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) xenbackendd $(DESTDIR)$(sbindir)
 
 .PHONY: clean
 clean:
tools/xenmon/Makefile +4 -4
index c206d94..a676d32 100644
@@ -27,10 +27,10 @@ build: xentrace_setmask xenbaked
 
 .PHONY: install
 install: build
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
-	$(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(SBINDIR)/xentrace_setmask
-	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(SBINDIR)/xenmon.py
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
+	$(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(sbindir)/xentrace_setmask
+	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py
 	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
 	$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
 
tools/xenpmd/Makefile +2 -2
index 4605261..55e8fc5 100644
@@ -11,8 +11,8 @@ all: xenpmd
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) xenpmd $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) xenpmd $(DESTDIR)$(sbindir)
 
 .PHONY: clean
 clean:
tools/xenstat/xentop/Makefile +2 -2
index 5376fdc..2652c9d 100644
@@ -31,8 +31,8 @@ all: xentop
 
 .PHONY: install
 install: xentop xentop.1
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-	$(INSTALL_PROG) xentop $(DESTDIR)$(SBINDIR)/xentop
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
 	$(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
 	$(INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
 
tools/xenstore/Makefile +2 -2
index 60c3a08..a4664ec 100644
@@ -132,9 +132,9 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
 ifeq ($(XENSTORE_XENSTORED),y)
-	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED)
-	$(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
+	$(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
 endif
 	$(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
 	$(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
#2 lore raw

PATCH 2/7 tools: replace private BINDIR with automake bindir

In reply to Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc George Dunlap <[email protected]>
---
 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(-)
Config.mk +1 -1
index abb1e44..1312a80 100644
@@ -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
 
config/Paths.mk.in +0 -1
index 26674b1..1653f26 100644
@@ -31,7 +31,6 @@ sysconfdir               := @sysconfdir@
 
 PREFIX                   := $(prefix)
 
-BINDIR                   := $(bindir)
 LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
 LIBEXEC_BIN              := @LIBEXEC_BIN@
 LIBEXEC_LIB              := $(LIBEXEC)/lib
tools/Makefile +8 -8
index 77625cb..b05d12a 100644
@@ -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
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
index 3e204d6..0ef9af9 100644
@@ -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
tools/hotplug/FreeBSD/vif-bridge +1 -1
index 3319710..428c653 100644
@@ -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
tools/hotplug/Linux/init.d/xencommons.in +3 -3
index 82b3fcb..00d0f55 100644
@@ -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
tools/hotplug/Linux/xen-hotplug-common.sh.in +1 -1
index f698880..eee8845 100644
@@ -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)
tools/hotplug/NetBSD/block +1 -1
index 3a78ea2..32c20b6 100644
@@ -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() {
tools/hotplug/NetBSD/rc.d/xencommons.in +1 -1
index 82c2171..8217ae8 100644
@@ -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
tools/hotplug/NetBSD/vif-bridge +1 -1
index d6a2b16..b58e922 100644
@@ -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
tools/hotplug/NetBSD/vif-ip +1 -1
index fd60b7e..83cbfe2 100644
@@ -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
tools/misc/Makefile +2 -2
index a3007c2..3817317 100644
@@ -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)
 
tools/pygrub/Makefile +3 -3
index 00e654a..fe8e03b 100644
@@ -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
tools/xenstore/Makefile +7 -7
index a4664ec..a809d74 100644
@@ -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)
tools/xentrace/Makefile +3 -3
index a64db86..8b80541 100644
@@ -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)
#3 lore raw

PATCH 3/7 tools: replace private PREFIX with automake prefix

In reply to Olaf Hering

Only qemu-traditional expects PREFIX in environment, which is provided by buildmakevars2shellvars.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 Config.mk          | 6 +++---
 config/Paths.mk.in | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)
Config.mk +3 -3
index 1312a80..ec16961 100644
@@ -75,8 +75,8 @@ EXTRA_LIB += $(EXTRA_PREFIX)/lib
 endif
 
 PYTHON      ?= python
-PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
-# The above requires that PREFIX contains *no spaces*. This variable is here
+PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
+# The above requires that prefix contains *no spaces*. This variable is here
 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
 #  https://bugs.launchpad.net/ubuntu/+bug/362570
 
@@ -142,7 +142,7 @@ define as-insn-check-closure
 endef
 
 define buildmakevars2shellvars
-    export PREFIX="$(PREFIX)";                                            \
+    export PREFIX="$(prefix)";                                            \
     export XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)";                            \
     export XEN_ROOT="$(XEN_ROOT)"
 endef
config/Paths.mk.in +0 -2
index 1653f26..bf9bd51 100644
@@ -29,8 +29,6 @@ includedir               := @includedir@
 localstatedir            := @localstatedir@
 sysconfdir               := @sysconfdir@
 
-PREFIX                   := $(prefix)
-
 LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
 LIBEXEC_BIN              := @LIBEXEC_BIN@
 LIBEXEC_LIB              := $(LIBEXEC)/lib
#4 lore raw

PATCH 4/7 tools: replace private INCLUDEDIR with automake includedir

In reply to Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 config/Paths.mk.in                |  1 -
 tools/Makefile                    | 14 +++++++-------
 tools/blktap2/include/Makefile    |  2 +-
 tools/include/Makefile            | 40 +++++++++++++++++++--------------------
 tools/libfsimage/common/Makefile  |  8 ++++----
 tools/libvchan/Makefile           |  4 ++--
 tools/libxc/Makefile              |  6 +++---
 tools/libxl/Makefile              |  4 ++--
 tools/xenstat/libxenstat/Makefile |  2 +-
 tools/xenstore/Makefile           | 16 ++++++++--------
 10 files changed, 48 insertions(+), 49 deletions(-)
config/Paths.mk.in +0 -1
index bf9bd51..32f7c78 100644
@@ -34,7 +34,6 @@ LIBEXEC_BIN              := @LIBEXEC_BIN@
 LIBEXEC_LIB              := $(LIBEXEC)/lib
 LIBEXEC_INC              := $(LIBEXEC)/include
 
-INCLUDEDIR               := $(includedir)
 SHAREDIR                 := @SHAREDIR@
 MANDIR                   := $(mandir)
 MAN1DIR                  := $(MANDIR)/man1
tools/Makefile +7 -7
index b05d12a..1e0c0a7 100644
@@ -82,13 +82,13 @@ uninstall:
 	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
-	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
-	rm -rf $(D)$(INCLUDEDIR)/xen
-	rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl*
-	rm -rf $(D)$(INCLUDEDIR)/xenstat.h $(D)$(INCLUDEDIR)/xentoollog.h
+	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
+	rm -rf $(D)$(includedir)/xenstore_lib.h $(D)$(includedir)/xenstore.h
+	rm -rf $(D)$(includedir)/xen
+	rm -rf $(D)$(includedir)/_libxl* $(D)$(includedir)/libxl*
+	rm -rf $(D)$(includedir)/xenstat.h $(D)$(includedir)/xentoollog.h
 	rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
 	rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil*
 	rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
tools/blktap2/include/Makefile +1 -1
index c238486..66e8a1e 100644
@@ -6,7 +6,7 @@ all:
 
 .PHONY: install
 install:
-	$(INSTALL_DIR) -p $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) -p $(DESTDIR)$(includedir)
 
 
 .PHONY: clean
tools/include/Makefile +20 -20
index 601f79c..3cd157a 100644
@@ -21,29 +21,29 @@ xen/.dir:
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-arm
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-arm/hvm
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/io
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/sys
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/xsm
-	$(INSTALL_DATA) xen/COPYING $(DESTDIR)$(INCLUDEDIR)/xen
-	$(INSTALL_DATA) xen/*.h $(DESTDIR)$(INCLUDEDIR)/xen
-	$(INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-	$(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-x86
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-x86/hvm
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-arm
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-arm/hvm
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/foreign
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/hvm
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/io
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/sys
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/xsm
+	$(INSTALL_DATA) xen/COPYING $(DESTDIR)$(includedir)/xen
+	$(INSTALL_DATA) xen/*.h $(DESTDIR)$(includedir)/xen
+	$(INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(includedir)/xen/arch-x86
+	$(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(includedir)/xen/arch-x86/hvm
 
 # 	xen/arch-arm doesn't contains headers for now. Uncommented the line
 # 	as soon as a new header is added
-#	$(INSTALL_DATA) xen/arch-arm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-arm
-	$(INSTALL_DATA) xen/arch-arm/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-arm/hvm
-	$(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-	$(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-	$(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(INCLUDEDIR)/xen/io
-	$(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(INCLUDEDIR)/xen/sys
-	$(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
+#	$(INSTALL_DATA) xen/arch-arm/*.h $(DESTDIR)$(includedir)/xen/arch-arm
+	$(INSTALL_DATA) xen/arch-arm/hvm/*.h $(DESTDIR)$(includedir)/xen/arch-arm/hvm
+	$(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign
+	$(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm
+	$(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io
+	$(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys
+	$(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm
 
 .PHONY: clean
 clean:
tools/libfsimage/common/Makefile +4 -4
index fb306f4..a70219f 100644
@@ -23,13 +23,13 @@ all: $(LIB)
 .PHONY: install
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
 	ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR)
 	ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so
-	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir)
 
 clean distclean::
 	rm -f $(LIB)
tools/libvchan/Makefile +2 -2
index d768df4..3ce7c10 100644
@@ -43,11 +43,11 @@ vchan-node2: $(NODE2_OBJS) libxenvchan.so
 .PHONY: install
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_PROG) libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
 	ln -sf libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenvchan.so.$(MAJOR)
 	ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenvchan.so
-	$(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(LIBDIR)
 
 .PHONY: clean
tools/libxc/Makefile +3 -3
index 8b609cf..fce9c9f 100644
@@ -152,17 +152,17 @@ libs: $(LIB)
 .PHONY: install
 install: build
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
 	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
 	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
-	$(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(includedir)
 	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
 	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
 	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
-	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir)
 
 .PHONY: TAGS
 TAGS:
tools/libxl/Makefile +2 -2
index ef8b407..d957d4b 100644
@@ -258,7 +258,7 @@ $(PKG_CONFIG): % : %.in Makefile
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig
@@ -273,7 +273,7 @@ install: all
 	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
 	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
 	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
 	$(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
 	$(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
tools/xenstat/libxenstat/Makefile +1 -1
index 7c973f8..3b58147 100644
@@ -56,7 +56,7 @@ src/libxenstat.so: src/libxenstat.so.$(MAJOR)
 
 .PHONY: install
 install: all
-	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)/libxenstat.a
 	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
 	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstat.so.$(MAJOR)
tools/xenstore/Makefile +8 -8
index a809d74..4aec1f8 100644
@@ -129,8 +129,8 @@ tarball: clean
 .PHONY: install
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(bindir)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)
+	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xenstore-compat
 ifeq ($(XENSTORE_XENSTORED),y)
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED)
@@ -146,12 +146,12 @@ endif
 	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
 	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
 	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) include/xenstore.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) include/xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) include/compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h
-	$(INSTALL_DATA) include/compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h
-	ln -sf xenstore-compat/xs.h  $(DESTDIR)$(INCLUDEDIR)/xs.h
-	ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xs_lib.h
+	$(INSTALL_DATA) include/xenstore.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) include/xenstore_lib.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) include/compat/xs.h $(DESTDIR)$(includedir)/xenstore-compat/xs.h
+	$(INSTALL_DATA) include/compat/xs_lib.h $(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h
+	ln -sf xenstore-compat/xs.h  $(DESTDIR)$(includedir)/xs.h
+	ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h
 
 .PHONY: clients-install
 clients-install: clients
#5 lore raw

PATCH 5/7 tools: replace private MANDIR with automake mandir

In reply to Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 config/Paths.mk.in | 5 ++---
 docs/Makefile      | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)
config/Paths.mk.in +2 -3
index 32f7c78..8ca02bb 100644
@@ -35,9 +35,8 @@ LIBEXEC_LIB              := $(LIBEXEC)/lib
 LIBEXEC_INC              := $(LIBEXEC)/include
 
 SHAREDIR                 := @SHAREDIR@
-MANDIR                   := $(mandir)
-MAN1DIR                  := $(MANDIR)/man1
-MAN8DIR                  := $(MANDIR)/man8
+MAN1DIR                  := $(mandir)/man1
+MAN8DIR                  := $(mandir)/man8
 LIBDIR                   := $(libdir)
 DOCDIR                   := $(docdir)
 
docs/Makefile +3 -3
index 9183252..94965c7 100644
@@ -79,9 +79,9 @@ distclean: clean
 # Top level install targets
 .PHONY: install-man-pages
 install-man-pages: man-pages
-	$(INSTALL_DIR) $(DESTDIR)$(MANDIR)
-	cp -R man1 $(DESTDIR)$(MANDIR)
-	cp -R man5 $(DESTDIR)$(MANDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(mandir)
+	cp -R man1 $(DESTDIR)$(mandir)
+	cp -R man5 $(DESTDIR)$(mandir)
 
 .PHONY: install-html
 install-html: html txt figs
#6 lore raw

Re: [PATCH 5/7] tools: replace private MANDIR with automake mandir

Quoted 8 lines · Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>

In some copious free time during a docs day, we should see about moving the xenstat/xentrace manpages into docs/ (and writing them in something slightly nicer than raw troff), which would allow all $(mandir) information to disappear from Paths.mk

~Andrew

#7 lore raw

PATCH 6/7 tools: replace private LIBDIR with automake libdir

In reply to Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 Config.mk                                    |  4 ++--
 config/Paths.mk.in                           |  1 -
 tools/Makefile                               | 10 +++++-----
 tools/blktap2/control/Makefile               |  8 ++++----
 tools/blktap2/vhd/lib/Makefile               |  2 +-
 tools/hotplug/FreeBSD/rc.d/xencommons.in     |  2 +-
 tools/hotplug/Linux/xen-hotplug-common.sh.in |  2 +-
 tools/hotplug/NetBSD/rc.d/xen-watchdog       |  2 +-
 tools/hotplug/NetBSD/rc.d/xencommons.in      |  2 +-
 tools/hotplug/NetBSD/rc.d/xendomains         |  2 +-
 tools/libfsimage/Rules.mk                    |  2 +-
 tools/libfsimage/common/Makefile             |  8 ++++----
 tools/libvchan/Makefile                      | 10 +++++-----
 tools/libxc/Makefile                         | 18 +++++++++---------
 tools/libxl/Makefile                         | 18 +++++++++---------
 tools/xenstat/libxenstat/Makefile            |  8 ++++----
 tools/xenstore/Makefile                      | 10 +++++-----
 17 files changed, 54 insertions(+), 55 deletions(-)
Config.mk +2 -2
index ec16961..46928ca 100644
@@ -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
 
@@ -204,7 +204,7 @@ CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
 LDFLAGS += $(foreach i, $(PREPEND_LIB), -L$(i))
 CFLAGS += $(foreach i, $(PREPEND_INCLUDES), -I$(i))
 ifeq ($(XEN_TOOLS_RPATH),y)
-LDFLAGS += -Wl,-rpath,$(LIBDIR)
+LDFLAGS += -Wl,-rpath,$(libdir)
 endif
 APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
 APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
config/Paths.mk.in +0 -1
index 8ca02bb..6db108a 100644
@@ -37,7 +37,6 @@ LIBEXEC_INC              := $(LIBEXEC)/include
 SHAREDIR                 := @SHAREDIR@
 MAN1DIR                  := $(mandir)/man1
 MAN8DIR                  := $(mandir)/man8
-LIBDIR                   := $(libdir)
 DOCDIR                   := $(docdir)
 
 XEN_RUN_DIR              := @XEN_RUN_DIR@
tools/Makefile +5 -5
index 1e0c0a7..383d4ca 100644
@@ -89,9 +89,9 @@ uninstall:
 	rm -rf $(D)$(includedir)/xen
 	rm -rf $(D)$(includedir)/_libxl* $(D)$(includedir)/libxl*
 	rm -rf $(D)$(includedir)/xenstat.h $(D)$(includedir)/xentoollog.h
-	rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
-	rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil*
-	rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
+	rm -rf $(D)$(libdir)/libxenctrl* $(D)$(libdir)/libxenguest*
+	rm -rf $(D)$(libdir)/libxenstore* $(D)$(libdir)/libxlutil*
+	rm -rf $(D)$(libdir)/python/xen $(D)$(libdir)/python/grub
 	rm -rf $(D)$(LIBEXEC)
 	rm -rf $(D)$(sbindir)/setmask
 	rm -rf $(D)$(sbindir)/xen* $(D)$(sbindir)/netfix $(D)$(sbindir)/xm
@@ -117,8 +117,8 @@ IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \
 endif
 
 ifeq ($(XEN_TOOLS_RPATH),y)
-QEMU_UPSTREAM_RPATH := -Wl,-rpath,$(LIBEXEC_LIB):$(LIBDIR)
-IOEMU_EXTRA_LDFLAGS := --extra-ldflags="-Wl,-rpath,$(LIBDIR)"
+QEMU_UPSTREAM_RPATH := -Wl,-rpath,$(LIBEXEC_LIB):$(libdir)
+IOEMU_EXTRA_LDFLAGS := --extra-ldflags="-Wl,-rpath,$(libdir)"
 else
 QEMU_UPSTREAM_RPATH := -Wl,-rpath,$(LIBEXEC_LIB)
 IOEMU_EXTRA_LDFLAGS :=
tools/blktap2/control/Makefile +4 -4
index 9ae2e51..767f52a 100644
@@ -63,10 +63,10 @@ $(LIB_SHARED): $(CTL_PICS)
 install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
 	$(INSTALL_DIR) -p $(DESTDIR)$(sbindir)
 	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir)
-	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
-	ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
-	ln -sf $(LIB_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBSONAME)
+	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(libdir)
+	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(libdir)
+	ln -sf $(LIBSONAME) $(DESTDIR)$(libdir)/$(LIBNAME).so
+	ln -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIBSONAME)
 
 clean:
 	rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
tools/blktap2/vhd/lib/Makefile +1 -1
index 3904e97..ab2d648 100644
@@ -10,7 +10,7 @@ LVM-UTIL-OBJ    := $(BLKTAP_ROOT)/lvm/lvm-util.o
 
 LIBVHD-BUILD    := libvhd.a
 
-INST-DIR         = $(LIBDIR)
+INST-DIR         = $(libdir)
 
 CFLAGS          += -Werror
 CFLAGS          += -Wno-unused
tools/hotplug/FreeBSD/rc.d/xencommons.in +1 -1
index 0ef9af9..d453c6b 100644
@@ -7,7 +7,7 @@
 
 . @XEN_SCRIPT_DIR@/hotplugpath.sh
 
-LD_LIBRARY_PATH="${LIBDIR}"
+LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xencommons"
tools/hotplug/Linux/xen-hotplug-common.sh.in +1 -1
index eee8845..40b933e 100644
@@ -31,7 +31,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 LD_LIBRARY_PATH="${LIBDIR}${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH="${libdir}${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH"
 export LANG="POSIX"
 unset $(set | grep ^LC_ | cut -d= -f1)
 
tools/hotplug/NetBSD/rc.d/xen-watchdog +1 -1
index 0941fe7..d2e2ab8 100644
@@ -11,7 +11,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/xen-hotplugpath.sh"
 
-LD_LIBRARY_PATH="${LIBDIR}"
+LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xenwatchdog"
tools/hotplug/NetBSD/rc.d/xencommons.in +1 -1
index 8217ae8..d7552cd 100644
@@ -8,7 +8,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/xen-hotplugpath.sh"
 
-LD_LIBRARY_PATH="${LIBDIR}"
+LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xencommons"
tools/hotplug/NetBSD/rc.d/xendomains +1 -1
index 204a8f0..edc4495 100644
@@ -30,7 +30,7 @@
 DIR=$(dirname "$0")
 . "${DIR}/xen-hotplugpath.sh"
 
-LD_LIBRARY_PATH="${LIBDIR}"
+LD_LIBRARY_PATH="${libdir}"
 export LD_LIBRARY_PATH
 
 name="xendomains"
tools/libfsimage/Rules.mk +1 -1
index 8a23655..a0c6504 100644
@@ -6,7 +6,7 @@ LDFLAGS += -L../common/
 
 PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
 
-FSDIR = $(LIBDIR)/fs
+FSDIR = $(libdir)/fs
 
 FSLIB = fsimage.so
 
tools/libfsimage/common/Makefile +4 -4
index a70219f..4840bc2 100644
@@ -22,11 +22,11 @@ all: $(LIB)
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
-	$(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR)
-	ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so
+	$(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libfsimage.so.$(MAJOR)
+	ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(libdir)/libfsimage.so
 	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir)
tools/libvchan/Makefile +5 -5
index 3ce7c10..3c50fe6 100644
@@ -42,13 +42,13 @@ vchan-node2: $(NODE2_OBJS) libxenvchan.so
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
-	$(INSTALL_PROG) libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenvchan.so.$(MAJOR)
-	ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenvchan.so
+	$(INSTALL_PROG) libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	ln -sf libxenvchan.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenvchan.so.$(MAJOR)
+	ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenvchan.so
 	$(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(includedir)
-	$(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(libdir)
 
 .PHONY: clean
 clean:
tools/libxc/Makefile +9 -9
index fce9c9f..4b22c64 100644
@@ -151,17 +151,17 @@ libs: $(LIB)
 
 .PHONY: install
 install: build
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
-	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
-	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
-	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
+	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir)
+	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR)
+	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so
 	$(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(includedir)
-	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
-	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
-	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
+	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir)
+	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR)
+	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenguest.so
 	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir)
 
 .PHONY: TAGS
tools/libxl/Makefile +9 -9
index d957d4b..16d263a 100644
@@ -257,7 +257,7 @@ $(PKG_CONFIG): % : %.in Makefile
 .PHONY: install
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
@@ -265,14 +265,14 @@ install: all
 	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
 	$(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
-	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR)
-	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
-	$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)
-	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
-	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
-	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
+	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR)
+	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenlight.so
+	$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(libdir)
+	$(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir)
+	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir)/libxlutil.so.$(XLUMAJOR)
+	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(libdir)/libxlutil.so
+	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir)
 	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
 	$(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
tools/xenstat/libxenstat/Makefile +4 -4
index 3b58147..850d24a 100644
@@ -57,10 +57,10 @@ src/libxenstat.so: src/libxenstat.so.$(MAJOR)
 .PHONY: install
 install: all
 	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)
-	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)/libxenstat.a
-	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstat.so.$(MAJOR)
-	ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstat.so
+	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a
+	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
+	ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstat.so
 
 PYLIB=bindings/swig/python/_xenstat.so
 PYMOD=bindings/swig/python/xenstat.py
tools/xenstore/Makefile +5 -5
index 4aec1f8..30f3b46 100644
@@ -141,11 +141,11 @@ endif
 	set -e ; for c in $(CLIENTS) ; do \
 		ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
 	done
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_SHLIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
-	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
-	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(libdir)
+	$(INSTALL_SHLIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenstore.so.$(MAJOR)
+	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstore.so
+	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(libdir)
 	$(INSTALL_DATA) include/xenstore.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) include/xenstore_lib.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) include/compat/xs.h $(DESTDIR)$(includedir)/xenstore-compat/xs.h
#8 lore raw

PATCH 7/7 tools: replace private DOCDIR with automake docdir

In reply to Olaf Hering

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

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
Cc Samuel Thibault <[email protected]>
---
 config/Paths.mk.in    | 1 -
 docs/Makefile         | 4 ++--
 stubdom/Makefile      | 4 ++--
 tools/xenmon/Makefile | 4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)
config/Paths.mk.in +0 -1
index 6db108a..ddd72df 100644
@@ -37,7 +37,6 @@ LIBEXEC_INC              := $(LIBEXEC)/include
 SHAREDIR                 := @SHAREDIR@
 MAN1DIR                  := $(mandir)/man1
 MAN8DIR                  := $(mandir)/man8
-DOCDIR                   := $(docdir)
 
 XEN_RUN_DIR              := @XEN_RUN_DIR@
 XEN_LOG_DIR              := @XEN_LOG_DIR@
docs/Makefile +2 -2
index 94965c7..60bc541 100644
@@ -85,8 +85,8 @@ install-man-pages: man-pages
 
 .PHONY: install-html
 install-html: html txt figs
-	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-	[ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(docdir)
+	[ ! -d html ] || cp -R html $(DESTDIR)$(docdir)
 
 .PHONY: install
 install: install-man-pages install-html
stubdom/Makefile +2 -2
index 3e01aa6..faa7c21 100644
@@ -469,8 +469,8 @@ install: $(STUBDOMPATH)
 endif
 
 install-readme:
-	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-	$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.stubdom
+	$(INSTALL_DIR) $(DESTDIR)$(docdir)
+	$(INSTALL_DATA) README $(DESTDIR)$(docdir)/README.stubdom
 
 install-ioemu: ioemu-stubdom
 	$(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC_BIN)"
tools/xenmon/Makefile +2 -2
index a676d32..5095682 100644
@@ -31,8 +31,8 @@ install: build
 	$(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
 	$(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(sbindir)/xentrace_setmask
 	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py
-	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-	$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
+	$(INSTALL_DIR) $(DESTDIR)$(docdir)
+	$(INSTALL_DATA) README $(DESTDIR)$(docdir)/README.xenmon
 
 .PHONY: clean
 clean:
#9 lore raw
In reply to Olaf Hering
Quoted 2 lines · Olaf Hering

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Why?

-George

#10 lore raw
Quoted 5 lines · George Dunlap
Quoted 2 lines · Olaf Hering

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Why?

Why use private variables?

Olaf

#11 lore raw
Quoted 9 lines · Olaf Hering
Quoted 5 lines · George Dunlap
Quoted 2 lines · Olaf Hering

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Why?

Why use private variables?

The rationale for any change should be included in the either the cover letter or the patch changelogs, it shouldn't be necessary a) guess what your motivation is or b) play a pointless game of email tennis trying to get you to actually explain instead of avoiding the question.

Ian.

#12 lore raw
In reply to Olaf Hering
Quoted 9 lines · Olaf Hering
Quoted 5 lines · George Dunlap
Quoted 2 lines · Olaf Hering

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Why?

Why use private variables?

I'm not saying we should use private variables; I'm asking why you think we shouldn't.

So it sounds like the answer to my question is something like:

"The Xen build system creates a wide range of private variables which duplicate existing variables created by automake. There's no reason to duplicate these variables; just use the ones provided by automake. This makes our code simpler, by not having to duplicate a bunch of already-defined variables. It also has ${OTHER_POTENTIAL_BENEFIT[@]}."

You should put that explanation in the cover letter, and have some reference to it in each of the commit messages, so reviewers and archaeologists understand why you're making this change.

-George

#13 lore raw
In reply to George Dunlap
Quoted 5 lines · George Dunlap
Quoted 2 lines · Olaf Hering

Replace all private variables in Makefiles with automake variables. This series is based on 92ff75384bce7a11e27fbfaf0c531e88dd1ab4c7.

Why?

Thanks for your reply. The rationale comes from the --prefix changes I did for 4.5, it was just not enough time to get it into 4.5. See this msg and the followup.

http://lists.xenproject.org/archives/html/xen-devel/2014-09/msg03311.html

I will resend this series with updated description.

Olaf