Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [PATCH] Build fixes to update build version on incremental builds
From: Bill Napier (napier_at_pobox.com)
Date: 2002-08-29


Basically moved version string define out of main.c and into version.c
and added .PHONY rule in apps/Makefile to rebuild version.o
everytime. This way you "version" from the Info menu always has the
correct information in it, even if you're only doing a incremental
build (with the small sacrafice that builds with no-changes in them
will get re-linked everytime due to the changing version.o)

------- Begin version.c --------
#include "version.h"
char appsversion[]=APPSVERSION;
------- End version.c --------

------- Begin Patch --------
Index: apps/Makefile
===================================================================
RCS file: /cvsroot/rockbox/apps/Makefile,v
retrieving revision 1.25
diff -u -b -r1.25 Makefile
--- apps/Makefile 28 Aug 2002 11:54:40 -0000 1.25
+++ apps/Makefile 29 Aug 2002 20:32:46 -0000
@@ -76,6 +76,8 @@
         $(OBJDIR)/archos.bin $(OBJDIR)/archos.elf $(OBJDIR)/archos.map
         -$(RM) -r $(OBJDIR)/$(DEPS)
 
+.PHONY: version.c
+
 DEPS:=.deps
 DEPDIRS:=$(DEPS) $(DEPS)/recorder
 
Index: apps/main.c
===================================================================
RCS file: /cvsroot/rockbox/apps/main.c,v
retrieving revision 1.52
diff -u -b -r1.52 main.c
--- apps/main.c 16 Aug 2002 14:14:37 -0000 1.52
+++ apps/main.c 29 Aug 2002 20:32:46 -0000
@@ -43,13 +43,9 @@
 #include "backlight.h"
 #include "status.h"
 #include "debug_menu.h"
-#include "version.h"
 #include "sprintf.h"
 #ifdef LOADABLE_FONTS
 #include "unicode.h"
 #endif
-
-
-char appsversion[]=APPSVERSION;
 
 void init(void);
Index: uisimulator/win32/Makefile
===================================================================
RCS file: /cvsroot/rockbox/uisimulator/win32/Makefile,v
retrieving revision 1.13
diff -u -b -r1.13 Makefile
--- uisimulator/win32/Makefile 28 Aug 2002 11:54:41 -0000 1.13
+++ uisimulator/win32/Makefile 29 Aug 2002 20:32:53 -0000
@@ -57,7 +57,7 @@
         mpeg.c powermgmt.c
 
 APPS = main.c tree.c menu.c credits.c main_menu.c\
- playlist.c showtext.c wps.c settings.c status.c
+ playlist.c showtext.c wps.c settings.c status.c version.c
 
 MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c
 
@@ -87,6 +87,8 @@
 distclean: clean
         $(RM) config.cache
 
+.PHONY: $(APPDIR)/version.c
+
 $(OBJDIR)/credits.o: $(APPDIR)/credits.c
         $(CC) $(APPCFLAGS) -c $< -o $@
 
@@ -172,6 +174,9 @@
         $(CC) $(APPCFLAGS) -c $< -o $@
 
 $(OBJDIR)/status.o: $(APPDIR)/status.c
+ $(CC) $(APPCFLAGS) -c $< -o $@
+
+$(OBJDIR)/version.o: $(APPDIR)/version.c
         $(CC) $(APPCFLAGS) -c $< -o $@
 
 $(OBJDIR)/debug.o: $(FIRMWAREDIR)/debug.c

------- End Patch --------

-- 
space for rent



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa