Use vpath directive

The vpath directive has two advantages over the VPATH variable:
1) it allows to skip searching of .o files; 2) the default semantics
are to append to the vpath, so there is no confusion between "VPATH=xyz"
and "VPATH+=xyz".

Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper
macro to append one or more directories to the vpath.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Paolo Bonzini 2009-12-21 10:06:55 +01:00 committed by Anthony Liguori
parent e726fe7d60
commit 076d247142
7 changed files with 16 additions and 13 deletions

View file

@ -1,5 +1,6 @@
-include ../config-host.mak
VPATH=$(SRC_PATH)/tests
$(call set-vpath, $(SRC_PATH)/tests)
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
#CFLAGS+=-msse2