summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2011-01-08 10:02:19 +0100
committerSimon Josefsson <simon@josefsson.org>2011-01-08 10:02:19 +0100
commita7e79bbab79811c53aa0aa6ab84c66aa15b1fe17 (patch)
tree0017fd2105e55064c4affcaa0a1c90d0d7cbd243 /maint.mk
parent3f903a1538d8a8835e2ba6f3705ebcdd12349b3e (diff)
downloadlibtasn1-a7e79bbab79811c53aa0aa6ab84c66aa15b1fe17.tar.gz
libtasn1-a7e79bbab79811c53aa0aa6ab84c66aa15b1fe17.tar.bz2
libtasn1-a7e79bbab79811c53aa0aa6ab84c66aa15b1fe17.zip
Update gnulib files.
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk26
1 files changed, 21 insertions, 5 deletions
diff --git a/maint.mk b/maint.mk
index 315b223..ae280f6 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-2010 Free Software Foundation, Inc.
+## Copyright (C) 2001-2011 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
@@ -292,10 +292,10 @@ sc_prohibit_atoi_atof:
# Use STREQ rather than comparing strcmp == 0, or != 0.
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
+ @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
$$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STREQ\(' && \
- { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
+ | grep -vE ':# *define STRN?EQ\(' && \
+ { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
1>&2; exit 1; } || :
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
@@ -1118,9 +1118,25 @@ no-submodule-changes:
: ; \
fi
+submodule-checks ?= no-submodule-changes public-submodule-commit
+
+# Ensure that each sub-module commit we're using is public.
+# Without this, it is too easy to tag and release code that
+# cannot be built from a fresh clone.
+.PHONY: public-submodule-commit
+public-submodule-commit:
+ if test -d $(srcdir)/.git; then \
+ git submodule foreach 'test $$(git rev-parse origin)' \
+ = '"$$(git merge-base --independent origin $$sha1)"' \
+ || { echo '$(ME): found non-public submodule commit' >&2; \
+ exit 1; }; \
+ else \
+ : ; \
+ fi
+
.PHONY: alpha beta stable
ALL_RECURSIVE_TARGETS += alpha beta stable
-alpha beta stable: $(local-check) writable-files no-submodule-changes
+alpha beta stable: $(local-check) writable-files $(submodule-checks)
test $@ = stable \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\