build: fix crossruby build by handling empty ac_abs_builddir
ac_abs_builddir can be empty when the build is top-level (not subdirs, and Ruby is usually the case). In such case, the MINIRUBY is expanded to $RUBY -I -r'$(arch)-fake', which interprets -r$(arch)-fake as an argument to -I option. This led to:
Not loading the fake config file
Then not setting CROSS_COMPILING constant during extmk.rb execution
Then misusing cross-compiled ./miniruby instead of baseruby to generate files used in exts.
This commit fixes the issue by handling the empty ac_abs_builddir case properly.
build: fix crossruby build by handling empty
ac_abs_builddirac_abs_builddircan be empty when the build is top-level (notsubdirs, and Ruby is usually the case). In such case, the MINIRUBY is
expanded to
$RUBY -I -r'$(arch)-fake', which interprets-r$(arch)-fakeas an argument to
-Ioption. This led to:CROSS_COMPILINGconstant during extmk.rb execution./minirubyinstead of baseruby to generatefiles used in exts.
This commit fixes the issue by handling the empty
ac_abs_builddircaseproperly.