mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 16:29:18 +01:00
little changes
This commit is contained in:
parent
46a650feb7
commit
47989619cd
2
Makefile
2
Makefile
@ -54,6 +54,7 @@ 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)))
|
||||
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
@ -123,7 +124,6 @@ release:
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
SVNREV := $(shell ../svnrev.sh)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
|
22
svnrev.sh
22
svnrev.sh
@ -1,20 +1,20 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
a=$(svnversion -n ..)
|
||||
[ -n "$a" ] || a=$(SubWCRev .. | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
||||
a=$(svnversion -n .)
|
||||
[ -n "$a" ] || a=$(SubWCRev . | tr -d '\n' | sed 's/[^0-9]*[0-9]*[^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
|
||||
|
Loading…
Reference in New Issue
Block a user