From 22d0289af5d154016e69a69873fa2ebd3bac2c08 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 29 Jan 2015 09:42:02 +0100 Subject: [PATCH] Put version.h and the needed Makefile to the release zip This is needed for the compilation to not complain about missing Makefile.version. --- Makefile | 6 ++++-- rpp-test-sw/Makefile.version | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d75a09e..6314899 100644 --- 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 diff --git a/rpp-test-sw/Makefile.version b/rpp-test-sw/Makefile.version index c070a2f..3d0a107 100644 --- a/rpp-test-sw/Makefile.version +++ b/rpp-test-sw/Makefile.version @@ -13,7 +13,11 @@ endif VERSION:=$(shell "$(GIT)" describe) VERSION:=$(if $(VERSION),$(VERSION),unknown) +ifneq ($(VERSION),unknown) +# Always update version.h if we are in a git repo. Otherwise create +# the file only if it does not exist. .PHONY: version.h +endif version.h: ifeq ($(OS),Windows_NT) -- 2.39.2