Mark -

Actually, the yacc portion is all automatic for the Linux build. See 
(about) line 936 in the Makefile.am. The libtool automatically uses the 
version of yacc discovered via the configure.ac file (about line 62).

My intent was to build the cpp file in Linux and store both the ypp and 
generated cpp file in SVN. That way a Windows builder would not be 
dependent on yacc to build hostemu. So as far as I am concerned you can 
leave out the cpp generation step for the Windows build. This is really 
ok since the generated cpp file will hardly change, even between 
releases. The only time it will need to change is if/when we add a new 
host command (which I don't see happening very often, if at all).

David Ashley

On 05/26/2010 01:35 PM, Mark Miesfeld wrote:
> Hi David,
>
> There is currently a problem buiding hostemu on Windows, in non-debug
> mode.  Since I usually always build the debug version I didn't notice
> it until now.  I know how to fix it, but since I don't know yacc, I'm
> not sure if it is the correct way.
>
> When building the debug version there is this relevant output:
>
> Compiling cmdparse.cpp
>       cl /EHsc /nologo /D:_X86_<...>
> C:\work\wc\main\extensions\hostemu\cmdparse.cpp
> cmdparse.cpp
> ./extensions/hostemu/cmdparse.y(224) : warning C4101: 'tktype' :
> unreferenced local variable
> ./extensions/hostemu/cmdparse.y(378) : warning C4018: '<' :
> signed/unsigned mismatch
> C:\work\wc\main\extensions\hostemu\cmdparse.cpp(563) : warning C4102:
> 'yyerrlab' : unreferenced label
> c:\work\wc\main\extensions\hostemu\cmdparse.y(289) : warning C4715:
> 'yylex' : not all control paths return a value
>       lib -machine:X86  -def:C:\work\wc\main\platform\windows\hostemu.def
>               C:\work\wc\main\Win32Dbg\hostemu.obj
> C:\work\wc\main\Win32Dbg\cmdparse.obj
> -out:C:\work\wc\main\Win32Dbg\hostemu.lib
> Microsoft (R) Library Manager Version 9.00.30729.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>     Creating library C:\work\wc\main\Win32Dbg\hostemu.lib and object
> C:\work\wc\main\Win32Dbg\hostemu.exp
>
> and it is built.
>
> When buiding the release version, there is this relevant output:
>
> Compiling cmdparse.cpp
>       cl /EHsc /nologo /D:_X86_<...>  
> C:\work\wc\main\extensions\hostemu\cmdparse.cpp
> cmdparse.cpp
> ./extensions/hostemu/cmdparse.y(224) : warning C4101: 'tktype' :
> unreferenced local variable
> ./extensions/hostemu/cmdparse.y(378) : warning C4018: '<' :
> signed/unsigned mismatch
> C:\work\wc\main\extensions\hostemu\cmdparse.cpp(563) : warning C4102:
> 'yyerrlab' : unreferenced label
> c:\work\wc\main\extensions\hostemu\cmdparse.y(304) : fatal error
> C1083: Cannot open source file:
> 'c:\work\wc\main\extensions\hostemu\cmdparse.y': No such file or
> directory
> NMAKE : fatal error U1077:
> 'C:\Tools\MsVisualStudio.2008\VC\Bin\cl.EXE' : return code '0x1'
> Stop.
>
> So when debug is turned on, it must not hit the offending section,
> with debug turned off, it does.
>
> 'c:\work\wc\main\extensions\hostemu\cmdparse.y': No such file or directory
>
> That is true, there is no such file.  If I rename cmdparse.ypp to
> cmdparse.y then hostemu builds in both modes.
>
> As an alternative, in cmdparse.cpp there is a bunch of line directives like:
>
> #line 2 "./extensions/hostemu/cmdparse.y"
>
> If, in cmdparse.cpp I rename all the cmdparse.y to cmdparse.ypp, then
> both build types build without renaming cmdparse.ypp.
>
> So to sum up, we either need to rename cmdparse.ypp to cmdparse.y, or
> you need to fix the yacc step to output the proper file name in the
> #line directives in cmdparse.cpp, and check in a new cmdparse.cpp.
>
> ================
>
> Separate, but related issue.
>
> In cmdparse.cpp we have this comment:
>
> /*----------------------------------------------------------------------------*/
> /* !!!CAUTION!!!                                                              
> */
> /* Do not edit the cmdparse.cpp file! This file is produced by yacc! You      
> */
> /* should edit the cmdparse.ypp file and regen the changes via make!
>           */
> /*----------------------------------------------------------------------------*/
>
> But, I don't see that you put anything in the unix make to regen
> cmdparse.cpp, and there certainly isn't anything in the Windows make
> file.
>
> yacc is available on Windows, and in fact is on my machine.  If you
> had the yacc command to regen cmdparse.cpp in the unix make, I would
> have given it a shot to try and see if I could recompile cmdparse.ypp
> to output the right file name (cmdparse.ypp) in the line directives in
> cmdparse.cpp.  But since I don't know yacc, I didn't have enough to
> start with.
>
> I don't have any problem with just keeping an up to date cmdparse.cpp
> checked in and compiling cmdparse.ypp outside of the build, but it
> would be nice to document the steps needed if someone does have yacc
> available.
>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>    


------------------------------------------------------------------------------

_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to