mutter/Makefile.am
Emmanuele Bassi cf80105ab0 [build] Add automatic ChangeLog generation on dist
Since we moved to Git from Subversion we've abandoned the ChangeLog
file in favour of a more detailed commit log.

In order to maintain a ChangeLog for users of the tarballs, we need
to generate a ChangeLog file out of the commit log when distchecking
a Clutter release.

For this reason, we use a simple Perl script that is invoked by the
dist-hook and generates a ChangeLog file starting from the previous
stable release.
2009-01-29 15:38:28 +00:00

90 lines
1.9 KiB
Makefile

NULL =
SUBDIRS = clutter tests po
if BUILD_GTK_DOC
SUBDIRS += doc
endif
DIST_SUBDIRS = clutter tests doc po
pcfiles = \
clutter-$(CLUTTER_API_VERSION).pc \
clutter-$(CLUTTER_FLAVOUR)-$(CLUTTER_API_VERSION).pc \
$(NULL)
# clutter-<major>.<minor>.pc - for generic dependencies
clutter-$(CLUTTER_API_VERSION).pc: clutter.pc
@cp $< $@
# clutter-<flavour>-<major>.<minor>.pc - for backend-specific dependencies
clutter-$(CLUTTER_FLAVOUR)-$(CLUTTER_API_VERSION).pc: clutter.pc
@cp $< $@
.PHONY: test-report full-report
test-report full-report:
$(MAKE) -C tests/conform $(@)
pkgconfig_DATA = $(pcfiles)
pkgconfigdir = $(libdir)/pkgconfig
DEFAULT_FLAVOUR = @CLUTTER_FLAVOUR@
EXTRA_DIST = \
ChangeLog.SVN \
clutter.pc.in \
HACKING \
HACKING.backends \
CODING_STYLE
CLEANFILES = $(pcfiles)
DISTCLEANFILES =
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags
# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = \
aclocal.m4 \
compile \
config.guess \
config.h.in \
config.sub \
configure \
depcomp \
gtk-doc.make \
install-sh \
ltmain.sh \
Makefile.in \
missing \
$(NULL)
PREV_RELEASE=$(CLUTTER_MAJOR_VERSION).$$(echo "$(CLUTTER_MINOR_VERSION)-1" | bc)
CHANGELOGS = ChangeLog
changelogs:
@$(MAKE) $(AM_MAKEFLAGS) $(CHANGELOGS)
dist-hook: changelogs
changelogs="$(CHANGELOGS)"; \
for changelog in $$changelogs; \
do \
cp $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
cp $$changelog $(distdir)/; \
done
$(srcdir)/ChangeLog:
@if test -d "$(top_srcdir)/.git"; \
then \
to=""; \
from="$(PREV_RELEASE)"; \
echo Creating $@ && \
( echo '# Generated by configure. Do no edit.'; echo; \
$(top_srcdir)/missing --run perl $(top_srcdir)/build/gen-changelog.pl $$from.0..$$to ) > $@ ; \
else \
echo A git checkout is required to generate $@; \
fi
.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog