summaryrefslogtreecommitdiffstats
path: root/firmware/firmware.make
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-06-20 23:54:21 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-06-20 23:54:21 +0000
commit06865475af04a9350627c1e6b3e801e9f8fb88af (patch)
tree7de6ae0570c81344a086de9b4ad6514e03e93e07 /firmware/firmware.make
parent75de4a352ecdf1f6e9aa0f544f85248ed494f35c (diff)
downloadrockbox-06865475af04a9350627c1e6b3e801e9f8fb88af.tar.gz
rockbox-06865475af04a9350627c1e6b3e801e9f8fb88af.tar.bz2
rockbox-06865475af04a9350627c1e6b3e801e9f8fb88af.zip
Add some magic to force make to regenerate version.h properly when the revision changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27000 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/firmware.make')
-rw-r--r--firmware/firmware.make7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/firmware.make b/firmware/firmware.make
index ba2ec7ede2..57c67ce310 100644
--- a/firmware/firmware.make
+++ b/firmware/firmware.make
@@ -44,6 +44,13 @@ $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h
$(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@
+SVNVERSION:=$(shell $(TOOLSDIR)/version.sh)
+OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/version.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION")
+
+ifneq ($(SVNVERSION),$(OLDSVNVERSION))
+.PHONY: $(BUILDDIR)/version.h
+endif
+
$(BUILDDIR)/version.c: $(BUILDDIR)/version.h
$(TOOLSDIR)/genversion.sh c $(BUILDDIR) $(TOOLSDIR)/version.sh $(ROOTDIR)