build: Create .gitignore files in the current directory

We cannot touch srcdir when distchecking.
This commit is contained in:
Emmanuele Bassi 2015-04-23 21:23:50 +01:00
parent f8687f9430
commit a67997ef39

View File

@ -5,19 +5,19 @@
GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA) GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA)
$(srcdir)/.gitignore: Makefile.am .gitignore: Makefile.am
$(QUIET_GEN)( \ $(QUIET_GEN)( \
echo "*.o" ; \ echo "*.o" ; \
echo ".gitignore" ; \ echo ".gitignore" ; \
) > $(srcdir)/.gitignore ; \ ) > .gitignore ; \
for p in $(GIT_IGNORE_FILES); do \ for p in $(GIT_IGNORE_FILES); do \
echo "/$$p" >> $(srcdir)/.gitignore ; \ echo "/$$p" >> .gitignore ; \
done done
gitignore: $(srcdir)/.gitignore gitignore: .gitignore
gitignore-clean: gitignore-clean:
$(QUIET_RM)rm -f $(srcdir)/.gitignore $(QUIET_RM)rm -f .gitignore
.PHONY: gitignore gitignore-clean .PHONY: gitignore gitignore-clean