2008-03-03 18:34:08 +05:30
|
|
|
# rules to make .gitignore files
|
|
|
|
# Copyright 2008 Roy Marples <roy@marples.name>
|
|
|
|
|
|
|
|
IGNOREFILES+= ${CLEANFILES}
|
|
|
|
|
2008-03-03 18:44:54 +05:30
|
|
|
.PHONY: .gitignore
|
|
|
|
|
2008-03-03 18:34:08 +05:30
|
|
|
.gitignore:
|
2008-03-03 18:44:54 +05:30
|
|
|
@if test -n "${IGNOREFILES}"; then echo "Ignoring ${IGNOREFILES}"; fi
|
|
|
|
@for obj in ${IGNOREFILES}; do \
|
2008-03-03 18:34:08 +05:30
|
|
|
if ! test -r .gitignore; then \
|
|
|
|
echo "$${obj}" > .gitignore || exit $$?; \
|
|
|
|
elif ! grep -q "^$${obj}$$" .gitignore; then \
|
|
|
|
echo "$${obj}" >> .gitignore || exit $$?; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
gitignore: .gitignore
|