From: Michal Sojka Date: Tue, 25 Nov 2014 21:44:02 +0000 (+0100) Subject: Add uncrustify target to the toplevel Makefile X-Git-Tag: eaton-0.1-beta~15^2~4 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-test-sw.git/commitdiff_plain/7f54ed07bc8dfaa6ae8488c37f9a1eb8327d19b2 Add uncrustify target to the toplevel Makefile --- diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3b67e28 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.[ch] uncrustify diff --git a/Makefile b/Makefile index d5ab5ed..af67834 100644 --- a/Makefile +++ b/Makefile @@ -25,3 +25,15 @@ $(TMP_WORKSPACE): ccs-help: $(TMP_WORKSPACE) $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.help $(call rmdir,$(TMP_WORKSPACE)) + +UNCRUSTIFY_FILES = $(shell git ls-files|git check-attr --stdin uncrustify|awk -F: '/uncrustify: set$$/ {print $$1}') +define UNCRUSTIFY_ALL +$(foreach i,$(UNCRUSTIFY_FILES),git show HEAD:$i | uncrustify -c rpp-lib/etc/uncrustify.cfg -o $i +) +endef + +# Usage: Run 'make uncrustify' and then 'git add -p' to commit the +# changes you agree with. +uncrustify: + git diff --quiet # Check that the tree is clean + $(UNCRUSTIFY_ALL) diff --git a/rpp-lib b/rpp-lib index 1421295..4f70b51 160000 --- a/rpp-lib +++ b/rpp-lib @@ -1 +1 @@ -Subproject commit 1421295dac56f67cf6860742156598e76406851c +Subproject commit 4f70b517b84800ce7ba1326156ae278c4601a83f diff --git a/rpp-test-sw/cmdproc/.gitattributes b/rpp-test-sw/cmdproc/.gitattributes new file mode 100644 index 0000000..5261dee --- /dev/null +++ b/rpp-test-sw/cmdproc/.gitattributes @@ -0,0 +1,3 @@ +* -uncrustify +*tisci* uncrustify +*tms570* uncrustify