build: Fix up gitignore generation rules

Use more sources, and allow adding files to the ignore list when
including Makefile.am.gitignore.
This commit is contained in:
Emmanuele Bassi 2015-01-01 19:39:33 +00:00
parent 8d6cab0e71
commit 7bfd62f755
1 changed files with 3 additions and 1 deletions

View File

@ -3,12 +3,14 @@
# generator of Git ignore files, and it's not meant to be used as
# the top-level Git ignore file generator.
GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA)
$(srcdir)/.gitignore: Makefile.am
$(QUIET_GEN)( \
echo "*.o" ; \
echo ".gitignore" ; \
) > $(srcdir)/.gitignore ; \
for p in $(noinst_PROGRAMS); do \
for p in $(GIT_IGNORE_FILES); do \
echo "/$$p" >> $(srcdir)/.gitignore ; \
done