From 502f1bffc4a2b4cc6358770a563b03af7dc7f8b1 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 16 Mar 2021 05:36:14 -0400 Subject: build: Copy game data to build dir if out-of-tree --- diff --git a/Makefile.am b/Makefile.am index afe61ab..70c1db1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,7 +61,7 @@ dodge_balls_LDADD = \ $(ZLIB_LIBS) \ $(EXPAT_LIBS) dodge_balls_LINK = $(LINK) version.c -EXTRA_dodge_balls_DEPENDENCIES = version.c +EXTRA_dodge_balls_DEPENDENCIES = version.c $(DATA) CLEANFILES = version.c EXTRA_DIST = autogen.sh diff --git a/games/classic/local.mk b/games/classic/local.mk index 6ed0233..ee679fb 100644 --- a/games/classic/local.mk +++ b/games/classic/local.mk @@ -20,3 +20,11 @@ dist_noinst_DATA = \ nodist_games_classic_DATA = \ %reldir%/tileset.png + +# To run in place, the engine needs game data in the build directory, which may +# be different from the source directory. +$(dist_games_classic_DATA) $(dist_noinst_DATA): %reldir%/$(am__dirstamp) + $(AM_V_GEN)[ x"$(srcdir)" = x"$(builddir)" ] || cp "$(srcdir)/$@" "$@" +%reldir%/$(am__dirstamp): + @$(MKDIR_P) %reldir% + @: > %reldir%/$(am__dirstamp) -- cgit v0.9.1