]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Cleanup srcdir usage
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 27 Apr 2015 09:08:59 +0000 (11:08 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 27 Apr 2015 14:03:31 +0000 (16:03 +0200)
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@redhat.com>
daemon/Makefile.am
docs/Makefile.am
src/Makefile.am
tests/schematestutils.sh

index bceaeb272c88d632439efa7dc8d6a08f91a5d03e..300b9a5674b9e1f1a8f7c0c21f3803883158cdfe 100644 (file)
@@ -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
 
index a497256307b714a2e274cea4421dc465b1d58036..f43da930103075d51441d1405d53385e0524be24 100644 (file)
@@ -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 $@
 
index 33ee7233e14cfb93339de36e7910f9abf2538182..17cf318804a3527ebb821ce2f9a6959967c49646 100644 (file)
@@ -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
index a0ff77e8aa68c37d323c67127aea3fdd672cf410..e07e9b931d5ad8eb857ab6901707006799ca7487 100644 (file)
@@ -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