]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 28 Dec 2011 09:50:37 +0000 (10:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 28 Dec 2011 09:50:37 +0000 (10:50 +0100)
* maint:
  maint: autogenerate ChangeLog

1  2 
.gitignore
ChangeLog.11
Makefile.am

diff --cc .gitignore
Simple merge
diff --cc ChangeLog.11
Simple merge
diff --cc Makefile.am
index bf2eeb69e7e9d2650bd38e3c37184a9ab6611682,ed01bbb003df081924a18eaae67757178d0c5a13..f3638dd489630cbc93984b71203dfed0b9a0d344
@@@ -130,44 -109,46 +131,81 @@@ recheck
  ## to anybody else
  ##
  
+ gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
+ gitlog_to_changelog_options = --since='2011-12-28 00:00:00'
+ # Automatic generation of the ChangeLog from git history.
+ #
+ # When executed from a git checkout, generate the ChangeLog from the git
+ # history.  When executed from an extracted distribution tarball, just
+ # copy the distributed ChangeLog in the build directory (and if this
+ # fails, or if no distributed ChangeLog file is present, complain and
+ # give an error).
+ #
+ # We need the apparently useless dependency from another .PHONY target
+ # `am--changelog-regen-hook' to work around a bug of Solaris make, which
+ # doesn't execute the recipe of a target named as an existing file, even
+ # if such target is declared `.PHONY' (yikes!)
+ #
+ .PHONY: am--changelog-regen-hook
+ am--changelog-regen-hook:
+ ChangeLog: am--changelog-regen-hook
+       $(AM_V_GEN)set -e; set -u; \
+ ## The ChangeLog should be regenerated unconditionally when working from
+ ## checked-out sources; otherwise, if we're working from a distribution
+ ## tarball, we expect the ChangeLog to be distributed, so check that it
+ ## is indeed present in the source directory.
+       if test -d $(srcdir)/.git; then \
+         rm -f $@-t \
+           && $(gitlog_to_changelog_command) \
+              $(gitlog_to_changelog_options) >$@-t \
+           && chmod a-w $@-t \
+           && mv -f $@-t $@ \
+           || exit 1; \
+       elif test ! -f $(srcdir)/$@; then \
+         echo "Source tree is not a git checkout, and no pre-existent" \
+              "$@ file has been found there" >&2; \
+         exit 1; \
+       fi
  # Ensure tests are world-executable
  dist-hook:
 -      cd $(distdir)/tests && chmod a+rx *.test
 +      $(am__cd) $(distdir)/tests && chmod a+rx *.test
 +
 +
 +# Perl coverage statistics.
 +PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
 +PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
 +PERL_COVER = cover
 +
 +check-coverage-run recheck-coverage-run: all
 +      $(mkinstalldirs) $(PERL_COVERAGE_DB)
 +      PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
 +      WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
 +      $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
 +
 +check-coverage-report:
 +      @if test ! -d "$(PERL_COVERAGE_DB)"; then \
 +        echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
 +        echo "Please run \`make check-coverage' first" >&2; \
 +        exit 1; \
 +      fi
 +      $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
 +
 +# We don't use direct dependencies here because we'd like to be able
 +# to invoke the report even after interrupted check-coverage.
 +check-coverage: check-coverage-run
 +      $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
 +
 +recheck-coverage: recheck-coverage-run
 +      $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
 +
 +clean-coverage:
 +      rm -rf "$(PERL_COVERAGE_DB)"
 +clean-local: clean-coverage
 +
 +.PHONY: check-coverage recheck-coverage check-coverage-run \
 +      recheck-coverage-run check-coverage-report clean-coverage
  
  # Some simple checks, and then ordinary check.  These are only really
  # guaranteed to work on my machine.