- y="$$(echo "$@" | sed -e 's,ChangeLog-,,')" ; \
- git-log \
- --since="$$y-01-01" \
- --until="$$y-12-31 23:00:00 -0100" \
- > "$@"
+ if test -d "$(top_srcdir)/.git"; then \
+ y="$@"; y="$${y##ChangeLog-}" ; \
+ git --git-dir="$(top_srcdir)/.git" log \
+ --since="$$y-01-01" \
+ --until="$$y-12-31 23:00:00 -0100" \
+ > "$@" ; \
+ fi
+
+# This one needs to be rebuilt all the time :)
+.PHONY: ChangeLog-2010 changelogs doc
+
+changelogs: $(CHANGELOGS)