diff options
author | Sam Lantinga <slouken@libsdl.org> | 2011-02-16 02:37:09 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2011-02-16 02:37:09 -0800 |
commit | e0bf2dc643916cbf66c4418ec42dbdfa98ca997e (patch) | |
tree | 226cc57fd8d6abb774cbfcdd6bc845a755b9e542 /build-scripts | |
parent | 20ae4187a4fe9adebee4e5a2b9e0cffb7020deba (diff) |
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.
--HG--
rename : include/SDL_config.h.default => include/SDL_config.h
Diffstat (limited to 'build-scripts')
-rwxr-xr-x | build-scripts/snapshot.sh | 27 | ||||
-rwxr-xr-x | build-scripts/updaterev.sh | 3 |
2 files changed, 2 insertions, 28 deletions
diff --git a/build-scripts/snapshot.sh b/build-scripts/snapshot.sh deleted file mode 100755 index ac7221b8..00000000 --- a/build-scripts/snapshot.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# Generate a current snapshot from source control - -echo "Checking out source" -hg clone http://hg.libsdl.org/SDL || exit $? -(cd SDL && ./autogen.sh && rm -rf autom4te.cache) -sh SDL/build-scripts/updaterev.sh -cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h - -major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \ - sed 's,[^0-9]*\([0-9]*\),\1,'` -minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \ - sed 's,[^0-9]*\([0-9]*\),\1,'` -patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \ - sed 's,[^0-9]*\([0-9]*\),\1,'` -rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \ - sed 's,[^0-9]*\([0-9]*\):.*,\1,'` -path="SDL-$major.$minor.$patch-$rev" - -mv SDL $path -echo $path.tar.gz -tar zcf $path.tar.gz $path -echo $path.zip -rm -f $path.zip -zip -rq $path.zip $path -rm -rf $path diff --git a/build-scripts/updaterev.sh b/build-scripts/updaterev.sh index 484fd431..f328b3ef 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 |