From: Jim Meyering Date: Fri, 27 Feb 2009 16:32:19 +0000 (+0100) Subject: maint: teach "make syntax-check" the space-only indentation rule X-Git-Tag: v7.6~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1130e181eef518345b9262478f7b0195fe332dd9;p=thirdparty%2Fcoreutils.git maint: teach "make syntax-check" the space-only indentation rule * cfg.mk (sc_prohibit_tab_based_indentation): New rule. * .x-sc_prohibit_tab_based_indentation: New file. * Makefile.am (syntax_check_exceptions): Add file, .x-sc_prohibit_tab_based_indentation. --- diff --git a/.x-sc_prohibit_tab_based_indentation b/.x-sc_prohibit_tab_based_indentation new file mode 100644 index 0000000000..2f5d92120e --- /dev/null +++ b/.x-sc_prohibit_tab_based_indentation @@ -0,0 +1,6 @@ +^GNUMakefile$ +Makefile\.am$ +\.mk$ +^tests/pr/ +ChangeLog.* +^man/help2man$ diff --git a/Makefile.am b/Makefile.am index e6a880d517..57b3e334de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,7 @@ syntax_check_exceptions = \ .x-sc_prohibit_atoi_atof \ .x-sc_prohibit_stat_st_blocks \ .x-sc_prohibit_strcmp \ + .x-sc_prohibit_tab_based_indentation \ .x-sc_require_config_h \ .x-sc_require_config_h_first \ .x-sc_space_tab \ diff --git a/cfg.mk b/cfg.mk index 05dbb39b9f..b63e76b7e8 100644 --- a/cfg.mk +++ b/cfg.mk @@ -206,4 +206,10 @@ sc_strftime_check: rm -f $@-src $@-info; \ fi +# Indent only with spaces. +sc_prohibit_tab_based_indentation: + @re='^ * ' \ + msg='TAB in indentation; use only spaces' \ + $(_prohibit_regexp) + include $(srcdir)/dist-check.mk