From: Jim Meyering Date: Wed, 3 Feb 2010 08:21:02 +0000 (+0100) Subject: maint: teach "make syntax-check" the space-only indentation rule X-Git-Tag: v1.5~106 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ec347e5ed8daee2fe0c34a23fb13633918e99503;p=debian%2Fgzip maint: teach "make syntax-check" the space-only indentation rule * cfg.mk (sc_prohibit_tab_based_indentation): New rule, from coreutils. (sc_prohibit_emacs__indent_tabs_mode__setting): Likewise. * bootstrap: Remove "indent-tabs-mode: nil" directive. * .x-sc_prohibit_tab_based_indentation: New file. --- diff --git a/.x-sc_prohibit_tab_based_indentation b/.x-sc_prohibit_tab_based_indentation new file mode 100644 index 0000000..13276eb --- /dev/null +++ b/.x-sc_prohibit_tab_based_indentation @@ -0,0 +1,3 @@ +(^|/)(GNU)?[Mm]akefile +(^|/)ChangeLog +\.(am|mk)$ diff --git a/bootstrap b/bootstrap index 456b0b2..7136875 100755 --- a/bootstrap +++ b/bootstrap @@ -806,7 +806,3 @@ fi bootstrap_epilogue echo "$0: done. Now you can run './configure'." - -# Local Variables: -# indent-tabs-mode: nil -# End: diff --git a/cfg.mk b/cfg.mk index b8d4644..136c96c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -49,3 +49,15 @@ sc_prohibit_obsolete_HAVE_HEADER_H: update-copyright-env = \ UPDATE_COPYRIGHT_USE_INTERVALS=1 \ UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 + +# Indent only with spaces. +sc_prohibit_tab_based_indentation: + @re='^ * ' \ + msg='TAB in indentation; use only spaces' \ + $(_prohibit_regexp) + +# Don't use "indent-tabs-mode: nil" anymore. No longer needed. +sc_prohibit_emacs__indent_tabs_mode__setting: + @re='^( *[*#] *)?indent-tabs-mode:' \ + msg='use of emacs indent-tabs-mode: setting' \ + $(_prohibit_regexp)