From ece9177f5aa641fcc2513715748746ff103f47fa Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 30 Oct 2019 00:21:50 +0100 Subject: [PATCH] Produce shims to run the test suite on Windows bins via Wine --- .gitignore | 1 + Makefile | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index e3ca6917..4777ffe7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ rgbasm rgblink rgbfix rgbgfx +rgbshim.sh *.o *.exe .checkpatch-camelcase.* diff --git a/Makefile b/Makefile index 2831ba2a..76b376ed 100644 --- a/Makefile +++ b/Makefile @@ -132,6 +132,7 @@ clean: $Q${RM} rgbfix rgbfix.exe $Q${RM} rgbgfx rgbgfx.exe $Qfind src/ -name "*.o" -exec rm {} \; + $Q${RM} rgbshim.sh $Q${RM} src/asm/asmy.c src/asm/asmy.h $Q${RM} src/link/lexer.c src/link/parser.c src/link/parser.h @@ -229,15 +230,19 @@ develop: mingw32: $Qenv PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \ make CC=i686-w64-mingw32-gcc YACC=bison -j - $Qmv rgbasm rgbasm.exe - $Qmv rgblink rgblink.exe - $Qmv rgbfix rgbfix.exe - $Qmv rgbgfx rgbgfx.exe + $Qecho -e '#!/bin/sh\nWINEDEBUG=-all wine $$0.exe "$${@:1}"' > rgbshim.sh + $Qchmod +x rgbshim.sh + $Qln -s rgbshim.sh rgbasm + $Qln -s rgbshim.sh rgblink + $Qln -s rgbshim.sh rgbfix + $Qln -s rgbshim.sh rgbgfx mingw64: $Qenv PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \ make CC=x86_64-w64-mingw32-gcc YACC=bison -j - $Qmv rgbasm rgbasm.exe - $Qmv rgblink rgblink.exe - $Qmv rgbfix rgbfix.exe - $Qmv rgbgfx rgbgfx.exe + $Qecho -e '#!/bin/sh\nWINEDEBUG=-all wine $$0.exe "$${@:1}"' > rgbshim.sh + $Qchmod +x rgbshim.sh + $Qln -s rgbshim.sh rgbasm + $Qln -s rgbshim.sh rgblink + $Qln -s rgbshim.sh rgbfix + $Qln -s rgbshim.sh rgbgfx