1
0
Fork 0

dist: Don't use elaborate script to gen Changelogs

The changelog generation scripts used for releases are overly elaborate
and fragile. A Changelog is also no substitute for the Git log so now we
simply ship a static Changelog that points to the Git log instead.
This commit is contained in:
Robert Bragg 2011-07-20 11:32:38 +01:00
parent 278952fcd9
commit fcb8de2cde
5 changed files with 22 additions and 92 deletions

1
.gitignore vendored
View file

@ -16,7 +16,6 @@ compile
README
stamp-enum-types
stamp-marshal
/ChangeLog*
/build/autotools/*.m4
!/build/autotools/introspection.m4
!/build/autotools/as-linguas.m4

20
ChangeLog Normal file
View file

@ -0,0 +1,20 @@
Cogl does not distribute a static Changelog with releases because we feel that
the Git log does a better job of tracking all the detailed source code changes
that are made to Cogl.
If you just want a high level overview of what has changed between Cogl
releases then please see the NEWS file that we distribute.
You can clone Cogl via Git using:
$ git clone git://git.gnome.org/cogl.git
You can see the log using:
$ git log
Or you can look at the log for a particular release by specifying
a release tag name like:
$ git log 1.7.2

View file

@ -18,6 +18,4 @@ DISTCLEANFILES=
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags --enable-profile
# .release requires .changelog rules
include $(top_srcdir)/build/autotools/Makefile.am.changelog
include $(top_srcdir)/build/autotools/Makefile.am.release

View file

@ -1,78 +0,0 @@
# Taken from Cairo - build/Makefile.am.changelog
# Modified to fit the Cogl build environment
CURR_CHANGELOG_VERSION=1.$$(echo "($(COGL_1_MINOR_VERSION)+1)/2*2" | bc)
# examines $version
PREV_CHANGELOG_VERSION=$$(if test "x$$(echo "($$version-0.1)*2/2"|bc)" = "x$$(echo "$$version*2/2"|bc)"; \
then echo "$$version-$$(echo "$$version" | sed 's/[0-9]/0/g;s/[0-9]$$/2/')"; \
else echo "$$version-1.0"; \
fi | bc | sed 's/[.]0*/./;s/^0[.]\?$$/initial/;s/[.]$$/.0/')
CHANGELOGS = ChangeLog \
`version=$(CURR_CHANGELOG_VERSION); \
version=$(PREV_CHANGELOG_VERSION); \
while test "x$$version" != xinitial; do \
echo ChangeLog.pre-$$version; \
version=$(PREV_CHANGELOG_VERSION); \
done`
CLEANFILES += $(srcdir)/ChangeLog.cache-*
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 "$(srcdir)/.git"; then \
version=$(CURR_CHANGELOG_VERSION); \
prev=$(PREV_CHANGELOG_VERSION).0; \
nearest_tag=`git describe | sed 's/-.*//'`; \
before=$(srcdir)/ChangeLog.cache-$$prev..$$nearest_tag; \
after=$(srcdir)/ChangeLog.cache-$$nearest_tag..; \
$(MAKE) $(AM_MAKEFLAGS) $$before $$after && \
echo Creating $@ && \
{ echo '# Generated by configure. Do not edit.'; echo; \
cat $$after; echo; cat $$before; } > $@; \
else \
test -f $@ || \
(echo A git checkout is required to generate $@ >&2 && \
echo A git checkout is required to generate this file >> $@); \
fi
DISTCLEANFILES += ChangeLog.cache-*
ChangeLog.cache-*..: .git
ChangeLog%: $(srcdir)/ChangeLog%
$(srcdir)/ChangeLog.cache-% $(srcdir)/ChangeLog.pre-%:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(cd "$(srcdir)" && \
version=$$(echo "$@" | sed 's/.*ChangeLog\([.].*-\)\?//'); \
if echo "$@" | grep -q '^ChangeLog[.]cache'; then \
spec=$$version; \
else \
to=$$version; \
test "x$$version" = x && version=$(CURR_CHANGELOG_VERSION); \
from=$(PREV_CHANGELOG_VERSION); \
test "x$$to" = x || to=$$to.0; \
test "x$$from" = xinitial || from=$$from.0; \
spec=$$from..$$to; \
fi; \
echo "spec=$$spec"; \
$(top_srcdir)/build/missing --run git log --stat "$$spec") > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate $@, your $@ may be outdated >&2); \
else \
echo A git checkout is required to generate $@ >&2; \
fi
.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog

View file

@ -37,7 +37,7 @@ release-tag:
fi \
fi
release-check: release-verify-even-micro release-verify-sane-changelogs release-verify-news
release-check: release-verify-even-micro release-verify-news
TAR_OPTIONS="$(TAR_OPTIONS)" $(MAKE) $(AM_MAKEFLAGS) distcheck
release-verify-news:
@ -49,14 +49,6 @@ release-verify-news:
false); else :; fi
@echo "Good."
release-verify-sane-changelogs: changelogs
@echo -n "Checking that the ChangeLog files are sane..."
@if grep -q "is required to generate" $(CHANGELOGS); then \
(echo "Ouch." && \
echo "Some of the ChangeLogs are not generated correctly." && \
echo "Remove ChangeLog* and make changelogs" && false); else :; fi
@echo "Good."
release-verify-even-micro:
@echo -n "Checking that $(VERSION) has an even micro component..."
@test "$(COGL_1_MICRO_VERSION)" = "`echo $(COGL_1_MICRO_VERSION)/2*2 | bc`" || \
@ -165,5 +157,4 @@ release-publish: release-check
release-publish \
release-tag \
release-upload \
release-verify-even-micro \
release-verify-sane-changelogs
release-verify-even-micro