X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=606d42ed18d503a18d6d228fbbf9a73974a6d82f;hb=05ead8cea3cf9ff3d0f6ec50df0e177880d31aa8;hp=f8923048d0aa46ec8f774631cee66ab4483b3500;hpb=807533b8c9cec5320db9cf7e0746d229bd0700a6;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index f8923048d..606d42ed1 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -292,10 +292,10 @@ sc_prohibit_atoi_atof: # Use STREQ rather than comparing strcmp == 0, or != 0. sc_prohibit_strcmp: - @grep -nE '! *str''cmp *\(|\&2; exit 1; } || : # Pass EXIT_*, not number, to usage, exit, and error (when exiting) @@ -571,6 +571,13 @@ sc_prohibit_intprops_without_use: re='\<($(_intprops_syms_re)) *\(' \ $(_sc_header_without_use) +_stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t +# Prohibit the inclusion of stddef.h without an actual use. +sc_prohibit_stddef_without_use: + @h='' \ + re='\<($(_stddef_syms_re)) *\(' \ + $(_sc_header_without_use) + sc_obsolete_symbols: @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ halt='do not use HAVE''_FCNTL_H or O'_NDELAY \ @@ -1125,14 +1132,23 @@ submodule-checks ?= no-submodule-changes public-submodule-commit # 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)"' \ + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + cd $(srcdir) && \ + git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \ + = '$$(git merge-base origin $$sha1)' \ || { echo '$(ME): found non-public submodule commit' >&2; \ exit 1; }; \ else \ : ; \ fi +# This rule has a high enough utility/cost ratio that it should be a +# dependent of "check" by default. However, some of us do occasionally +# commit a temporary change that deliberately points to a non-public +# submodule commit, and want to be able to use rules like "make check". +# In that case, run e.g., "make check gl_public_submodule_commit=" +# to disable this test. +gl_public_submodule_commit ?= public-submodule-commit +check: $(gl_public_submodule_commit) .PHONY: alpha beta stable ALL_RECURSIVE_TARGETS += alpha beta stable