summaryrefslogtreecommitdiff
path: root/build-scripts/updaterev.sh
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2011-02-16 02:37:09 -0800
committerSam Lantinga <slouken@libsdl.org>2011-02-16 02:37:09 -0800
commitae3891cb2b5b2ab4e923602f61465f8cba49acea (patch)
tree4fea8bc26b3a0449c0c82b4396797faf9b776518 /build-scripts/updaterev.sh
parentcc83f9b6c02d6e4d1be2eec88d729a661a0699f4 (diff)
downloadsdl-ae3891cb2b5b2ab4e923602f61465f8cba49acea.tar.gz
Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory. You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
Diffstat (limited to 'build-scripts/updaterev.sh')
-rwxr-xr-xbuild-scripts/updaterev.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/build-scripts/updaterev.sh b/build-scripts/updaterev.sh
index 484fd4315..f328b3ef0 100755
--- a/build-scripts/updaterev.sh
+++ b/build-scripts/updaterev.sh
@@ -2,9 +2,10 @@
#
# Generate a header file with the current source revision
+outdir=`pwd`
cd `dirname $0`
srcdir=..
-header=$srcdir/include/SDL_revision.h
+header=$outdir/include/SDL_revision.h
rev=`sh showrev.sh`
if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then