[PATCH] Cleanup srcdir usage

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

 



In a lot places we use path like this:

  $(srcdir)/../src/....

when in fact it can be:

  $(top_srcdir)/src/

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 daemon/Makefile.am       | 12 ++++++------
 docs/Makefile.am         | 50 ++++++++++++++++++++++++------------------------
 src/Makefile.am          |  2 +-
 tests/schematestutils.sh |  2 +-
 4 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index bceaeb2..300b9a5 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -77,21 +77,21 @@ REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
 LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
 QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
 
-remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
 		$(REMOTE_PROTOCOL)
-	$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
 	  --mode=server remote REMOTE $(REMOTE_PROTOCOL) \
 	  > $(srcdir)/remote_dispatch.h
 
-lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
 		$(LXC_PROTOCOL)
-	$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
 	  --mode=server lxc LXC $(LXC_PROTOCOL) \
 	  > $(srcdir)/lxc_dispatch.h
 
-qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
 		$(QEMU_PROTOCOL)
-	$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+	$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
 	  --mode=server qemu QEMU $(QEMU_PROTOCOL) \
 	  > $(srcdir)/qemu_dispatch.h
 
diff --git a/docs/Makefile.am b/docs/Makefile.am
index a497256..f43da93 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -199,10 +199,10 @@ todo:
 hvsupport.html:: $(srcdir)/hvsupport.html.in
 
 $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
-		$(srcdir)/../src/libvirt_public.syms \
-	$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
-	$(srcdir)/../src/driver.h
-	$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
+		$(top_srcdir)/src/libvirt_public.syms \
+	$(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
+	$(top_srcdir)/src/driver.h
+	$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
 		|| { rm $@ && exit 1; }
 
 .PHONY: todo
@@ -290,27 +290,27 @@ EXTRA_DIST += $(APIBUILD_STAMP)
 $(python_generated_files): $(APIBUILD_STAMP)
 
 $(APIBUILD_STAMP): $(srcdir)/apibuild.py \
-		$(srcdir)/../include/libvirt/libvirt.h.in \
-		$(srcdir)/../include/libvirt/libvirt-domain-snapshot.h \
-		$(srcdir)/../include/libvirt/libvirt-domain.h \
-		$(srcdir)/../include/libvirt/libvirt-event.h \
-		$(srcdir)/../include/libvirt/libvirt-host.h \
-		$(srcdir)/../include/libvirt/libvirt-interface.h \
-		$(srcdir)/../include/libvirt/libvirt-network.h \
-		$(srcdir)/../include/libvirt/libvirt-nodedev.h \
-		$(srcdir)/../include/libvirt/libvirt-nwfilter.h \
-		$(srcdir)/../include/libvirt/libvirt-secret.h \
-		$(srcdir)/../include/libvirt/libvirt-storage.h \
-		$(srcdir)/../include/libvirt/libvirt-stream.h \
-		$(srcdir)/../include/libvirt/libvirt-lxc.h \
-		$(srcdir)/../include/libvirt/libvirt-qemu.h \
-		$(srcdir)/../include/libvirt/virterror.h \
-		$(srcdir)/../src/libvirt.c \
-		$(srcdir)/../src/libvirt-lxc.c \
-		$(srcdir)/../src/libvirt-qemu.c \
-		$(srcdir)/../src/util/virerror.c \
-		$(srcdir)/../src/util/virevent.c \
-		$(srcdir)/../src/util/virtypedparam.c
+		$(top_srcdir)/include/libvirt/libvirt.h.in \
+		$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
+		$(top_srcdir)/include/libvirt/libvirt-domain.h \
+		$(top_srcdir)/include/libvirt/libvirt-event.h \
+		$(top_srcdir)/include/libvirt/libvirt-host.h \
+		$(top_srcdir)/include/libvirt/libvirt-interface.h \
+		$(top_srcdir)/include/libvirt/libvirt-network.h \
+		$(top_srcdir)/include/libvirt/libvirt-nodedev.h \
+		$(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
+		$(top_srcdir)/include/libvirt/libvirt-secret.h \
+		$(top_srcdir)/include/libvirt/libvirt-storage.h \
+		$(top_srcdir)/include/libvirt/libvirt-stream.h \
+		$(top_srcdir)/include/libvirt/libvirt-lxc.h \
+		$(top_srcdir)/include/libvirt/libvirt-qemu.h \
+		$(top_srcdir)/include/libvirt/virterror.h \
+		$(top_srcdir)/src/libvirt.c \
+		$(top_srcdir)/src/libvirt-lxc.c \
+		$(top_srcdir)/src/libvirt-qemu.c \
+		$(top_srcdir)/src/util/virerror.c \
+		$(top_srcdir)/src/util/virevent.c \
+		$(top_srcdir)/src/util/virtypedparam.c
 	$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
 	touch $@
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 33ee723..17cf318 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,7 +20,7 @@
 abs_builddir = $(shell pwd)
 abs_topbuilddir = $(shell cd .. && pwd)
 abs_srcdir = $(shell cd $(srcdir) && pwd)
-abs_topsrcdir = $(shell cd $(srcdir)/.. && pwd)
+abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
 
 # No libraries with the exception of LIBXML should be listed
 # here. List them against the individual XXX_la_CFLAGS targets
diff --git a/tests/schematestutils.sh b/tests/schematestutils.sh
index a0ff77e..e07e9b9 100644
--- a/tests/schematestutils.sh
+++ b/tests/schematestutils.sh
@@ -5,7 +5,7 @@
 check_schema () {
 
 DIRS=$1
-SCHEMA="$abs_srcdir/../docs/schemas/$2"
+SCHEMA="$abs_top_srcdir/docs/schemas/$2"
 
 test_intro $this_test
 
-- 
2.0.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]