From eba1e7cb9ee547e96cfee2fa8faf5de92c6be507 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 18 Mar 2021 06:40:28 -0400 Subject: build: Don't clean source files in in-tree build --- 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) -- cgit v0.9.1