aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/gitignore.mk12
1 files changed, 4 insertions, 8 deletions
diff --git a/mk/gitignore.mk b/mk/gitignore.mk
index fca262be..09139b0e 100644
--- a/mk/gitignore.mk
+++ b/mk/gitignore.mk
@@ -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