From b6d2e50352efd0efafecf8e0987788dc655c0df7 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 17 Jun 2014 23:51:19 +0200 Subject: [PATCH] Fix out-of-source builds When building something out-of-source, make's VPATH mechanism is used so that files in the source directory are also found. This makes make automatically check that other directory for needed files and use those when needed. However, make doesn't magically copy those files over. We have to explicitly use the file that make found. Do so by using $< for refering to shape_to_id.gperf instead of hardcoding the name of the source file. This fixes out-of-source git builds. Out-of-source release builds already worked before this, because releases come with a pre-generated shape_to_id.c. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=80153 Signed-off-by: Uli Schlachter --- cursor/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cursor/Makefile.am b/cursor/Makefile.am index 3e92189..1f54ae1 100644 --- a/cursor/Makefile.am +++ b/cursor/Makefile.am @@ -21,7 +21,7 @@ GPERFFLAGS = --includes --struct-type --language=ANSI-C --switch=1 CLEANFILES = shape_to_id.c shape_to_id.c: shape_to_id.gperf - $(AM_V_GEN)if $(GPERF) $(GPERFFLAGS) shape_to_id.gperf >$@t; then \ + $(AM_V_GEN)if $(GPERF) $(GPERFFLAGS) $< >$@t; then \ mv $@t $@; \ elif $(GPERF) --version >/dev/null 2>&1; then \ rm $@t; \ -- 2.0.0