diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-09-23 21:51:28 +0100 |
---|---|---|
committer | Gerrit Rockbox <gerrit@rockbox.org> | 2016-09-23 23:03:23 +0200 |
commit | 50c1de7092fa75c6c5317ac5338d685191a443c0 (patch) | |
tree | da0b2755e39f3607c45fa26ee10e654f95a22dc5 /firmware/firmware.make | |
parent | 92450a99240f5ab085248af13d67112f38d51b35 (diff) | |
download | rockbox-50c1de7092fa75c6c5317ac5338d685191a443c0.tar.gz rockbox-50c1de7092fa75c6c5317ac5338d685191a443c0.zip |
Fix makefile not rebuilding rbversion.h in some cases
For example when running make VERSION="bla"
Change-Id: I8f8833f0fb200828346ed0a6842a9340e3653932
Diffstat (limited to 'firmware/firmware.make')
-rw-r--r-- | firmware/firmware.make | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/firmware.make b/firmware/firmware.make index 8f8014d82c..3d79837871 100644 --- a/firmware/firmware.make +++ b/firmware/firmware.make | |||
@@ -46,7 +46,10 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h | |||
46 | $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< | 46 | $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< |
47 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ | 47 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ |
48 | 48 | ||
49 | SVNVERSION:=$(shell $(TOOLSDIR)/version.sh $(ROOTDIR)) | 49 | # GNU make (at least) has a bug/feature that exported variable are not available |
50 | # in the shell function (but are in recipe). Thus we need to explicitely pass | ||
51 | # the VERSION environement variable | ||
52 | SVNVERSION:=$(shell VERSION='$(VERSION)' $(TOOLSDIR)/version.sh $(ROOTDIR)) | ||
50 | OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION") | 53 | OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION") |
51 | 54 | ||
52 | ifneq ($(SVNVERSION),$(OLDSVNVERSION)) | 55 | ifneq ($(SVNVERSION),$(OLDSVNVERSION)) |
@@ -54,4 +57,4 @@ ifneq ($(SVNVERSION),$(OLDSVNVERSION)) | |||
54 | endif | 57 | endif |
55 | 58 | ||
56 | $(BUILDDIR)/rbversion.h: | 59 | $(BUILDDIR)/rbversion.h: |
57 | $(call PRINTS,GEN $(@F))$(TOOLSDIR)/genversion.sh $(BUILDDIR) $(TOOLSDIR)/version.sh $(ROOTDIR) | 60 | $(call PRINTS,GEN $(@F))$(TOOLSDIR)/genversion.sh $(BUILDDIR) $(SVNVERSION) |