[Vm-dev] running 'configure' command from within Squeak and then loading that config.h into my object...similar work done?

gettimothy gettimothy at zoho.com
Sat Jun 28 00:59:41 UTC 2014


Hi Eliot



Thanks for the reply.




>>Well, if you're doing CMake then you'll want to use whatever CMake uses to generate config.h.  platforms/unix/conf/configure runs automake.


Yeah, its on my list. I don't know what (or if)  cmake uses to generate config.h. Ian's configure script looks like a hand-coded bash script that does in bash what
we are doing in Squeak, the penultimate line in that script reads like this:
 
 cmake "${unix}" -DVM_HOST="${host}" -DVM_VERSION="${VM_VERSION}" -DPLATFORM_SOURCE_VERSION="${PLATFORM_SOURCE_VERSION}" -DSRC="${src}" -DOPT--CMAKE_C_FLAGS="${cflags}" ${args}



I will get to that, but I have bigger fish to fry beforehand. I do believe the problem is solvable in a clean way.


An interim solution hit me on my way to friends house for dinner a while ago.

The VMMakerCMake(Squeak) system generates a 'build.sh' script that reads..







#!/usr/bin/env bash


if [ ! -e vmVersionInfo.h ]; then
 ../scripts/extract-commit-info.sh
fi
cmake .
make


 
What I can do in the interim is utilize the configure line from the mvm files and do ....





#!/usr/bin/env bash


if [ ! -e vmVersionInfo.h ]; then
 ../scripts/extract-commit-info.sh
fi
../../platforms/unix/config/configure --with the flags I store in the configuration class for this configuration/buildType
cmake .
make


 


That is the autoconfig stuff for now.




I will give that a go in the a.m.  Then/if the cmake system has the config.h generation capabilities, I will roll that into the system.


Then, when I have the system in place, I can study what Ian is doing and modify the script to something like




#!/usr/bin/env bash


if [ ! -e vmVersionInfo.h ]; then
 ../scripts/extract-commit-info.sh
fi
cmake "${unix}" -DVM_HOST="${host}" -DVM_VERSION="${VM_VERSION}" -DPLATFORM_SOURCE_VERSION="${PLATFORM_SOURCE_VERSION}" -DSRC="${src}" -DOPT--CMAKE_C_FLAGS="${cflags}" ${args}
make








cheers.


tty.


P.S. That 

cmake "${unix}" -DVM_HOST="${host}" -DVM_VERSION="${VM_VERSION}" -DPLATFORM_SOURCE_VERSION="${PLATFORM_SOURCE_VERSION}" -DSRC="${src}" -DOPT--CMAKE_C_FLAGS="${cflags}" ${args}


 
command does in fact generate a config.h, so the problem is solvable in principle. I just have a lot of boilerplate heavy lifting to do prior to turning my attention to that line and learning how it interacts with the existing CMakeLists.text.


Thanks for your patience. Sometimes it helps to just talk out loud about a problem.


cheers again.


tty




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140627/dbf909fb/attachment.htm


More information about the Vm-dev mailing list