Hi Jim, On 27 Oct 2011, at 22:02, Jim Meyering wrote: > Gary V. Vaughan wrote: >> On 25 Oct 2011, at 15:18, Gary V. Vaughan wrote: >>> On 25 Oct 2011, at 15:05, Jim Meyering wrote: >>>> Actually, I think we can both get what we want. >>>> I suggest to adjust your patch so that make is guaranteed to fail >>>> with a nice diagnostic for anyone who defines build_aux in cfg.mk. >>> >>> It's in my queue, so I should get to it in a few days. Thanks for the >>> feedback. >> >> Okay to push? >> >> * maint.mk (build-aux): Removed. The maintainer-makefile module > > Almost. > Please sync at least the above commit-log line from your ChangeLog. > That will fix the "build-aux" (s/-/_/) typo.
Done. >> depends on GNUmakefile, which already maintains a cfg.mk >> overridable $(_build-aux) for projects with a non-standard >> build-aux directory location, although without the $(srcdir) >> prefix. Use that variable consistently instead of introducing a >> second one. Adjust all call sites. >> --- >> ChangeLog | 10 ++++++++++ >> top/maint.mk | 17 +++++++++-------- >> 2 files changed, 19 insertions(+), 8 deletions(-) >> >> diff --git a/ChangeLog b/ChangeLog >> index 93ee45e..660b9ce 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,13 @@ >> +2011-10-27 Gary V. Vaughan <g...@gnu.org> >> + >> + maint.mk: don't maintain a second build-aux variable. >> + * maint.mk (build_aux): Removed. The maintainer-makefile module >> + depends on GNUmakefile, which already maintains a cfg.mk >> + overridable $(_build-aux) for projects with a non-standard >> + build-aux directory location, although without the $(srcdir) >> + prefix. Use that variable consistently instead of introducing a >> + second one. Adjust all call sites. > ... >> diff --git a/top/maint.mk b/top/maint.mk > ... >> ME := maint.mk >> >> -# Override this in cfg.mk if you use a non-standard build-aux directory. >> -build_aux ?= $(srcdir)/build-aux >> +ifneq ($(build_aux),) >> + $(error '*** set $$(_build-aux) relative to $$(srcdir) instead of >> $$(build_aux)') > > That line is longer than 80. > Please shorten or split it, and Done. > use a prefix of "$(ME): " as > in most of the other diagnostics in this file. Or at least > include $(ME) somewhere, so people know where it's coming from. $ fgrep '$(error ' ~/Devo/gnulib/top/* top/maint.mk: $(error '*** set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)') top/maint.mk: $(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt') I changed the one error I added as requested, but I guess the other use which I copied from needs to have $(ME) added too (and be wrapped to avoid breaking the 80 column limit)? Okay to push? * maint.mk (build_aux): Removed. The maintainer-makefile module depends on GNUmakefile, which already maintains a cfg.mk overridable $(_build-aux) for projects with a non-standard build-aux directory location, although without the $(srcdir) prefix. Use that variable consistently instead of introducing a second one. Adjust all call sites. --- ChangeLog | 10 ++++++++++ top/maint.mk | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93ee45e..f84596a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-10-28 Gary V. Vaughan <g...@gnu.org> + + maint.mk: don't maintain a second build-aux variable. + * maint.mk (build_aux): Removed. The maintainer-makefile module + depends on GNUmakefile, which already maintains a cfg.mk + overridable $(_build-aux) for projects with a non-standard + build-aux directory location, although without the $(srcdir) + prefix. Use that variable consistently instead of introducing a + second one. Adjust all call sites. + 2011-10-23 Gary V. Vaughan <g...@gnu.org> Bruno Haible <br...@clisp.org> Jim Meyering <j...@meyering.net> diff --git a/top/maint.mk b/top/maint.mk index d51fec6..8c60ba6 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -21,8 +21,10 @@ # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk -# Override this in cfg.mk if you use a non-standard build-aux directory. -build_aux ?= $(srcdir)/build-aux +ifneq ($(build_aux),) + $(error "$(ME): \ +set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)") +endif # Do not save the original name or timestamp in the .tar.gz file. # Use --rsyncable if available. @@ -34,7 +36,7 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) -VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) +VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) # You can override this variable in cfg.mk to set your own regexp # matching files to ignore. @@ -274,7 +276,7 @@ define _sc_search_regexp endef sc_avoid_if_before_free: - @$(build_aux)/useless-if-before-free \ + @$(srcdir)/$(_build-aux)/useless-if-before-free \ $(useless_free_options) \ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \ { echo '$(ME): found useless "if" before "free" above' 1>&2; \ @@ -1208,7 +1210,7 @@ else endif announcement: NEWS ChangeLog $(rel-files) - @$(build_aux)/announce-gen \ + @$(srcdir)/$(_build-aux)/announce-gen \ --mail-headers='$(announcement_mail_headers_)' \ --release-type=$(RELEASE_TYPE) \ --package=$(PACKAGE) \ @@ -1232,7 +1234,7 @@ upload_dest_dir_ ?= $(PACKAGE) emit_upload_commands: @echo ===================================== @echo ===================================== - @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\" + @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\" @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\" @echo " $(rel-files)" @echo '# send the ~/announce-$(my_distdir) e-mail' @@ -1327,7 +1329,7 @@ web-manual: @test -z "$(manual_title)" \ && { echo define manual_title in cfg.mk 1>&2; exit 1; } || : @cd '$(srcdir)/doc'; \ - $(SHELL) ../$(build_aux)/gendocs.sh $(gendocs_options_) \ + $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \ -o '$(abs_builddir)/doc/manual' \ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ "$(PACKAGE_NAME) - $(manual_title)" @@ -1392,7 +1394,7 @@ update-copyright-env ?= update-copyright: grep -l -w Copyright \ $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ - | $(update-copyright-env) xargs $(build_aux)/$@ + | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ # This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not # overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. -- 1.7.7 Cheers, -- Gary V. Vaughan (gary AT gnu DOT org)