Add make bits to autogenerate ChangeLog

This commit is contained in:
Behdad Esfahbod 2006-03-15 10:59:59 -05:00
parent d415ea9b60
commit 393000021c
2 changed files with 40 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
ChangeLog
Makefile
Makefile.in
aclocal.m4

View file

@ -11,6 +11,21 @@ EXTRA_DIST = \
COPYING-LGPL-2.1 \
COPYING-MPL-1.1 \
cairo.pc.in
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
`find "$(srcdir)" -type f -name Makefile.in -print`
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cairo.pc
@ -20,6 +35,30 @@ check-valgrind: all
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
# Creating ChangeLog from git log:
MAINTAINERCLEANFILES += ChangeLog
EXTRA_DIST += ChangeLog
ChangeLog: $(srcdir)/ChangeLog
$(srcdir)/ChangeLog:
@if test -d "$(srcdir)/.git"; then \
(cd "$(srcdir)" && \
./missing --run git-log) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
.PHONY: ChangeLog $(srcdir)/ChangeLog
# Some custom targets to make it easier to release things.
# Use either:
# make release-check