Fix ignore files some more.

This commit is contained in:
Roy Marples
2008-03-03 13:31:25 +00:00
parent 35929e23bb
commit b614477948
7 changed files with 18 additions and 10 deletions

View File

@@ -6,13 +6,9 @@ IGNOREFILES+= ${CLEANFILES}
.PHONY: .gitignore
.gitignore:
@if test -n "${IGNOREFILES}"; then echo "Ignoring ${IGNOREFILES}"; fi
@for obj in ${IGNOREFILES}; do \
if ! test -r .gitignore; then \
echo "$${obj}" > .gitignore || exit $$?; \
elif ! grep -q "^$${obj}$$" .gitignore; then \
echo "$${obj}" >> .gitignore || exit $$?; \
fi; \
done
@if test -n "${IGNOREFILES}"; then \
echo "Ignoring ${IGNOREFILES}"; \
echo ${IGNOREFILES} | tr ' ' '\n' > .gitignore; \
fi
gitignore: .gitignore