Patchwork [32/39] rename SRC_PATH to srcdir

login
register
mail settings
Submitter Paolo Bonzini
Date Oct. 12, 2010, 1 p.m.
Message ID <1286888457-5033-33-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/67580/
State New
Headers show

Comments

Paolo Bonzini - Oct. 12, 2010, 1 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile                   |   52 ++++++++++++++++++++++----------------------
 Makefile.dis               |    6 ++--
 Makefile.hw                |    8 +++---
 Makefile.objs              |    4 +-
 Makefile.target            |   32 +++++++++++++-------------
 Makefile.user              |    6 ++--
 configure                  |   22 +++++++++---------
 pc-bios/optionrom/Makefile |    8 +++---
 rules.mak                  |    2 +-
 tests/Makefile             |    2 +-
 tests/cris/Makefile        |    6 ++--
 11 files changed, 74 insertions(+), 74 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 34c2a6c..2d55512 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,8 @@  ifneq ($(wildcard config-host.mak),)
 # Put the all: rule here so that config-host.mak can contain dependencies.
 all: build-all
 include config-host.mak
-include $(SRC_PATH)/rules.mak
-config-host.mak: $(SRC_PATH)/configure
+include $(srcdir)/rules.mak
+config-host.mak: $(srcdir)/configure
 	@echo $@ is out-of-date, running configure
 	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 else
@@ -24,7 +24,7 @@  configure: ;
 .PHONY: all clean cscope distclean dvi html info install install-doc \
 	pdf recurse-all speed tar tarbin test build-all
 
-$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
+$(call set-vpath, $(srcdir):$(srcdir)/hw)
 
 LIBS+=-lz $(LIBS_TOOLS)
 
@@ -78,7 +78,7 @@  subdir-%: $(GENERATED_HEADERS)
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
 
 ifneq ($(wildcard config-host.mak),)
-include $(SRC_PATH)/Makefile.objs
+include $(srcdir)/Makefile.objs
 endif
 
 $(common-obj-y): $(GENERATED_HEADERS)
@@ -107,20 +107,20 @@  ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
 trace.h: trace.h-timestamp
-trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
-	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
+trace.h-timestamp: $(srcdir)/trace-events config-host.mak
+	$(call quiet-command,sh $(srcdir)/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
 	@cmp -s $@ trace.h || cp $@ trace.h
 
 trace.c: trace.c-timestamp
-trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
-	$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
+trace.c-timestamp: $(srcdir)/trace-events config-host.mak
+	$(call quiet-command,sh $(srcdir)/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
 	@cmp -s $@ trace.c || cp $@ trace.c
 
 trace.o: trace.c $(GENERATED_HEADERS)
 
 simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
 
-version.o: $(SRC_PATH)/version.rc config-host.mak
+version.o: $(srcdir)/version.rc config-host.mak
 	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
 
 version-obj-$(CONFIG_WIN32) += version.o
@@ -135,8 +135,8 @@  qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(trace-obj-y) $(block-ob
 
 qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y)
 
-qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $@")
+qemu-img-cmds.h: $(srcdir)/qemu-img-cmds.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -h < $< > $@,"  GEN   $@")
 
 check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o: $(GENERATED_HEADERS)
 
@@ -201,7 +201,7 @@  endif
 
 install-sysconfig:
 	$(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
-	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
+	$(INSTALL_DATA) $(srcdir)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
 
 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
@@ -211,12 +211,12 @@  endif
 ifneq ($(BLOBS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
 	set -e; for x in $(BLOBS); do \
-		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+		$(INSTALL_DATA) $(srcdir)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
 	done
 endif
 	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
-		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+		$(INSTALL_DATA) $(srcdir)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
 	done
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) -C $$d $@ || exit 1 ; \
@@ -228,7 +228,7 @@  test speed: all
 
 .PHONY: TAGS
 TAGS:
-	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
+	find "$(srcdir)" -name '*.[hc]' -print0 | xargs -0 etags
 
 cscope:
 	rm -f ./cscope.*
@@ -252,33 +252,33 @@  TEXIFLAG=$(if $(V),,--quiet)
 %.pdf: %.texi
 	$(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<,"  GEN   $@")
 
-qemu-options.texi: $(SRC_PATH)/qemu-options.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
+qemu-options.texi: $(srcdir)/qemu-options.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -t < $< > $@,"  GEN   $@")
 
-qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
+qemu-monitor.texi: $(srcdir)/hmp-commands.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -t < $< > $@,"  GEN   $@")
 
-QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -q < $< > $@,"  GEN   $@")
+QMP/qmp-commands.txt: $(srcdir)/qmp-commands.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -q < $< > $@,"  GEN   $@")
 
-qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@,"  GEN   $@")
+qemu-img-cmds.texi: $(srcdir)/qemu-img-cmds.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -t < $< > $@,"  GEN   $@")
 
 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
 	$(call quiet-command, \
-	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
+	  perl -Ww -- $(srcdir)/texi2pod.pl $< qemu.pod && \
 	  pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
 	  "  GEN   $@")
 
 qemu-img.1: qemu-img.texi qemu-img-cmds.texi
 	$(call quiet-command, \
-	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
+	  perl -Ww -- $(srcdir)/texi2pod.pl $< qemu-img.pod && \
 	  pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
 	  "  GEN   $@")
 
 qemu-nbd.8: qemu-nbd.texi
 	$(call quiet-command, \
-	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
+	  perl -Ww -- $(srcdir)/texi2pod.pl $< qemu-nbd.pod && \
 	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
 	  "  GEN   $@")
 
diff --git a/Makefile.dis b/Makefile.dis
index 3e1fcaf..e80f5de 100644
--- a/Makefile.dis
+++ b/Makefile.dis
@@ -2,15 +2,15 @@ 
 
 include ../config-host.mak
 include config.mak
-include $(SRC_PATH)/rules.mak
+include $(srcdir)/rules.mak
 
 .PHONY: all
 
-$(call set-vpath, $(SRC_PATH))
+$(call set-vpath, $(srcdir))
 
 QEMU_CFLAGS+=-I..
 
-include $(SRC_PATH)/Makefile.objs
+include $(srcdir)/Makefile.objs
 
 all: $(libdis-y)
 # Dummy command so that make thinks it has done something
diff --git a/Makefile.hw b/Makefile.hw
index b9181ab..79186b4 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -3,15 +3,15 @@ 
 include ../config-host.mak
 include ../config-all-devices.mak
 include config.mak
-include $(SRC_PATH)/rules.mak
+include $(srcdir)/rules.mak
 
 .PHONY: all
 
-$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
+$(call set-vpath, $(srcdir):$(srcdir)/hw)
 
-QEMU_CFLAGS+=-I.. -I$(SRC_PATH)/fpu
+QEMU_CFLAGS+=-I.. -I$(srcdir)/fpu
 
-include $(SRC_PATH)/Makefile.objs
+include $(srcdir)/Makefile.objs
 
 all: $(hw-obj-y)
 # Dummy command so that make thinks it has done something
diff --git a/Makefile.objs b/Makefile.objs
index 816194a..9daec30 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -286,6 +286,6 @@  vl.o: qemu-options.def
 os-posix.o: qemu-options.def
 os-win32.o: qemu-options.def
 
-qemu-options.def: $(SRC_PATH)/qemu-options.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
+qemu-options.def: $(srcdir)/qemu-options.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
diff --git a/Makefile.target b/Makefile.target
index c48cbcc..43cf31c 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -6,16 +6,16 @@  CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
 include ../config-host.mak
 include config-devices.mak
 include config-target.mak
-include $(SRC_PATH)/rules.mak
+include $(srcdir)/rules.mak
 ifneq ($(HWDIR),)
 include $(HWDIR)/config.mak
 endif
 
-TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
-$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
+TARGET_PATH=$(srcdir)/target-$(TARGET_BASE_ARCH)
+$(call set-vpath, $(srcdir):$(TARGET_PATH):$(srcdir)/hw)
 QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H
 
-include $(SRC_PATH)/Makefile.objs
+include $(srcdir)/Makefile.objs
 
 ifdef CONFIG_USER_ONLY
 # user emulator name
@@ -83,9 +83,9 @@  signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
 
 ifdef CONFIG_LINUX_USER
 
-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
+$(call set-vpath, $(srcdir)/linux-user:$(srcdir)/linux-user/$(TARGET_ABI_DIR))
 
-QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
+QEMU_CFLAGS+=-I$(srcdir)/linux-user -I$(srcdir)/linux-user/$(TARGET_ABI_DIR)
 obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
       elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
       qemu-malloc.o
