diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-03-16 05:36:14 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-03-16 05:36:14 (EDT) |
commit | 502f1bffc4a2b4cc6358770a563b03af7dc7f8b1 (patch) | |
tree | 7e70287af869ed39f9dec377ac6c3acbd459cebd | |
parent | da5c591b2a18d5197507c0dc137d98f86a3437d3 (diff) | |
download | dodge-balls-502f1bffc4a2b4cc6358770a563b03af7dc7f8b1.zip dodge-balls-502f1bffc4a2b4cc6358770a563b03af7dc7f8b1.tar.gz dodge-balls-502f1bffc4a2b4cc6358770a563b03af7dc7f8b1.tar.bz2 |
build: Copy game data to build dir if out-of-tree
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | games/classic/local.mk | 8 |
2 files changed, 9 insertions, 1 deletions
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) |