X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=c0c3f271fedbf7e844e23ef7723942333898c520;hb=10bd9c6bbe33945829c0cacd60b66e44b3a4fb5b;hp=a4ce064924756ddf28f7e7069add5a877ed9f004;hpb=851901debf791efa28059baf50705f4e57fff5e8;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index a4ce06492..c0c3f271f 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -38,7 +38,8 @@ VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) VC_LIST_EXCEPT = \ - $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; else grep -v ChangeLog; fi + $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ + else grep -Ev "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version @@ -73,8 +74,8 @@ export LC_ALL = C _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk') # Collect the names of rules starting with `sc_'. -syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ - $(srcdir)/$(ME) $(_cfg_mk)) +syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ + $(srcdir)/$(ME) $(_cfg_mk))) .PHONY: $(syntax-check-rules) local-checks-available = \ @@ -234,7 +235,8 @@ sc_prohibit_HAVE_MBRTOWC: # h: the header, enclosed in <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _header_without_use - h_esc=`echo "$$h"|sed 's/\./\\./g'`; \ + dummy=; : so we do not need a semicolon before each use; \ + h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \ if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ @@ -291,6 +293,11 @@ sc_prohibit_root_dev_ino_without_use: re='(\|\&2; exit 1;};}\ || : - $(MAKE) vc-dist + $(MAKE) vc-diff-check $(MAKE) news-date-check + $(MAKE) distcheck + $(MAKE) dist XZ_OPT=-9ev $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) if test -d $(release_archive_dir); then \ ln $(rel-files) $(release_archive_dir); \ @@ -772,15 +766,19 @@ INDENT_SOURCES ?= $(C_SOURCES) indent: indent $(INDENT_SOURCES) -# If you have an additional project-specific rule, -# define it in cfg.mk and set this variable to its name. -update-copyright-local ?= +# If you want to set UPDATE_COPYRIGHT_* environment variables, +# put the assignments in this variable. +update-copyright-env ?= # Run this rule once per year (usually early in January) # to update all FSF copyright year lists in your project. -update-copyright-exclude-regexp ?= (^|/)COPYING$$ +# If you have an additional project-specific rule, +# add it in cfg.mk along with a line 'update-copyright: prereq'. +# By default, exclude all variants of COPYING; you can also +# add exemptions (such as ChangeLog..* for rotated change logs) +# in the file .x-update-copyright. .PHONY: update-copyright -update-copyright: $(update-copyright-local) - grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \ - | grep -v -E '$(update-copyright-exclude-regexp)' \ - | xargs $(build_aux)/$@ +update-copyright: + grep -l -w Copyright \ + $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ + | $(update-copyright-env) xargs $(build_aux)/$@