summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-10-30 11:19:53 -0700
committerBrian Behlendorf <[email protected]>2013-10-30 11:36:30 -0700
commita35beedfb3f25596b4ec9122742c1337083118f5 (patch)
tree9f27922963030e0f6257bc13f636f47c51d92924 /Makefile.am
parent495b25a91a8f29aeec9e2965752a1fc9b9569583 (diff)
Add cstyle.pl utility and cstyle.1 man page
Cstyle is the C source style checker used by Illumos. Since the original ZFS source was written using these style guidelines they must also be followed by ZoL for consistency. The checker has been added to the scripts directory and may be run on a per file basis. New patches should be careful to avoid introducing new style warnings. Additionally, the 'checkstyle' target has been added to the top level Makefile and can be used to check the entire source tree. While Zol has historically attempted to follow the SunOS style guide the lack of a rigorous style checker has allowed various warning to be introduced. Currently there are 2211 reported style violations and we want to gradually eliminate these from the tree. Note the cstyle.1 man page is provided under man/man1/cstyle.1 but since it is a developer utility it is not installed along with the other man pages. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 9c299a9ef..6c808b662 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,9 @@ dist-hook:
sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
$(distdir)/META
+checkstyle:
+ find ${top_srcdir} -name '*.[hc]' -type f -exec scripts/cstyle.pl {} \;
+
ctags:
$(RM) $(top_srcdir)/tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags