diff options
author | Piotr Esden-Tempski <piotr@esden.net> | 2013-06-12 05:10:29 +0400 |
---|---|---|
committer | Piotr Esden-Tempski <piotr@esden.net> | 2013-06-12 05:10:29 +0400 |
commit | 48e0f3326b8f23787adb41b6c2192d77f2ef5e08 (patch) | |
tree | 15ea2a31264dc14c45a174dfe4a1b04d6e2f863c /Makefile | |
parent | 230c673a3ed21b60779c35bb2e139e1095c3c8b9 (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-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |