1# this file should only be used in directories that generate test
2# or example binaries through noinst_PROGRAMS; it is *not* a full
3# generator of Git ignore files, and it's not meant to be used as
4# the top-level Git ignore file generator.
5
6GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA)
7
8.gitignore: Makefile.am
9	$(QUIET_GEN)if test -d "$(top_srcdir)/.git"; then \
10		( echo "*.o" ; \
11		  echo ".gitignore" ; \
12		) > .gitignore ; \
13		for p in $(GIT_IGNORE_FILES); do \
14			echo "/$$p" >> .gitignore ; \
15		done \
16	fi
17
18gitignore: .gitignore
19
20gitignore-clean:
21	$(QUIET_RM)rm -f .gitignore
22
23.PHONY: gitignore gitignore-clean
24
25all-am: gitignore
26
27maintainer-clean: gitignore-clean
28