Fix cimpiled ruby library system

This commit is contained in:
2026-07-15 14:44:05 +01:00
parent 1d5acfdc94
commit 12d5815fb6
10 changed files with 40 additions and 31 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ set -e
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
OUTPUT_TMP=$(mktemp)
OUTPUT="$SCRIPT_DIR/../../include/binding/ruby_compiled.h"
OUTPUT="$SCRIPT_DIR/../../app/c/ruby_compiled.h"
if test "$1" = "clean"; then
rm -f "$OUTPUT"
@@ -32,9 +32,9 @@ fi
echo "#ifndef MGEMS_H"
echo "#define MGEMS_H"
xxd -i -n mgems $OUTPUT_TMP \
| sed -e 's/^unsigned char /constexpr unsigned char /' \
-e 's/^unsigned int /constexpr unsigned int /'
| sed -e 's/^unsigned char /unsigned char /' \
-e 's/^unsigned int /unsigned int /'
echo "#endif"
} > "$OUTPUT"
echo "Compiled mgems!"
echo "Compiled mgems!"