From 10a9657db021a9ca3fb681238146a54361b33737 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 23 Apr 2015 21:33:30 +0100 Subject: [PATCH] build: Skip gitignore files when not building from git There's really no point in going through the motions there. --- build/autotools/Makefile.am.gitignore | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build/autotools/Makefile.am.gitignore b/build/autotools/Makefile.am.gitignore index b019a3ec3..ec3f3c796 100644 --- a/build/autotools/Makefile.am.gitignore +++ b/build/autotools/Makefile.am.gitignore @@ -6,13 +6,14 @@ GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA) .gitignore: Makefile.am - $(QUIET_GEN)( \ - echo "*.o" ; \ - echo ".gitignore" ; \ - ) > .gitignore ; \ - for p in $(GIT_IGNORE_FILES); do \ - echo "/$$p" >> .gitignore ; \ - done + $(QUIET_GEN)if test -d "$(top_srcdir)/.git"; then \ + ( echo "*.o" ; \ + echo ".gitignore" ; \ + ) > .gitignore ; \ + for p in $(GIT_IGNORE_FILES); do \ + echo "/$$p" >> .gitignore ; \ + done \ + fi gitignore: .gitignore