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

View File

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