diff options
Diffstat (limited to 'mk/gitignore.mk')
-rw-r--r-- | mk/gitignore.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mk/gitignore.mk b/mk/gitignore.mk new file mode 100644 index 00000000..34d3539e --- /dev/null +++ b/mk/gitignore.mk @@ -0,0 +1,15 @@ +# rules to make .gitignore files +# Copyright 2008 Roy Marples <roy@marples.name> + +IGNOREFILES+= ${CLEANFILES} + +.gitignore: + 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 + +gitignore: .gitignore |