[GRASS-dev] Re: writing msys capable grass63 startup script

Moritz Lennert mlennert at club.worldonline.be
Sun May 20 17:03:05 EDT 2007


On Sun, May 20, 2007 15:25, Paul Kelly wrote:
> On Sun, 20 May 2007, Moritz Lennert wrote:
>
>> Hello,
>>
>> After make install under MinGW, the /bin/grass63 script contains:
>>
>> GISBASE=c:/grass/grass-6.3.cvs
>>
>> This does not work when you try to launch GRASS from the msys command
>> line
>> (not via the grass63.bat native win GRASS startup):
>>
>> $ ./grass63
>> ./grass63: /c/grass/bin/c:/grass/grass-6.3.cvs/etc/Init.sh: No such file
>> or dictory
>>
>> The setting should be:
>>
>> GISBASE=/c/grass/grass-6.3.cvs
>
> Hello Moritz
> I don't have time to look at this in detail now but in the GRASS
> Makefiless there are now two variables:
> $(GISBASE) contains the path to GISBASE in the path syntax of the build
> system (i.e. Msys)
> $(RUN_GISBASE) contains the path to GISBASE in the native path syntax of
> the host system.
>
> Maybe you could look at varying some combination of these rather than
> conditionalising things on having Msys installed. E.g. Use $(GISBASE) to
> generate Init.sh while using $(RUN_GISBASE) to generate init.bat or
> something like that.
>

Ths issue is not about Init.sh or Init.bat, but about grass63 and
grass63.bat, i.e. the startup scripts.

Looking at the Makefiles, I don't really see how this would work (but I
admit that I'm not sure I understand everything correctly). The problem is
actually the definition of GISBASE and WINGISBASE in the real-install part
of the Makefile:

        -sed -e "s#^GISBASE.*#GISBASE=${INST_DIR}#"
${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} >
${BIND
IR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}^M

        -sed -e "s#WINGISBASE=.*#WINGISBASE=${INST_DIR}#"
${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.ba
t > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat^M

Both of them use ${INST_DIR}, which is defined in
include/Make/Platform.make as
INST_DIR            = ${prefix}/grass-6.3.cvs

${prefix} is defined during configure as
prefix              = c:/grass


GISBASE in the bin.i686-pc-mingw32 dir is defined as:

/c/grasssrc/grass6/dist.i686-pc-mingw32

so in the "correct" msys syntax, but through the above sed line in the
Makefile it is transformed into native MS Win syntax.

I don't really see how using RUN_GISBASE vs GISBASE will change
anything...It is the prefix variable which needs to be adapted
respectively. But I don't know how.

Moritz






More information about the grass-dev mailing list