build: Skip gitignore files when not building from git

There's really no point in going through the motions there.
This commit is contained in:
Emmanuele Bassi 2015-04-23 21:33:30 +01:00
parent a67997ef39
commit 10a9657db0

View File

@ -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