@@ -116,9 +116,9 @@  endif #CONFIG_LINUX_USER
 
 ifdef CONFIG_DARWIN_USER
 
-$(call set-vpath, $(SRC_PATH)/darwin-user)
+$(call set-vpath, $(srcdir)/darwin-user)
 
-QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
+QEMU_CFLAGS+=-I$(srcdir)/darwin-user -I$(srcdir)/darwin-user/$(TARGET_ARCH)
 
 # Leave some space for the regular program loading zone
 LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
@@ -143,9 +143,9 @@  endif #CONFIG_DARWIN_USER
 
 ifdef CONFIG_BSD_USER
 
-$(call set-vpath, $(SRC_PATH)/bsd-user)
+$(call set-vpath, $(srcdir)/bsd-user)
 
-QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
+QEMU_CFLAGS+=-I$(srcdir)/bsd-user -I$(srcdir)/bsd-user/$(TARGET_ARCH)
 
 obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
         gdbstub.o uaccess.o
@@ -327,14 +327,14 @@  $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
 	$(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
 
 
-gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh
-	$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   $(TARGET_DIR)$@")
+gdbstub-xml.c: $(TARGET_XML_FILES) $(srcdir)/feature_to_c.sh
+	$(call quiet-command,rm -f $@ && $(SHELL) $(srcdir)/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   $(TARGET_DIR)$@")
 
-hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
+hmp-commands.h: $(srcdir)/hmp-commands.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
-qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
-	$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
+qmp-commands.h: $(srcdir)/qmp-commands.hx
+	$(call quiet-command,sh $(srcdir)/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
diff --git a/Makefile.user b/Makefile.user
index 024b773..6ef3cc8 100644
--- a/Makefile.user
+++ b/Makefile.user
@@ -1,16 +1,16 @@ 
 # Makefile for qemu target independent user files.
 
 include ../config-host.mak
-include $(SRC_PATH)/rules.mak
+include $(srcdir)/rules.mak
 -include config.mak
 
 .PHONY: all
 
-$(call set-vpath, $(SRC_PATH))
+$(call set-vpath, $(srcdir))
 
 QEMU_CFLAGS+=-I..
 
-include $(SRC_PATH)/Makefile.objs
+include $(srcdir)/Makefile.objs
 
 all: $(user-obj-y)
 # Dummy command so that make thinks it has done something
diff --git a/configure b/configure
index 44b5be9..432bd3b 100755
--- a/configure
+++ b/configure
@@ -236,7 +236,7 @@  QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes $
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
-QEMU_CPPFLAGS="-I. -I\$(SRC_PATH)"
+QEMU_CPPFLAGS="-I. -I\$(srcdir)"
 
 if test "$debug" = "no" ; then
   : ${CFLAGS='-O2 -g'}
@@ -2464,7 +2464,7 @@  if test $profiler = "yes" ; then
 fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
-  QEMU_CPPFLAGS="-I\$(SRC_PATH)/slirp $QEMU_CPPFLAGS"
+  QEMU_CPPFLAGS="-I\$(srcdir)/slirp $QEMU_CPPFLAGS"
 fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
@@ -2520,7 +2520,7 @@  fi
 qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_host_mak
 echo "PKGVERSION=$pkgversion" >>$config_host_mak
-echo "SRC_PATH=$source_path" >> $config_host_mak
+echo "srcdir=$source_path" >> $config_host_mak
 echo "TARGET_DIRS=$target_list" >> $config_host_mak
 if [ "$docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
@@ -2994,16 +2994,16 @@  cppflags=""
 ldflags=""
 
 if test "$ARCH" = "sparc64" ; then
-  cppflags="-I\$(SRC_PATH)/tcg/sparc $cppflags"
+  cppflags="-I\$(srcdir)/tcg/sparc $cppflags"
 elif test "$ARCH" = "s390x" ; then
-  cppflags="-I\$(SRC_PATH)/tcg/s390 $cppflags"
+  cppflags="-I\$(srcdir)/tcg/s390 $cppflags"
 elif test "$ARCH" = "x86_64" ; then
-  cppflags="-I\$(SRC_PATH)/tcg/i386 $cppflags"
+  cppflags="-I\$(srcdir)/tcg/i386 $cppflags"
 else
-  cppflags="-I\$(SRC_PATH)/tcg/\$(ARCH) $cppflags"
+  cppflags="-I\$(srcdir)/tcg/\$(ARCH) $cppflags"
 fi
-cppflags="-I\$(SRC_PATH)/tcg $cppflags"
-cppflags="-I\$(SRC_PATH)/fpu $cppflags"
+cppflags="-I\$(srcdir)/tcg $cppflags"
+cppflags="-I\$(srcdir)/fpu $cppflags"
 
 if test "$target_user_only" = "yes" ; then
     libdis_config_mak=libdis-user/config.mak
@@ -3110,7 +3110,7 @@  if test "$gprof" = "yes" ; then
   fi
 fi
 
-linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld"
+linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(srcdir)/\$(ARCH).ld"
 if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
   case "$ARCH" in
   sparc)
@@ -3159,7 +3159,7 @@  fi
 for rom in seabios vgabios ; do
     config_mak=roms/$rom/config.mak
     echo "# Automatically generated by configure - do not modify" > $config_mak
-    echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
+    echo "srcdir=$source_path/roms/$rom" >> $config_mak
     echo "CC=$cc" >> $config_mak
     echo "BCC=bcc" >> $config_mak
     echo "CPP=$cpp" >> $config_mak
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index b4be31e..8cd1230 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -3,14 +3,14 @@  all: build-all
 	@true
 
 include ../../config-host.mak
-include $(SRC_PATH)/rules.mak
+include $(srcdir)/rules.mak
 
-$(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
+$(call set-vpath, $(srcdir)/pc-bios/optionrom)
 
 .PHONY : all clean build-all
 
 CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
-CFLAGS += -I$(SRC_PATH)
+CFLAGS += -I$(srcdir)
 CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
 QEMU_CFLAGS = $(CFLAGS)
 
@@ -23,7 +23,7 @@  build-all: multiboot.bin linuxboot.bin
 	$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"  Building $(TARGET_DIR)$@")
 
 %.bin: %.raw
-	$(call quiet-command,$(SHELL) $(SRC_PATH)/pc-bios/optionrom/signrom.sh $< $@,"  Signing $(TARGET_DIR)$@")
+	$(call quiet-command,$(SHELL) $(srcdir)/pc-bios/optionrom/signrom.sh $< $@,"  Signing $(TARGET_DIR)$@")
 
 clean:
 	rm -f *.o *.d *.raw *.img *.bin *~
diff --git a/rules.mak b/rules.mak
index b4b7e16..ebb27c8 100644
--- a/rules.mak
+++ b/rules.mak
@@ -48,7 +48,7 @@  set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN)
 	@test -f $@ || cp $< $@
 
 %.h-timestamp: %.mak
-	$(call quiet-command, sh $(SRC_PATH)/create_config < $< > $@, "  GEN   $*.h")
+	$(call quiet-command, sh $(srcdir)/create_config < $< > $@, "  GEN   $*.h")
 	@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
 
 # will delete the target of a rule if commands exit with a nonzero exit status
diff --git a/tests/Makefile b/tests/Makefile
index a789e2d..58879e9 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,6 +1,6 @@ 
 -include ../config-host.mak
 
-$(call set-vpath, $(SRC_PATH)/tests)
+$(call set-vpath, $(srcdir)/tests)
 
 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
 #CFLAGS+=-msse2
diff --git a/tests/cris/Makefile b/tests/cris/Makefile
index b86bcad..95fcb68 100644
--- a/tests/cris/Makefile
+++ b/tests/cris/Makefile
@@ -14,7 +14,7 @@  OBJCOPY = $(CROSS)objcopy
 # we rely on GCC inline:ing the stuff we tell it to in many places here.
 CFLAGS  = -Winline -Wall -g -O2 -static
 NOSTDFLAGS = -nostartfiles -nostdlib
-ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/
+ASFLAGS += -g -Wa,-I,$(srcdir)/tests/cris/
 LDLIBS  =
 NOSTDLIBS = -lgcc
 
@@ -124,10 +124,10 @@  TESTCASES += check_gcctorture_pr28634-1.ctst
 
 all: build
 
-%.o: $(SRC_PATH)/tests/cris/%.c
+%.o: $(srcdir)/tests/cris/%.c
 	$(CC) $(CFLAGS) -c $< -o $@
 
-%.o: $(SRC_PATH)/tests/cris/%.s
+%.o: $(srcdir)/tests/cris/%.s
 	$(AS) $(ASFLAGS) -c $< -o $@
 
 %.tst: %.o