X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=7d84b6c3b58a1410810a505e387b7dedfb12d806;hb=b187ff0528e2a081392a834e684d1d0c161708a7;hp=3651543267fe14d8158d5f74d1a13b680c64698f;hpb=bc3991768078b437cbbbe93bc1cd2eab0ca98000;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 365154326..7d84b6c3b 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -36,9 +36,32 @@ VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) +# You can override this variable in cfg.mk to set your own regexp +# matching files to ignore. +VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ + +# This is to preprocess robustly the output of $(VC_LIST), so that even +# when $(srcdir) is a pathological name like "....", the leading sed command +# removes only the intended prefix. +_dot_escaped_srcdir = $(subst .,\.,$(srcdir)) + +# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only +# when $(srcdir) is not ".". +ifeq ($(srcdir),.) +_prepend_srcdir_prefix = +else +_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|' +endif + +# In order to be able to consistently filter "."-relative names, +# (i.e., with no $(srcdir) prefix), this definition is careful to +# remove any $(srcdir) prefix, and to restore what it removes. VC_LIST_EXCEPT = \ - $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ - else grep -Ev "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi + $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \ + | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ + else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ + | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \ + $(_prepend_srcdir_prefix) ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version @@ -102,7 +125,9 @@ local-checks-available = \ # Arrange to print the name of each syntax-checking rule just before running it. $(syntax-check-rules): %: %.m -$(patsubst %, %.m, $(syntax-check-rules)): +sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules)) +.PHONY: $(sc_m_rules_) +$(sc_m_rules_): @echo $(patsubst sc_%.m, %, $@) local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available)) @@ -311,6 +336,11 @@ sc_prohibit_inttostr_without_use: $(_header_without_use) # Don't include this header unless you use one of its functions. +sc_prohibit_ignore_value_without_use: + @h='"ignore-value.h"' re='\ +sc_prohibit_hash_without_use: + @h='"hash.h"' \ + re='$(_hash_fn)|$(_hash_struct)'\ + $(_header_without_use) + +sc_prohibit_hash_pjw_without_use: + @h='"hash-pjw.h"' \ + re='\&2; exit 1; } || : + +sc_vulnerable_makefile_CVE-2009-4029: + @files=$$(find $(srcdir) -name Makefile.in); \ + if test -n "$$files"; then \ + grep -E \ + 'perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \ + $$files && \ + { echo '$(ME): the above files are vulnerable; beware of' \ + 'running "make dist*" rules, and upgrade to fixed automake' \ + 'see http://bugzilla.redhat.com/542609 for details' \ + 1>&2; exit 1; } || :; \ + else :; \ + fi + vc-diff-check: (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || : if test -s vc-diffs; then \ @@ -738,11 +805,12 @@ announcement: NEWS ChangeLog $(rel-files) ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org +upload_dest_dir_ ?= $(PACKAGE) emit_upload_commands: @echo ===================================== @echo ===================================== @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\" - @echo " --to $(gnu_rel_host):$(PACKAGE) \\" + @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\" @echo " $(rel-files)" @echo '# send the ~/announce-$(my_distdir) e-mail' @echo =====================================