Kernel - Fixes to build info file
authorJohn Hodge <[email protected]>
Mon, 26 Sep 2011 13:25:21 +0000 (21:25 +0800)
committerJohn Hodge <[email protected]>
Mon, 26 Sep 2011 13:25:21 +0000 (21:25 +0800)
Kernel/Makefile
Kernel/include/acess.h

index 14bae50..9d92cbf 100644 (file)
@@ -112,11 +112,12 @@ include/syscalls.h include/syscalls.inc.asm:      syscalls.lst Makefile GenSyscalls.p
 
 Makefile:      ../Makefile.cfg arch/$(ARCHDIR)/Makefile
 
-.PHONY: $(BUILDINFO_SRC) 
-$(BUILDINFO_SRC): 
-       @echo "const char * const gsGitHash = \""`git log -n 1 | head -n 1 | awk '{print $$1}'`"\";" > $@
+$(BUILDINFO_SRC): $(filter-out $(BUILDINFO_OBJ), $(OBJ)) $(MODS) arch/$(ARCHDIR)/link.ld Makefile
+       @echo "#include <acess.h>" > $@
+       @echo "const char gsGitHash[] = \""`git log -n 1 | head -n 1 | awk '{print $$2}'`"\";" >> $@
        @echo "const int giBuildNumber = $(BUILD_NUM);" >> $@
 $(BUILDINFO_OBJ): $(BUILDINFO_SRC)
+       @echo --- CC -o $@
        @$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
 
 # Dependency Files
index d1e0b15..46bd6fa 100644 (file)
@@ -35,7 +35,8 @@ typedef struct sShortSpinlock tShortSpinlock;
 #define EXPAND_STR(x) STR(x)
 
 extern char    __buildnum[];
-#define BUILD_NUM      ((int)&__buildnum)
+#define BUILD_NUM      ((int)(Uint)&__buildnum)
+extern const char gsGitHash[];
 
 #define VER2(major,minor)      ((((major)&0xFF)<<8)|((minor)&0xFF))
 /**

UCC git Repository :: git.ucc.asn.au