<URL: http://bugs.freeciv.org/Ticket/Display.html?id=24159 >

> [EMAIL PROTECTED] - Do 09. Nov 2006, 18:06:34]:
> 
> I'm compiling from SVN head on MinGW + MSYS, under Windows 2000.
> configure.ac contains the following lines:
> 
> dnl export where the datadir is going to be installed
> FC_EXPAND_DIR(FREECIV_DATADIR, "$datadir/freeciv")
> 
> if test x"$MINGW32" = xyes; then
>   DEFAULT_DATA_PATH=".;data;~/.freeciv;$datadir/freeciv"
>  else
>   DEFAULT_DATA_PATH=".:data:~/.freeciv:$datadir/freeciv"
>  fi
> CPPFLAGS="$CPPFLAGS -DDEFAULT_DATA_PATH=\\\"$DEFAULT_DATA_PATH\\\""
> 
> 
> This doesn't work when compiling under a MSYS shell.  It generates 
> errors, saying "data: command not found", "/usr/local/share/freeciv: is 
> a directory" and so forth.  This is because the ; is a statement 
> separator under a MSYS bash shell.  It thinks 3 different commands are 
> being issued.
> 
> A workaround is to eliminate the test for MINGW32:
> 
> dnl if test x"$MINGW32" = xyes; then
> dnl  DEFAULT_DATA_PATH=".;data;~/.freeciv;$datadir/freeciv"
> dnl else
>   DEFAULT_DATA_PATH=".:data:~/.freeciv:$datadir/freeciv"
> dnl fi
> 
> Under a MSYS shell, paths are colon separated.  Windows native paths, on 
> the other hand, are semicolon separated.  The problem in MinGW-land is 
> that build and run shells are often not the same.  People often use MSYS 
> to build and then actually run from a straight Windows command prompt.  
> I don't know where Freeciv actually deals with all this logic.  Perhaps 
> FC_EXPAND_DIR should be rewritten to give native drive letter and 
> backslash paths?  Or perhaps it's a quoting problem, and quotes are not 
> being consumed by MSYS to the amount expected.
> 
> 

this works:

CPPFLAGS="$CPPFLAGS -DDEFAULT_DATA_PATH=\"\\\"$DEFAULT_DATA_PATH\\\"\""


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to