diff options
author | Ben Pfaff <blp@ovn.org> | 2018-06-04 14:16:40 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-06-11 15:32:01 -0700 |
commit | 7717d233cfdf0b3c59f62cd6bf86e3b4261dcbf8 (patch) | |
tree | 04ed58bfdebfc6a33153f4636680116f92ff8f4f /Makefile.am | |
parent | 5a0e4aec1af5cf7741c490bce704577e51e536b9 (diff) | |
download | openvswitch-7717d233cfdf0b3c59f62cd6bf86e3b4261dcbf8.tar.gz |
Makefile: Add build-time check for files with initial tabs.
This should make it harder to reintroduce inappropriate indentation.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index e34fb3455..e02799a90 100644 --- a/Makefile.am +++ b/Makefile.am @@ -314,6 +314,21 @@ check-echo-n: fi .PHONY: check-echo-n +ALL_LOCAL += check-tabs +check-tabs: + @cd $(srcdir); \ + if test -e .git && (git --version) >/dev/null 2>&1 && \ + grep -ln "^ " \ + `git ls-files \ + | grep -v -f build-aux/initial-tab-whitelist` /dev/null \ + | $(EGREP) -v ':[ ]*/?\*'; \ + then \ + echo "See above for files that use tabs for indentation."; \ + echo "Please use spaces instead."; \ + exit 1; \ + fi +.PHONY: check-tabs + ALL_LOCAL += thread-safety-check thread-safety-check: @cd $(srcdir); \ |