shithub: rgbds

Download patch

ref: ece9177f5aa641fcc2513715748746ff103f47fa
parent: 8a90d743401999d170ae5e1048bdb54c2d86f9c0
author: ISSOtm <eldredhabert0@gmail.com>
date: Tue Oct 29 20:21:50 EDT 2019

Produce shims to run the test suite on Windows bins via Wine

--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
 rgblink
 rgbfix
 rgbgfx
+rgbshim.sh
 *.o
 *.exe
 .checkpatch-camelcase.*
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,7 @@
 	$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 @@
 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