summaryrefslogtreecommitdiff
path: root/tools/check-coding-style.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tools/check-coding-style.mk')
-rw-r--r--tools/check-coding-style.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/check-coding-style.mk b/tools/check-coding-style.mk
new file mode 100644
index 00000000..1499f2f0
--- /dev/null
+++ b/tools/check-coding-style.mk
@@ -0,0 +1,17 @@
+check-local::
+ @fail=0; \
+ if test -n "$(check_misc_sources)"; then \
+ tools_dir=$(top_srcdir)/tools \
+ sh $(top_srcdir)/tools/check-misc.sh \
+ $(check_misc_sources) || fail=1; \
+ fi; \
+ if test -n "$(check_c_sources)"; then \
+ tools_dir=$(top_srcdir)/tools \
+ sh $(top_srcdir)/tools/check-c-style.sh \
+ $(check_c_sources) || fail=1; \
+ fi;\
+ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \
+ exit "$$fail";\
+ else \
+ exit 0;\
+ fi