diff mbox

[RFC,kvm-unit-tests,3/8] Makefile: set VPATH based on SRCDIR

Message ID 20170406190727.5624-4-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Bennée April 6, 2017, 7:07 p.m. UTC
Setting the VPATH prompts make to search VPATH for source files. There
are still some fix-ups needed for linking and including other Makefile
fragments for each architecture.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Jones April 7, 2017, 11:56 a.m. UTC | #1
On Thu, Apr 06, 2017 at 08:07:22PM +0100, Alex Bennée wrote:
> Setting the VPATH prompts make to search VPATH for source files. There
> are still some fix-ups needed for linking and including other Makefile
> fragments for each architecture.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  Makefile | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index eba7b28..80bc57e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -7,6 +7,9 @@ endif
>  
>  include config.mak
>  
> +# Set search path for all sources
> +VPATH=$(SRCDIR)

nit: prefer spaces around the =

> +
>  libdirs-get = $(shell [ -d "lib/$(1)" ] && echo "lib/$(1) lib/$(1)/asm")
>  ARCH_LIBDIRS := $(call libdirs-get,$(ARCH)) $(call libdirs-get,$(TEST_DIR))
>  
> -- 
> 2.11.0
> 

Reviewed-by: Andrew Jones <drjones@redhat.com>
diff mbox

Patch

diff --git a/Makefile b/Makefile
index eba7b28..80bc57e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@  endif
 
 include config.mak
 
+# Set search path for all sources
+VPATH=$(SRCDIR)
+
 libdirs-get = $(shell [ -d "lib/$(1)" ] && echo "lib/$(1) lib/$(1)/asm")
 ARCH_LIBDIRS := $(call libdirs-get,$(ARCH)) $(call libdirs-get,$(TEST_DIR))