From cc590e1ac807c0b076f1ac408946619cf6d40218 Mon Sep 17 00:00:00 2001
From: dimok321 <15055714+dimok789@users.noreply.github.com>
Date: Sun, 26 Jul 2009 20:58:43 +0000
Subject: [PATCH] *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.
---
Makefile | 4 ++--
gui.pnproj | 2 +-
gui.pnps | 2 +-
source/svnrev.c | 7 +++++++
svnrev.sh | 22 +++++++++++-----------
5 files changed, 22 insertions(+), 15 deletions(-)
create mode 100644 source/svnrev.c
diff --git a/Makefile b/Makefile
index 418cdba1..9ec65392 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/gui.pnproj b/gui.pnproj
index 702c778b..e96873a4 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/gui.pnps b/gui.pnps
index a5e72cd6..09af7bfc 100644
--- a/gui.pnps
+++ b/gui.pnps
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/svnrev.c b/source/svnrev.c
new file mode 100644
index 00000000..510b8f81
--- /dev/null
+++ b/source/svnrev.c
@@ -0,0 +1,7 @@
+#define SVN_REV "649:652M"
+
+const char *GetRev()
+{
+ return SVN_REV;
+}
+
diff --git a/svnrev.sh b/svnrev.sh
index ad79f2f4..8d0b0142 100644
--- a/svnrev.sh
+++ b/svnrev.sh
@@ -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