]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: teach "make syntax-check" the space-only indentation rule
authorJim Meyering <meyering@redhat.com>
Fri, 27 Feb 2009 16:32:19 +0000 (17:32 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 25 Aug 2009 07:21:00 +0000 (09:21 +0200)
* 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.

.x-sc_prohibit_tab_based_indentation [new file with mode: 0644]
Makefile.am
cfg.mk

diff --git a/.x-sc_prohibit_tab_based_indentation b/.x-sc_prohibit_tab_based_indentation
new file mode 100644 (file)
index 0000000..2f5d921
--- /dev/null
@@ -0,0 +1,6 @@
+^GNUMakefile$
+Makefile\.am$
+\.mk$
+^tests/pr/
+ChangeLog.*
+^man/help2man$
index e6a880d51798e4dbbdf671e874cc894c381d7ed8..57b3e334deaff819d4b752ad494df051b5d43561 100644 (file)
@@ -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 05dbb39b9fb81f1c92456ad19d206cfda5ce3d35..b63e76b7e81b6646c5fdad2bfdddbd65b47ff928 100644 (file)
--- 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