summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-06-15 11:50:13 +0200
committerSimon Josefsson <simon@josefsson.org>2010-06-15 11:51:25 +0200
commit78819671f59cc4dea560b1ef3a21a04991e7822a (patch)
tree606ec34c4cff90785f26e23f8b2e94ef61b69ba4 /maint.mk
parent77bad487d787451f2f7cbf7f0785d4822ba3804e (diff)
downloadlibtasn1-78819671f59cc4dea560b1ef3a21a04991e7822a.tar.gz
libtasn1-78819671f59cc4dea560b1ef3a21a04991e7822a.tar.bz2
libtasn1-78819671f59cc4dea560b1ef3a21a04991e7822a.zip
Update gnulib files. Fix syntax-check warnings.
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk22
1 files changed, 15 insertions, 7 deletions
diff --git a/maint.mk b/maint.mk
index 3bcab0c..59e9cb5 100644
--- a/maint.mk
+++ b/maint.mk
@@ -27,7 +27,8 @@ build_aux ?= $(srcdir)/build-aux
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
- $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
+ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+ && printf %s --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
GIT = git
@@ -102,6 +103,12 @@ endif
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
today = $(shell date +%Y-%m-%d)
+
+# Select which lines of NEWS are searched for $(news-check-regexp).
+# This is a sed line number spec. The default says that we search
+# lines 1..10 of NEWS for $(news-check-regexp).
+# If you want to search only line 3 or only lines 20-22, use "3" or "20,22".
+news-check-lines-spec ?= 1,10
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
# Prevent programs like 'sort' from considering distinct strings to be equal.
@@ -187,11 +194,11 @@ syntax-check: $(local-check)
# By default, _sc_search_regexp does not ignore case.
export ignore_case =
-_ignore_case = $$(test -n "$$ignore_case" && echo -i || :)
+_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
define _sc_say_and_exit
dummy=; : so we do not need a semicolon before each use; \
- { echo -e "$(ME): $$msg" 1>&2; exit 1; };
+ { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
endef
# _sc_search_regexp used to be named _prohibit_regexp. However,
@@ -688,7 +695,8 @@ define def_sym_regex
perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
- | sed 's/^/^ *# *define /;s/$$/\\>/'
+ | grep -Ev '^ATTRIBUTE_NORETURN' \
+ | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/'
endef
# Don't define macros that we already get from gnulib header files.
@@ -697,7 +705,7 @@ sc_prohibit_always-defined_macros:
case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \
echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
esac; \
- $(def_sym_regex) | grep -f - $$($(VC_LIST_EXCEPT)) \
+ $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \
&& { echo '$(ME): define the above via some gnulib .h file' \
1>&2; exit 1; } || :; \
fi
@@ -872,8 +880,8 @@ sc_makefile_at_at_check:
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
- if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
- >/dev/null; then \
+ if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \
+ | grep -E $(news-check-regexp) >/dev/null; then \
:; \
else \
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \