From 06865475af04a9350627c1e6b3e801e9f8fb88af Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sun, 20 Jun 2010 23:54:21 +0000 Subject: [PATCH] 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 --- firmware/firmware.make | 7 +++++++ 1 file changed, 7 insertions(+) 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)