]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Put version.h and the needed Makefile to the release zip
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 29 Jan 2015 08:42:02 +0000 (09:42 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 29 Jan 2015 08:49:17 +0000 (09:49 +0100)
This is needed for the compilation to not complain about missing
Makefile.version.

Makefile
rpp-test-sw/Makefile.version

index d75a09e204849f3383f7bb872426872c63828fc3..63148991c9d3402c1c62cb6da3befe4c06f4773b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,10 @@ uncrustify:
 release: $(RELEASE_BASENAME).zip
 
 $(RELEASE_BASENAME):: lib
+       @echo 'Get version from git'
+       mkdir -p $@/rpp-test-sw/Debug
+       $(MAKE) -C $@/rpp-test-sw/Debug -f $(CURDIR)/rpp-test-sw/Makefile.version version.h
+
        mkdir -p $@/rpp-lib/rpp/
        mkdir -p $@/rpp-lib/os/7.0.2_tms570
        mkdir -p $@/rpp-lib/lwip/src
@@ -58,7 +62,5 @@ $(RELEASE_BASENAME):: lib
        cp -r rpp-lib/os/7.0.2_tms570/include $@/rpp-lib/os/7.0.2_tms570/include
        cp -r rpp-lib/lwip/src/include $@/rpp-lib/lwip/src/include
 
-
-
 lib:
        $(MAKE) -C rpp-lib/Release
index c070a2f8cbd4a958c691c135c169141020873168..3d0a10747a8e2c8b53e4801212acaa02ae9b2190 100644 (file)
@@ -13,7 +13,11 @@ endif
 VERSION:=$(shell "$(GIT)" describe)\r
 VERSION:=$(if $(VERSION),$(VERSION),unknown)\r
 \r
+ifneq ($(VERSION),unknown)\r
+# Always update version.h if we are in a git repo. Otherwise create\r
+# the file only if it does not exist.\r
 .PHONY: version.h\r
+endif\r
 \r
 version.h:\r
 ifeq ($(OS),Windows_NT)\r