1 # This makefile tries to build all RPP projects by calling various
2 # Eclipse commands from command line.
4 # See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
5 # and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
7 include rpp-lib/common.mk
10 $(call rmdir,$(TMP_WORKSPACE))
12 rpp-test-sw: $(TMP_WORKSPACE)
13 $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-test-sw
14 $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-lib
15 $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects rpp-test-sw
16 # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error
17 $(MAKE) -C $(CURDIR)/rpp-test-sw/Debug all
19 define RM_OLD_WORKSPACES
20 $(foreach i,$(wildcard $(TMP_WORKSPACE) $(basename $(TMP_WORKSPACE)).*),$(call rmdir,$(i))
28 $(call mkdir,$(TMP_WORKSPACE))
30 ccs-help: $(TMP_WORKSPACE)
31 $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.help
32 $(call rmdir,$(TMP_WORKSPACE))
34 UNCRUSTIFY_FILES = $(shell git ls-files|git check-attr --stdin uncrustify|awk -F: '/uncrustify: set$$/ {print $$1}')
36 $(foreach i,$(UNCRUSTIFY_FILES),git show HEAD:$i | uncrustify -c rpp-lib/etc/uncrustify.cfg -o $i
40 # Usage: Run 'make uncrustify' and then 'git add -p' to commit the
41 # changes you agree with.
43 git diff --quiet # Check that the tree is clean