summaryrefslogtreecommitdiff
path: root/maintMakefile
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-10-13 10:54:32 -0400
committerPaul Smith <psmith@gnu.org>2013-10-13 16:48:22 -0400
commit4792e154b68005f85ea0e63c6724a8c8751ece23 (patch)
tree019e0fa5ea3c43eda58aaa89cbb6752816a88038 /maintMakefile
parent188b2a0f23f45a63cfdac1c7316500458afb2062 (diff)
downloadgunmake-4792e154b68005f85ea0e63c6724a8c8751ece23.tar.gz
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.
Diffstat (limited to 'maintMakefile')
-rw-r--r--maintMakefile38
1 files changed, 30 insertions, 8 deletions
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