From 724803e7a21065d70524aef87c8af96e3d756fa6 Mon Sep 17 00:00:00 2001
From: Manuel Bachmann <manuel.bachmann@iot.bzh>
Date: Mon, 26 Oct 2015 02:44:08 +0100
Subject: [PATCH] build: support out-of-tree compilation for id3 plugin

Some build systems, such as Yocto, use a separate directory
to output compilation results.

Creating an id3 source file with gawk using given syntax
will then fail, because the output directory is invalid.
Even if it was, there is a risk for the rest of the process
to fail if it looks for the generated file inside the
source tree instead of the build tree.

Thus, fix this by forcing creation inside the source tree.

Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
---
 src/plugins/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 956ec8f..e473fbf 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -93,7 +93,7 @@ pkg_LTLIBRARIES += id3/id3.la
 id3_id3_la_SOURCES = id3/id3.c id3/id3v1_genres.c
 id3_id3_la_LIBADD = $(PLUGINS_LIBADD)
 
-id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk
+$(srcdir)/id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk
 	$(AWK) -f $(srcdir)/id3/id3v1_genres_gen.awk $(srcdir)/id3/id3v1_genres.def > $@
 
 EXTRA_DIST += id3/id3v1_genres.def id3/id3v1_genres_gen.awk