Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Esden-Tempski <piotr@esden.net>2013-06-12 05:10:29 +0400
committerPiotr Esden-Tempski <piotr@esden.net>2013-06-12 05:10:29 +0400
commit48e0f3326b8f23787adb41b6c2192d77f2ef5e08 (patch)
tree15ea2a31264dc14c45a174dfe4a1b04d6e2f863c /Makefile
parent230c673a3ed21b60779c35bb2e139e1095c3c8b9 (diff)
Added linux kernel checkpatch.pl script and stylecheck target.
To make it easier on everyone to keep a uniform coding style throughout the project we will be using this target to verify our code for complience. Currently a lot of files in the project don't fully follow the coding style. We need to reach that spot over time though. :)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 14e53a51..ceef9652 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@
PREFIX ?= arm-none-eabi
#PREFIX ?= arm-elf
+STYLECHECK := scripts/checkpatch.pl
+STYLECHECKFLAGS := --no-tree -f
+
ifeq ($(DETECT_TOOLCHAIN),)
DESTDIR ?= /usr/local
else
@@ -96,5 +99,12 @@ clean: cleanheaders
@printf " CLEAN doxygen\n"
$(Q)$(MAKE) -C doc clean
-.PHONY: build lib $(LIB_DIRS) install doc clean generatedheaders cleanheaders
+stylecheck:
+ $(Q)for i in `find . -name '*.[ch]'` ; do \
+ if ! grep -q "* It was generated by the irq2nvic_h script." $$i ; then \
+ $(STYLECHECK) $(STYLECHECKFLAGS) $$i || exit $?; \
+ fi ; \
+ done
+
+.PHONY: build lib $(LIB_DIRS) install doc clean generatedheaders cleanheaders stylecheck