From 4792e154b68005f85ea0e63c6724a8c8751ece23 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 13 Oct 2013 10:54:32 -0400 Subject: Convert to auto-generated ChangeLog files. Rename existing ChangeLog files so they won't be distributed. Add targets to maintMakefile to generate ChangeLog from the Git repository. This will require a version of gnulib be available. Because ChangeLog is auto-generated, we have to switch our automake mode to "foreign" or it will complain and fail. --- maintMakefile | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'maintMakefile') diff --git a/maintMakefile b/maintMakefile index 12150a8..da5361f 100644 --- a/maintMakefile +++ b/maintMakefile @@ -2,7 +2,14 @@ # only if you have the full copy of the GNU make sources from the Git # tree, not a dist copy. +BUGLIST := bug-make@gnu.org + +# These are related to my personal setup. GPG_FINGERPRINT := 6338B6D4 +SRCROOTDIR := $(HOME)/src +GNULIBDIR := $(SRCROOTDIR)/gnulib +MAKEWEBDIR := $(SRCROOTDIR)/make/make-web +GNUWEBDIR := $(SRCROOTDIR)/gnu-www # We like mondo-warnings! AM_CFLAGS += -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast @@ -99,10 +106,27 @@ git-very-clean: git-clean -$(GIT) clean -fd -# ---------------------------------------------------------------------- -# -# The sections below were stolen from the Makefile.maint used by fileutils, -# sh-utils, textutils, CPPI, Bison, and Autoconf. + +## ---------------------- ## +## Generating ChangeLog. ## +## ---------------------- ## + +gl2cl-date := 2013-10-10 +gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog + +# Rebuild the changelog whenever a new commit is added +ChangeLog: .check-git-HEAD + if test -f '$(gl2cl)'; then \ + '$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \ + else \ + echo "WARNING: $(gl2cl) is not available. No $@ generated."; \ + fi + +.PHONY: .check-git-HEAD +.check-git-HEAD: + sha="`git rev-parse HEAD`"; \ + [ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \ + || echo "$$sha" > '$@' ## ---------------- ## @@ -210,10 +234,6 @@ checkcfg.%: distdir && $(MAKE) $(AM_MAKEFLAGS) check -.PHONY: update -update: po-update scm-update - - ## --------------- ## ## Sanity checks. ## ## --------------- ## @@ -221,6 +241,8 @@ update: po-update scm-update # Before we build a distribution be sure we run our local checks #distdir: local-check +.PHONY: local-check po-check changelog-check + # Checks that don't require Git. Run 'changelog-check' last as # previous test may reveal problems requiring new ChangeLog entries. local-check: po-check changelog-check -- cgit v1.2.3