summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--games/classic/local.mk7
3 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index ab12c71..1fed884 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,7 +63,7 @@ dodge_balls_LDADD = \
$(EXPAT_LIBS)
dodge_balls_LINK = $(LINK) version.c
EXTRA_dodge_balls_DEPENDENCIES = version.c $(DATA)
-CLEANFILES = version.c $(DATA)
+CLEANFILES = version.c
CONFIG_CLEAN_FILES =
EXTRA_DIST = autogen.sh
uninstall_dirs =
diff --git a/configure.ac b/configure.ac
index e43c092..9d0173c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,8 @@ AM_SILENT_RULES([yes])
AM_CONDITIONAL([IN_GIT],
[test -d "${srcdir}/.git" && command -v git >/dev/null 2>&1])
+AM_CONDITIONAL([OUT_OF_TREE], [test x"${srcdir}" != x'.' ])
+
save_CFLAGS="${CFLAGS-}"
AC_PROG_CC()
AM_PROG_CC_C_O()
diff --git a/games/classic/local.mk b/games/classic/local.mk
index 0cb0d63..f22e007 100644
--- a/games/classic/local.mk
+++ b/games/classic/local.mk
@@ -22,6 +22,13 @@ dist_noinst_DATA = \
nodist_games_classic_DATA = \
%reldir%/tileset.png
+CLEANFILES += \
+ $(nodist_games_classic_DATA)
+if OUT_OF_TREE
+CLEANFILES += \
+ $(dist_games_classic_DATA)
+endif
+
# 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)