summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-10-19 14:57:57 -0700
committerPádraig Brady <P@draigBrady.com>2016-11-07 17:09:15 +0000
commit30012b290facf66551cdf395ace397903d00483d (patch)
tree6fcc03436b7a10a2002ce03d9573689218d5e55c /cfg.mk
parent7ba9355d0aec01a005164b02f7bdc8e67c430315 (diff)
downloadcoreutils-30012b290facf66551cdf395ace397903d00483d.tar.xz
date: add %q to output the quarter of the year
* doc/coreutils.texi (date invocation): Document %q. * src/date.c (usage): Likewise. * tests/misc/date.pl: Add a test case. * cfg.mk (sc_strftime_check): Adjust to allow %q. * NEWS: Mention the new feature.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/cfg.mk b/cfg.mk
index ece6efa88..11e42b92f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -434,14 +434,14 @@ sc_prohibit_stat_macro_address:
$(_sc_search_regexp)
# Ensure that date's --help output stays in sync with the info
-# documentation for GNU strftime. The only exception is %N,
+# documentation for GNU strftime. The only exception is %N and %q,
# which date accepts but GNU strftime does not.
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
sc_strftime_check:
@if test -f $(srcdir)/src/date.c; then \
grep '^ %. ' $(srcdir)/src/date.c | sort \
| $(extract_char) > $@-src; \
- { echo N; \
+ { echo N; echo q; \
info libc date calendar format 2>/dev/null \
| grep "^ *['\`]%.'$$"| $(extract_char); }| sort >$@-info;\
if test $$(stat --format %s $@-info) != 2; then \