# This is the only way with automake I know of to force 'check-git-hooks'
# to be evaluated before 'all'. If there is a nicer way, I'm all ears...
-BUILT_SOURCES = check-git-hooks
+BUILT_SOURCES = install-git-hooks
###################################
# git hook management
case $$hook in \
*.sample|*~|*.swp) continue;; \
esac; \
- if test -x $$hook; then \
+ if test -x $$hook -a \
+ ! -x .git/hooks/$${hook##*/}; then \
echo "Installing git hook $${hook##*/}..."; \
cp $$hook .git/hooks; \
chmod a+x .git/hooks/$${hook##*/}; \