configure: check for build dir when building version res (fix bug #4858)
authorAnuj Mittal
Wed, 13 Nov 2019 10:51:02 +0300
changeset 132411fb1880d5edf
parent 13238 007002587d5d
child 13242 2dfcfd865d4f
configure: check for build dir when building version res (fix bug #4858)
Fixes a race where we try to build version res file in build directory
before it has even been created. Prevents errors like:

/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
mkdir -p -- build
x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
Makefile:692: recipe for target 'build/version.o' failed
make: *** [build/version.o] Error 1
make: *** Waiting for unfinished jobs....
touch build/.created
WARNING: exit code 1 from a shell command.

Extension of fix:
https://hg.libsdl.org/SDL/rev/99d8b18acf8a

Signed-off-by: Anuj Mittal <am.devel@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
configure
configure.ac
     1.1 --- a/configure	Tue Nov 12 17:24:37 2019 -0500
     1.2 +++ b/configure	Wed Nov 13 10:51:02 2019 +0300
     1.3 @@ -25493,7 +25493,7 @@
     1.4  VERSION_DEPENDS=`echo $VERSION_SOURCES`
     1.5  VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
     1.6  VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\
     1.7 -\\$(objects)/\\2.o: \\1/\\2.rc\\\\
     1.8 +\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
     1.9  	\\$(WINDRES) \\$< \\$@,g"`
    1.10  
    1.11  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
     2.1 --- a/configure.ac	Tue Nov 12 17:24:37 2019 -0500
     2.2 +++ b/configure.ac	Wed Nov 13 10:51:02 2019 +0300
     2.3 @@ -4177,7 +4177,7 @@
     2.4  VERSION_DEPENDS=`echo $VERSION_SOURCES`
     2.5  VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
     2.6  VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
     2.7 -\\$(objects)/\\2.o: \\1/\\2.rc\\\\
     2.8 +\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
     2.9  	\\$(WINDRES) \\$< \\$@,g"`
    2.10  
    2.11  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`