This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
@@ -65,7 +65,7 @@ test $# = 0 && set .
for dir
do
- if test -d .git; then
+ if test -d .git || test -f .git; then
test "x$dir" = x. \
&& dir= sed_esc= \
|| { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
diff --git a/doc/gendocs_template b/doc/gendocs_template
index fea0ebc23..b45e5e63e 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -52,7 +52,7 @@
(%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).
-You can buy printed copies of
+You can buy printed copies of
some manuals (among other items) from the Free Software Foundation;
this helps support FSF activities.
@@ -77,10 +77,10 @@ the FSF. Broken links and other corrections or suggestions can be sent
to <%%EMAIL%%>.
-Copyright © 2016 Free Software Foundation, Inc.
+Copyright © 2017 Free Software Foundation, Inc.
This page is licensed under a Creative
+href="https://creativecommons.org/licenses/by-nd/3.0/us/">Creative
Commons Attribution-NoDerivs 3.0 United States License.
diff --git a/doc/standards.texi b/doc/standards.texi
index 77a03a8f8..b2c1ae91a 100644
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -3,7 +3,7 @@
@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
-@set lastupdate December 23, 2015
+@set lastupdate July 25, 2016
@c %**end of header
@dircategory GNU organization
@@ -28,7 +28,7 @@ The GNU coding standards, last updated @value{lastupdate}.
Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -599,16 +599,13 @@ are silently truncated''. This is not acceptable in a GNU utility.
@cindex @code{NUL} characters
@findex libiconv
Utilities reading files should not drop NUL characters, or any other
-nonprinting characters @emph{including those with codes above 0177}.
-The only sensible exceptions would be utilities specifically intended
-for interface to certain types of terminals or printers that can't
-handle those characters. Whenever possible, try to make programs work
-properly with sequences of bytes that represent multibyte characters;
-UTF-8 is the most important.
+nonprinting characters. Programs should work properly with multibyte
+character encodings, such as UTF-8. You can use libiconv to deal with
+a range of encodings.
@cindex error messages
Check every system call for an error return, unless you know you wish
-to ignore errors. Include the system error text (from @code{perror},
+to ignore errors. Include the system error text (from
@code{strerror}, or equivalent) in @emph{every} error message
resulting from a failing system call, as well as the name of the file
if any and the name of the utility. Just ``cannot open foo.c'' or
@@ -617,16 +614,10 @@ if any and the name of the utility. Just ``cannot open foo.c'' or
@cindex @code{malloc} return value
@cindex memory allocation failure
Check every call to @code{malloc} or @code{realloc} to see if it
-returned zero. Check @code{realloc} even if you are making the block
-smaller; in a system that rounds block sizes to a power of 2,
+returned @code{NULL}. Check @code{realloc} even if you are making the
+block smaller; in a system that rounds block sizes to a power of 2,
@code{realloc} may get a different block if you ask for less space.
-In Unix, @code{realloc} can destroy the storage block if it returns
-zero. GNU @code{realloc} does not have this bug: if it fails, the
-original block is unchanged. Feel free to assume the bug is fixed. If
-you wish to run your program on Unix, and wish to avoid lossage in this
-case, you can use the GNU @code{malloc}.
-
You must expect @code{free} to alter the contents of the block that was
freed. Anything you want to fetch from the block, you must fetch before
calling @code{free}.
@@ -642,8 +633,10 @@ Use @code{getopt_long} to decode arguments, unless the argument syntax
makes this unreasonable.
When static storage is to be written in during program execution, use
-explicit C code to initialize it. Reserve C initialized declarations
-for data that will not be changed.
+explicit C code to initialize it. This way, restarting the program
+(without reloading it), or part of it, will reinitialize those
+variables. Reserve C initialized declarations for data that will not
+be changed.
@c ADR: why?
Try to avoid low-level interfaces to obscure Unix data structures (such
@@ -2338,7 +2331,7 @@ this is not very hard and users will want to be able to operate on input
files that are bigger than will fit in memory all at once.
If your program creates complicated data structures, just make them in
-memory and give a fatal error if @code{malloc} returns zero.
+memory and give a fatal error if @code{malloc} returns @code{NULL}.
@pindex valgrind
@cindex memory leak
@@ -2795,7 +2788,7 @@ inside @code{while}-conditions are ok). For example, don't write
this:
@example
-if ((foo = (char *) malloc (sizeof *foo)) == 0)
+if ((foo = (char *) malloc (sizeof *foo)) == NULL)
fatal ("virtual memory exhausted");
@end example
@@ -2804,14 +2797,10 @@ instead, write this:
@example
foo = (char *) malloc (sizeof *foo);
-if (foo == 0)
+if (foo == NULL)
fatal ("virtual memory exhausted");
@end example
-This example uses zero without a cast as a null pointer constant.
-This is perfectly fine, except that a cast is needed when calling a
-varargs function or when using @code{sizeof}.
-
@node Names
@section Naming Variables, Functions, and Files
@@ -4281,19 +4270,31 @@ reasons.
Thus, for example, you should not refer to AT&T's web site if that
recommends AT&T's non-free software packages; you should not refer to
-a page P that links to AT&T's site presenting it as a place to get
-some non-free program, because that part of the page P itself
-recommends and legitimizes the non-free program. However, that P
+a page @var{p} that links to AT&T's site presenting it as a place to get
+some non-free program, because that part of the page @var{p} itself
+recommends and legitimizes the non-free program. However, that @var{p}
contains a link to AT&T's web site for some other purpose (such as
long-distance telephone service) is not an objection against it.
-There are web sites which depend on nonfree Javascript code even to
-see the contents of the pages. Any site hosted on wix.com
-has this problem, and so do some other sites. Referring people to
-such pages to read their contents is, in effect, urging them to run
-those nonfree programs---so please don't refer to those pages. (Such
-pages also break the Web, so they deserve condemnation for two
-reasons.)
+A web page recommends a program in a particularly strong way if it
+requires users to run that program in order to use the page. Many
+pages contain Javascript code which they recommend in this way. This
+Javascript code may be free or nonfree, but nonfree is the usual case.
+
+If the purpose for which you would refer to the page cannot be carried
+out without running nonfree Javascript code, then you should not refer
+to it. Thus, if the purpose of referring to the page is for people to
+view a video, or subscribing to a mailing list, and the viewing or
+subscribing fail to work if the user's browser blocks the nonfree
+Javascript code, then don't refer to that page.
+
+The extreme case is that of web sites which depend on nonfree
+Javascript code even to @emph{see} the contents of the pages. Any
+site hosted on @indicateurl{wix.com} has this problem, and so do some
+other sites. Referring people to such pages to read their contents
+is, in effect, urging them to run those nonfree programs---so please
+don't refer to those pages. (Such pages also break the Web, so they
+deserve condemnation for two reasons.)
Instead, please quote excerpts from the page to make your point,
or find another place to refer to that information.
diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm
index 67601a0a3..42a728af4 100644
--- a/lib/Autom4te/Channels.pm
+++ b/lib/Autom4te/Channels.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -11,7 +11,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 .
###############################################################
# The main copy of this file is in Automake's git repository. #
diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
index 678b5983a..a7e34012d 100644
--- a/lib/Autom4te/FileUtils.pm
+++ b/lib/Autom4te/FileUtils.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -11,7 +11,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 .
###############################################################
# The main copy of this file is in Automake's git repository. #
diff --git a/lib/Autom4te/Getopt.pm b/lib/Autom4te/Getopt.pm
index 708032555..5058d79a4 100644
--- a/lib/Autom4te/Getopt.pm
+++ b/lib/Autom4te/Getopt.pm
@@ -11,7 +11,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 .
package Autom4te::Getopt;
diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm
index 138818e8e..a974a2ff2 100644
--- a/lib/Autom4te/XFile.pm
+++ b/lib/Autom4te/XFile.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -11,7 +11,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 .
# Written by Akim Demaille .
diff --git a/m4/autobuild.m4 b/m4/autobuild.m4
index 66b183b23..f5f2a1899 100644
--- a/m4/autobuild.m4
+++ b/m4/autobuild.m4
@@ -1,5 +1,5 @@
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/maint.mk b/maint.mk
index 7ae6700a0..c462d2460 100644
--- a/maint.mk
+++ b/maint.mk
@@ -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.
@@ -437,17 +441,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 :; \
@@ -648,18 +661,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_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \
- TYPE_SIGNED_MAGNITUDE 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:
@@ -687,7 +696,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.
@@ -708,15 +717,6 @@ sc_changelog:
halt='found unexpected prefix in a ChangeLog' \
$(_sc_search_regexp)
-# Ensure that each .c file containing a "main" function also
-# calls set_program_name.
-sc_program_name:
- @require='set_program_name *\(.*\);' \
- in_vc_files='\.c$$' \
- containing='\ $@-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 \
@@ -1261,7 +1269,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:
@@ -1270,7 +1278,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:
@@ -1285,7 +1293,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
@@ -1346,8 +1353,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 = \
@@ -1495,7 +1502,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
@@ -1525,7 +1535,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 && \