X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=maint.mk;h=4889ebacc777094e74740c79433cccd84e6e4e77;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=aa23364a1b677c3a1cae07848a10e700fec8a071;hpb=20fcfc81ece044b8b0a6768ec6cf47be4e22a2e6;p=debian%2Fgzip diff --git a/maint.mk b/maint.mk index aa23364..4889eba 100644 --- a/maint.mk +++ b/maint.mk @@ -2,7 +2,7 @@ # This Makefile fragment tries to be general-purpose enough to be # used by many projects via the gnulib maintainer-makefile module. -## Copyright (C) 2001-2016 Free Software Foundation, Inc. +## Copyright (C) 2001-2018 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with this program. If not, see . +## along with this program. If not, see . # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) @@ -55,6 +55,10 @@ VC = $(GIT) VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) +# You can override this variable in cfg.mk if your gnulib submodule lives +# in a different location. +gnulib_dir ?= $(srcdir)/gnulib + # You can override this variable in cfg.mk to set your own regexp # matching files to ignore. VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ @@ -126,8 +130,8 @@ gnu_ftp_host-stable = ftp.gnu.org gnu_rel_host ?= $(gnu_ftp_host-$(release-type)) url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \ - http://ftpmirror.gnu.org/$(PACKAGE), \ - ftp://$(gnu_rel_host)/gnu/$(PACKAGE)) + https://ftpmirror.gnu.org/$(PACKAGE), \ + https://$(gnu_rel_host)/gnu/$(PACKAGE)) # Override this in cfg.mk if you are using a different format in your # NEWS file. @@ -417,6 +421,7 @@ sc_error_message_period: sc_file_system: @prohibit=file''system \ + exclude='/proc/filesystems' \ ignore_case=1 \ halt='found use of "file''system"; spell it "file system"' \ $(_sc_search_regexp) @@ -437,17 +442,26 @@ sc_require_config_h: halt='the above files do not include ' \ $(_sc_search_regexp) +# Print each file name for which the first #include does not match +# $(config_h_header). Like grep -m 1, this only looks at the first match. +perl_config_h_first_ = \ + -e 'BEGIN {$$ret = 0}' \ + -e 'if (/^\# *include\b/) {' \ + -e ' if (not m{^\# *include $(config_h_header)}) {' \ + -e ' print "$$ARGV\n";' \ + -e ' $$ret = 1;' \ + -e ' }' \ + -e ' \# Move on to next file after first include' \ + -e ' close ARGV;' \ + -e '}' \ + -e 'END {exit $$ret}' + # You must include before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ - fail=0; \ - for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ - grep '^# *include\>' $$i | $(SED) 1q \ - | grep -E '^# *include $(config_h_header)' > /dev/null \ - || { echo $$i; fail=1; }; \ - done; \ - test $$fail = 1 && \ + files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \ + perl -n $(perl_config_h_first_) $$files || \ { echo '$(ME): the above files include some other header' \ 'before ' 1>&2; exit 1; } || :; \ else :; \ @@ -558,7 +572,7 @@ sc_prohibit_posixver_without_use: @h='posixver.h' re='\ $@-1; \ - files=; \ - for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \ - test -r $$file || continue; \ - case $$file in \ - *.m4|*.mk) continue ;; \ - *.?|*.??) ;; \ - *) continue;; \ - esac; \ - case $$file in \ - *.[ch]) \ - base=`expr " $$file" : ' \(.*\)\..'`; \ - { test -f $$base.l || test -f $$base.y; } && continue;; \ - esac; \ - files="$$files $$file"; \ - done; \ + files=$$(perl $(perl_translatable_files_list_) \ + $$($(VC_LIST_EXCEPT)) $(generated_files)); \ grep -E -l '$(_gl_translatable_string_re)' $$files \ | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ @@ -1260,7 +1270,7 @@ sc_vulnerable_makefile_CVE-2009-4029: halt=$$(printf '%s\n' \ 'the above files are vulnerable; beware of running' \ ' "make dist*" rules, and upgrade to fixed automake' \ - ' see http://bugzilla.redhat.com/542609 for details') \ + ' see https://bugzilla.redhat.com/show_bug.cgi?id=542609 for details') \ $(_sc_search_regexp) sc_vulnerable_makefile_CVE-2012-3386: @@ -1269,7 +1279,7 @@ sc_vulnerable_makefile_CVE-2012-3386: halt=$$(printf '%s\n' \ 'the above files are vulnerable; beware of running' \ ' "make distcheck", and upgrade to fixed automake' \ - ' see http://bugzilla.redhat.com/CVE-2012-3386 for details') \ + ' see https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-3386 for details') \ $(_sc_search_regexp) vc-diff-check: @@ -1284,7 +1294,6 @@ vc-diff-check: rel-files = $(DIST_ARCHIVES) -gnulib_dir ?= $(srcdir)/gnulib gnulib-version = $$(cd $(gnulib_dir) \ && { git describe || git rev-parse --short=10 HEAD; } ) bootstrap-tools ?= autoconf,automake,gnulib @@ -1345,8 +1354,8 @@ release-commit: ## Updating files. ## ## ---------------- ## -ftp-gnu = ftp://ftp.gnu.org/gnu -www-gnu = http://www.gnu.org +ftp-gnu = https://ftp.gnu.org/gnu +www-gnu = https://www.gnu.org upload_dest_dir_ ?= $(PACKAGE) upload_command = \ @@ -1494,7 +1503,10 @@ gen-coverage: --highlight --frames --legend \ --title "$(PACKAGE_NAME)" -coverage: init-coverage build-coverage gen-coverage +coverage: + $(MAKE) init-coverage + $(MAKE) build-coverage + $(MAKE) gen-coverage # Some projects carry local adjustments for gnulib modules via patches in # a gnulib patch directory whose default name is gl/ (defined in bootstrap @@ -1524,7 +1536,7 @@ refresh-gnulib-patches: # Update gettext files. PACKAGE ?= $(shell basename $(PWD)) PO_DOMAIN ?= $(PACKAGE) -POURL = http://translationproject.org/latest/$(PO_DOMAIN)/ +POURL = https://translationproject.org/latest/$(PO_DOMAIN)/ PODIR ?= po refresh-po: rm -f $(PODIR)/*.po && \