* cfg.mk: We exempt a few test files that would otherwise trigger
false-positive matches in syntax-check rules. The recent change
that added a .sh or .pl suffix to each test script made it so
some of the exclusion regexps would no longer match.
Include the required \.sh suffix in each such regexp, too.
* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
prefix to the manpages obtained from $(NO_INSTALL_PROGS_DEFAULT)
and listed as prerequisites for this rule.
This is more natural, now that the top-level Makefile has access to
all the variables and rules once defined only in 'man/Makefile.am'
* man/local.mk (all_programs, sc_option_desc_uppercase,
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
from here ...
* cfg.mk: ... to here. Adjust some comments in the process.
* Makefile.am: Include 'man/local.mk'.
(SUBDIRS): Remove 'man'.
* configure.ac ($MAN): Adjust so that each of its entries has a leading
'man/' component.
(AC_CONFIG_FILES): Remove 'man/Makefile'.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this. With further adjustments: each 'foo.1'
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'. Also ...
(mandep): Adjust, removing the leading '../' component.
Several whitespace adjustments while at it.
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
the associated recipes, they are now directly available from the
included 'man/local.mk'. Actually, the other changes in this commit
have made these recipes instable and not completely correct, but that
will be fixed in later changes.
This will be mostly useful in future changes.
* Makefile.am (all_programs): New, simply work by delegating to
the same-named target in the 'src/' subdirectory.
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
(sc_man_file_correlation): Likewise.
* doc/coreutils.texi: Remove all uses of @acronym{...},
per recommendation by Karl Berry.
* doc/perm.texi: Likewise.
* cfg.mk (local-checks-to-skip): Remove exemption, enabling
the @acronym{-prohibiting syntax-check rule.
We use print_ver_ to run "PROG --version" for each program under
test. Some tests have been derived from others, while the
argument(s) to print_ver_ have not been adapted.
Add a new cfg.mk rule to prohibit this.
* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
New rule, to prohibit a test script from calling print_env_ for a
program not actually used by that test.
* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
* tests/cp/acl: s/\(print_ver_\) mv/\1 cp/
* tests/cp/capability: s/\(print_ver_\) ls/\1 cp/
* tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
* tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
* tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
Add a test and NEWS entry for a bug inadvertently fixed in
a refactoring in commit v8.9-32-gd4db0cb
* tests/misc/join (v2-format): Add a new test.
* THANKS.in: Add the reporter.
* NEWS: Mention the old bug.
* cfg.mk (old_NEWS_hash): Update.
Reported-by: Jean-Pierre Tosoni
* cfg.mk (exclude_file_name_regexp--sc_file_system): Sync this
exemption regexp to match renamed tests/df/df-P. This avoids
a "make syntax-check" failure.
* cfg.mk (sc_some_programs_must_avoid_exit_failure): New rule,
to help us avoid using EXIT_FAILURE in programs like sort, ls, nohup,
timeout, env, etc. that use different exit codes in many cases.
Many coding standards, including GNU's, advocate that when
splitting a line near a binary operator, one should put the
operator at the beginning of the continued line, rather than
at the end of the preceding one. This is for readability:
such operators are relatively important to readability, and
they are more apparent at the beginning of a line than
at the varying-column end of line,
* cfg.mk (sc_prohibit_operator_at_end_of_line): New rule.
Exempt test.c and head.c.
* cfg.mk: Set XZ_OPT = -8e (determined empirically).
This sacrifices 8 KiB of compressed tarball size for a 32-MiB
decrease in the memory required during decompression. I.e.,
using -9e would shave off only 8 KiB from the tar.xz file, yet
would force every decompression process to use 32 MiB more memory.
* cfg.mk (update-copyright-env): Add UPDATE_COPYRIGHT_FORCE=1
to rejoin some split lines, and UPDATE_COPYRIGHT_USE_INTERVALS=2
to make update-copyright use only one year range.
* gnulib: Update to latest, for newer update-copyright script.
Add a rule to ding any source file that has a continued string
with a word in the first column of the following line.
Those tend to trigger malfunction in tools that try to map an
arbitrary line number to an enclosing function name. Of course,
very many strings do precisely this, *when they are part of the
usage function*. So we exempt the body of each usage function.
* src/dircolors.c (main): Separate a long, continued string
into two separately-quoted parts.
* src/od.c (decode_one_format): Likewise.
(decode_one_format, main): Move a space from end of
preceding line to the beginning of the continued line.
* src/tr.c (unquote, string2_extend, validate): Likewise.
* src/seq.c (main): Split in two and use string concatenation.
* src/stat.c (default_format): Use a mix of techniques.
* cfg.mk (sc_prohibit_continued_string_alpha_in_column_1): New rule.
Exempt three files in src: system.h, od.c, printf.c.
* cfg.mk (sc_prohibit_short_facl_mode_spec): New rule.
* tests/cp/acl: Extend setfacl mode spec to have length 3.
* tests/ls/slink-acl: Likewise.
* tests/mv/acl: Likewise.
Report and analysis by Bruno Haible.
Commit 5b3e538 proved useful enough to migrate to gnulib after
enhancing it to be more generic, which in turn pointed out that
commit a2c811db missed an offender.
* gnulib: Update to latest.
* cfg.mk (sc_prohibit_reversed_compare_failure): Delete, now that
gnulib provides it.
* tests/ls/dangle: Fix last offender.
Last week I made a global change, commit a2c811db, `tests: use
"compare exp out", not "compare out exp"', but forgot to add a
corresponding syntax check rule. Without that, it is far too
easy to add a new test or to merge in an old one that would
be non-conforming. Obviously this is only a heuristic, since
it relies on the expected-output file to have a name that starts
with "exp".
* cfg.mk (sc_prohibit_reversed_compare_failure): Prohibit use of
compare with reversed arguments.
* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
for the first link listed in the generated announcement.
announce-gen now provides the faster mirror link automatically.
We find it worthwhile to use consistent commit summary prefixes.
To that end, the commit-msg script requires that all commits I make
start with "$P: " (where $P is one of ~100 programs in coreutils)
or one of a few other words, like gnulib tests maint doc build.
It allows more than one word, so e.g., "cat tail head: " would also
be accepted. Pádraig Brady wrote the initial version, with its
72-column and blank-if-present second line checks.
The pre-commit script is the same as the git-supplied sample script,
modulo a bug fix and the "exec 1>&2" redirection.
* scripts/git-hooks/commit-msg: New file.
* scripts/git-hooks/pre-commit: New file.
* scripts/git-hooks/applypatch-msg: New file. Verbatim from .sample.
* cfg.mk: Exempt two of the new scripts from the no-leading-TABs check,
since they're nearly verbatim from git, and we want to stay in sync.
Exempt the commit-msg script from the no-"fail=0" check.
Pulling in the latest gnulib triggered a new false-positive
syntax-check failure.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_always-defined_macros):
Exempt remove.c; its definitions of DT_UNKNOWN, DT_DIR and DT_LNK are
harmless.
This is especially important for an error-handling shell function
like this that is actually called only rarely.
* cfg.mk (sc_prohibit_framework_failure): New rule, to prevent
use of the old name.
* cfg.mk (sc_prohibit_man_see_also_period): Prohibit a period at
the end of the first line after a "SEE ALSO" marker in man/*.x.
With this, we shouldn't have to make any more changes like those
in today's commit, f2dabd68.
* tests/init.cfg (skip_test_): Remove function.
Use skip_ in place of skip_test_ everywhere else.
* cfg.mk (sc_prohibit_skip_): Remove rule.
* tests/**: Use skip_, not skip_test_, everywhere.
* cfg.mk (sc_preprocessor_indentation): New test, from libvirt.
Exempt 3 files from new cppi test.
* gl/lib/randread.c: Adjust cpp indentation to comply.
* src/extent-scan.c (extent_need_sync): Likewise.
* cfg.mk: Include via "-include", to accommodate new tight-scope rule.
(sc_check-AUTHORS): Change the name of the rule in src/Makefile.am
to _sc_check-AUTHORS, so it doesn't conflict with this one when
this file is included into the sub-make's context.
* src/Makefile.am (_sc_check-AUTHORS): Rename from sc_check-AUTHORS.
* gnulib: Update to latest.
* NEWS: "an misleading"
* src/expr.c: "a integer
* src/ptx.c (find_occurs_in_text): "a end"
* src/shred.c (do_wipefd): "a infinite"
* src/sort.c (SUBTHREAD_LINES_HEURISTIC): "an dual-core"
(compare_random): "an checksum"
* cfg.mk (old_NEWS_hash): Update, since the typo was in old news.