summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 80c22556..b6e98487 100644
--- a/Makefile
+++ b/Makefile
@@ -57,7 +57,8 @@ EXTRA_OBJS-$(add_win_res) += win/txr.res
ifneq ($(have_git),)
SRCS := $(addprefix $(top_srcdir),\
$(filter-out lex.yy.c y.tab.c y.tab.h,\
- $(shell git --work-tree=$(top_srcdir) \
+ $(shell git $(if $(top_srcdir), \
+ --work-tree=$(top_srcdir)) \
--git-dir=$(top_srcdir).git \
ls-files "*.c" "*.h" "*.l" "*.y")))
endif