]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Change top-level Makefile to not call Eclipse
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 28 Jul 2014 18:08:47 +0000 (20:08 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 28 Jul 2014 18:08:47 +0000 (20:08 +0200)
Now, when we have the proper Makefiles, it is not necessary to bother
with slow Eclipse.

Makefile

index c9a63166397b3611945f2b11b0d429ae20dd4e54..cfa16d924880b730f16405e17696642459353781 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,51 +1,21 @@
-# This makefile tries to build all RPP projects by calling various
-# Eclipse commands from command line.
-#
-# See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
-# and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
+# This makefile tries to build all RPP projects in this repository.
 
-ECLIPSE=/opt/ti/ccsv5/eclipse/eclipse
+SUBDIRS = Debug POSIX apps/rpp-test-suite/Debug #apps/rpp-test-suite_posix/Debug
 
-WORKSPACE:=$(shell mktemp --dry-run --tmpdir -d rpp-lib-workspace.XXXXXXXXXX)
+subdir-targets = $(SUBDIRS:%=subdir-%)
 
-all:
-       rm -rf $(WORKSPACE)
+all: $(subdir-targets)
 
-lib: rpp-lib.lib
+clean: $(subdir-targets)
 
-clean:
-       rm -rf $(wildcard $(dir $(WORKSPACE))rpp-lib-workspace.*) rpp-lib.lib
-
-.PHONY: rpp-lib.lib
-rpp-lib.lib:
+lib: # Build only the library
        $(MAKE) -C Debug
 
-$(WORKSPACE):
-       mkdir -p $(WORKSPACE)
-
-# Usage: $(call build_ccs,project directory) or
-#       $(call build_ccs,,project name) for project in current directory
-define build_ccs
-all: $(or $2,$(notdir $1))
-$(or $2,$(notdir $1)): $(WORKSPACE)
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(if $1,$(CURDIR)/$1,$(CURDIR))
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(or $2,$(notdir $1))
-# Previous commands do not return non-zero exit code on build failure - invoke make directly to not miss a potential error
-       $(MAKE) -C $(CURDIR)/$1/Debug all
-endef
-
-define build_cdt
-all: $1
-$1: $(WORKSPACE)
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import $(CURDIR)/apps/$1
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build $1
-endef
-
-$(eval $(call build_ccs,,rpp-lib))
-$(eval $(call build_ccs,apps/rpp-test-suite))
-
-$(eval $(call build_cdt,rpp-lib_posix))
-$(eval $(call build_cdt,rpp-test-suite_posix))
-
-ccs-help: $(WORKSPACE)
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.help
+.PHONY: all clean lib
+
+subdir-%:
+       $(MAKE) -C $* $(MAKECMDGOALS)
+
+# TODO
+# test-suite-posix:
+#      $(MAKE) -C apps/rpp-test-suite_posix/Debug