summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk55
1 files changed, 30 insertions, 25 deletions
diff --git a/maint.mk b/maint.mk
index c32f8b6d0e..508c2f7c39 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 <http://www.gnu.org/licenses/>.
+## along with this program. If not, see <https://www.gnu.org/licenses/>.
# 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)
@@ -657,17 +662,14 @@ sc_prohibit_strings_without_use:
re='\<(strn?casecmp|ffs(ll)?)\>' \
$(_sc_header_without_use)
-# Get the list of symbol names with this:
-# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt
-_intprops_names = \
- TYPE_IS_INTEGER TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \
- INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND \
- INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW \
- INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW \
- INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW \
- INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \
- INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW \
- INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW
+# Extract the raw list of symbol names with this:
+gl_extract_define_simple = \
+ /^\# *define ([A-Z]\w+)\(/ and print $$1
+# Filter out duplicates and convert to a space-separated list:
+_intprops_names = \
+ $(shell f=$(gnulib_dir)/lib/intprops.h; \
+ perl -lne '$(gl_extract_define_simple)' $$f | sort -u | tr '\n' ' ')
+# Remove trailing space and convert to a regular expression:
_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
# Prohibit the inclusion of intprops.h without an actual use.
sc_prohibit_intprops_without_use:
@@ -695,7 +697,7 @@ sc_prohibit_dirent_without_use:
# Prohibit the inclusion of verify.h without an actual use.
sc_prohibit_verify_without_use:
@h='verify.h' \
- re='\<(verify(true|expr)?|static_assert) *\(' \
+ re='\<(verify(true|expr)?|assume|static_assert) *\(' \
$(_sc_header_without_use)
# Don't include xfreopen.h unless you use one of its functions.
@@ -870,7 +872,7 @@ sc_GFDL_version:
$(_sc_search_regexp)
# Don't use Texinfo's @acronym{}.
-# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
+# https://lists.gnu.org/r/bug-gnulib/2010-03/msg00321.html
texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
sc_texinfo_acronym:
@prohibit='@acronym\{' \
@@ -982,10 +984,11 @@ sc_prohibit_doubled_word:
# Also prohibit a prefix matching "\w+ +".
# @pxref gets the same see/also treatment and should be parenthesized;
# presume it must *not* start a sentence.
+# POSIX spells it "timestamp" rather than "time\s+stamp", so we do, too.
bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
prohibit_undesirable_word_seq_RE_ ?= \
- /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
+ /(?:\bcan\s+not\b|\btime\s+stamps?\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
prohibit_undesirable_word_seq_ = \
-e 'while ($(prohibit_undesirable_word_seq_RE_))' \
$(perl_filename_lineno_text_)
@@ -1267,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:
@@ -1276,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:
@@ -1291,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
@@ -1352,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 = \
@@ -1501,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
@@ -1531,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 && \