summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2009-02-19 17:15:04 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2009-02-19 17:22:21 +0000
commit5643a47cb6ee85a3f4ec93e58582ddf6a6e34d24 (patch)
treee235ec83f78c9d819930fb091dee190158c3358d /Makefile.am
parent01cf52c44c630d92b7b896b8365dafbc5ee49743 (diff)
downloadclutter-5643a47cb6ee85a3f4ec93e58582ddf6a6e34d24.tar.gz
[build] Fix the ChangeLog generation rule
The ChangeLog should only be generated by dist-hook and as a temporary file to avoid overwriting the stub we use to direct people to the commit log when cloning the repository. When generated, the ChangeLog should be copied inside the distdir so that the autotools will not freak out.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am61
1 files changed, 24 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am
index 878320886..d317d770e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,53 +41,40 @@ EXTRA_DIST = \
CLEANFILES = $(pcfiles)
-DISTCLEANFILES =
+DISTCLEANFILES = doltcompile doltlibtool
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 \
+MAINTAINERCLEANFILES = \
+ aclocal.m4 \
+ compile \
+ config.guess \
+ config.h.in \
+ config.sub \
+ configure \
+ depcomp \
+ gtk-doc.make \
+ install-sh \
+ ltmain.sh \
+ Makefile.in \
+ missing \
$(NULL)
-MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
-
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 -f $(srcdir)/$$changelog $(distdir)/ 2>/dev/null || \
- cp -f $$changelog $(distdir)/; \
- done
-
-$(srcdir)/ChangeLog:
- @if test -d "$(top_srcdir)/.git"; \
+dist-hook:
+ @if test -d "$(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 ) > $@ ; \
+ echo Creating ChangeLog && \
+ ( cd "$(top_srcdir)" && \
+ echo '# Generated by configure. Do no edit.'; echo; \
+ $(top_srcdir)/missing --run perl $(top_srcdir)/build/gen-changelog.pl $$from.0..$$to ) > ChangeLog.tmp \
+ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+ || ( rm -f ChangeLog.tmp ; \
+ echo Failed to generate ChangeLog >&2 ); \
else \
- echo A git checkout is required to generate $@; \
+ echo A git checkout is required to generate a ChangeLog >&2; \
fi
-
-.PHONY: changelogs ChangeLog $(srcdir)/ChangeLog