*Reverted the svnrev.sh and Makefile because shell needs ../ and needs to be under the else state next to DEPENDS for the command to work.

*Uploaded the svnrev.c back online. It can stay on SVN there is nothing wrong with it :P.
This commit is contained in:
dimok321 2009-07-26 20:58:43 +00:00
parent 5547e9a2ec
commit cc590e1ac8
5 changed files with 22 additions and 15 deletions

View File

@ -54,9 +54,8 @@ export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
SVNREV := $(shell svnrev.sh)
export CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
export CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
export CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
@ -124,6 +123,7 @@ release:
else
DEPENDS := $(OFILES:.o=.d)
SVNREV := $(shell ../svnrev.sh)
#---------------------------------------------------------------------------------
# main targets

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libwbfs" x="true"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e><e p="gui\source\prompts" x="true"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="true"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="true"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="true"></e></ViewState></pd>
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="true"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="true"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="true"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="true"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="true"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>

7
source/svnrev.c Normal file
View File

@ -0,0 +1,7 @@
#define SVN_REV "649:652M"
const char *GetRev()
{
return SVN_REV;
}

View File

@ -1,20 +1,20 @@
#! /bin/sh
#
a=$(svnversion -n .)
[ -n "$a" ] || a=$(SubWCRev . | tr -d '\n' | sed 's/[^0-9]*[0-9]*[^0-9]*\([0-9]*\).*/\1/')
a=$(svnversion -n ..)
[ -n "$a" ] || a=$(SubWCRev .. | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
[ -f ./source/svnrev.c ] || touch ./source/svnrev.c
[ -f ../source/svnrev.c ] || touch ../source/svnrev.c
b=$(cat ./source/svnrev.c | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
b=$(cat ../source/svnrev.c | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
if [ "$a" != "$b" ]; then
echo '#define SVN_REV "'$a'"' > ./source/svnrev.c
echo '' >> ./source/svnrev.c
echo 'const char *GetRev()' >> ./source/svnrev.c
echo '{ ' >> ./source/svnrev.c
echo ' return SVN_REV;' >> ./source/svnrev.c
echo '}' >> ./source/svnrev.c
echo '' >> ./source/svnrev.c
echo '#define SVN_REV "'$a'"' > ../source/svnrev.c
echo '' >> ../source/svnrev.c
echo 'const char *GetRev()' >> ../source/svnrev.c
echo '{ ' >> ../source/svnrev.c
echo ' return SVN_REV;' >> ../source/svnrev.c
echo '}' >> ../source/svnrev.c
echo '' >> ../source/svnrev.c
echo 'svnrev changed' >&2
fi
echo $a