From ec347e5ed8daee2fe0c34a23fb13633918e99503 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 3 Feb 2010 09:21:02 +0100 Subject: [PATCH] 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. --- .x-sc_prohibit_tab_based_indentation | 3 +++ bootstrap | 4 ---- cfg.mk | 12 ++++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .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 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) -- 2.47.2