# HG changeset patch # User Eric Blake # Date 1240606621 21600 # Node ID 5223ecd9ec17072248baaf9d19395a4b6595278a # Parent e2ccee22359c4d71ef8da8a87244674b302015b8 maint.mk: import improvements from m4 * top/maint.mk (VC-tag): Use signing key from cfg.mk. (move_if_change): Delete unused macro. (news-date-check, vc-diff-check): Support VPATH builds. (announcement): Likewise. Split --bootstrap-tools list... (boostrap-tools): ...into separate list, which can be overridden in cfg.mk. (sc_avoid_if_before_free): Point to $(gnulib_dir), rather than requiring dependency on useless-if-before-free module. (VC_LIST, VC_LIST_EXCEPT): Likewise for vc-list-files module. Support VPATH builds. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-04-24 Eric Blake + + maint.mk: import improvements from m4 + * top/maint.mk (VC-tag): Use signing key from cfg.mk. + (move_if_change): Delete unused macro. + (news-date-check, vc-diff-check): Support VPATH builds. + (announcement): Likewise. Split --bootstrap-tools list... + (boostrap-tools): ...into separate list, which can be overridden + in cfg.mk. + (sc_avoid_if_before_free): Point to $(gnulib_dir), rather than + requiring dependency on useless-if-before-free module. + (VC_LIST, VC_LIST_EXCEPT): Likewise for vc-list-files module. + Support VPATH builds. + 2009-04-24 Jim Meyering maint.mk: remove coreutils-specific rules and variables @@ -27,7 +41,7 @@ * NEWS: Explain incompatibilities. 2009-04-22 Yoann Vandoorselaere - Bruno Haible + Bruno Haible Fix cross-compilation results. * m4/btowc.m4 (gl_FUNC_BTOWC): Use no-op statement, rather than empty diff --git a/top/maint.mk b/top/maint.mk --- a/top/maint.mk +++ b/top/maint.mk @@ -1,6 +1,6 @@ # -*-Makefile-*- # This Makefile fragment tries to be general-purpose enough to be -# used by at least coreutils, idutils, CPPI, Bison, and Autoconf. +# used by many projects via the gnulib maintainer-makefile module. ## Copyright (C) 2001-2009 Free Software Foundation, Inc. ## @@ -27,14 +27,15 @@ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' +# cfg.mk must define the gpg_key_ID used by this package. GIT = git VC = $(GIT) -VC-tag = git tag -s -m '$(VERSION)' +VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' -VC_LIST = $(srcdir)/build-aux/vc-list-files +VC_LIST = $(gnulib_dir)/build-aux/vc-list-files -C $(srcdir) VC_LIST_EXCEPT = \ - $(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi + $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; else grep -v ChangeLog; fi ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version @@ -68,7 +69,7 @@ # Collect the names of rules starting with `sc_'. syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ - $(srcdir)/$(ME) $(srcdir)/cfg.mk) + $(srcdir)/$(ME) $(srcdir)/cfg.mk) .PHONY: $(syntax-check-rules) local-checks-available = \ @@ -110,7 +111,7 @@ endef sc_avoid_if_before_free: - @$(srcdir)/build-aux/useless-if-before-free \ + @$(gnulib_dir)/build-aux/useless-if-before-free \ $(useless_free_options) \ $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found useless "if" before "free" above' 1>&2; \ @@ -495,7 +496,7 @@ news-date-check: NEWS today=`date +%Y-%m-%d`; \ - if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \ + if head $(srcdir)/NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \ >/dev/null; then \ :; \ else \ @@ -593,7 +594,7 @@ fi vc-diff-check: - $(VC) diff > vc-diffs || : + (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || : if test -s vc-diffs; then \ cat vc-diffs; \ echo "Some files are locally modified:" 1>&2; \ @@ -631,16 +632,17 @@ rel-files = $(DIST_ARCHIVES) gnulib-version = $$(cd $(gnulib_dir) && git describe) +bootstrap-tools ?= autoconf,automake,gnulib announcement: NEWS ChangeLog $(rel-files) - @./build-aux/announce-gen \ + @$(srcdir)/build-aux/announce-gen \ --release-type=$(RELEASE_TYPE) \ --package=$(PACKAGE) \ --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --gpg-key-id=$(gpg_key_ID) \ --news=NEWS \ - --bootstrap-tools=autoconf,automake,bison,gnulib \ + --bootstrap-tools=$(bootstrap-tools) \ --gnulib-version=$(gnulib-version) \ --no-print-checksums \ $(addprefix --url-dir=, $(url_dir_list)) @@ -652,9 +654,6 @@ ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org -# Use mv, if you don't have/want move-if-change. -move_if_change ?= move-if-change - emit_upload_commands: @echo ===================================== @echo =====================================