tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] tsp_ascii_writer_config.lex compile problem


From: Eric Noulard
Subject: Re: [Tsp-devel] tsp_ascii_writer_config.lex compile problem
Date: Mon, 26 Mar 2007 14:21:23 +0200

2007/3/26, Frederik Deweerdt <address@hidden>:
On Mon, Mar 26, 2007 at 11:59:17AM +0200, Robert de Vries wrote:
> >on my box generated file and in source file are really different.
> >
> Maybe a stupid question, but why is there generated source code in the tree 
in the first place?
> I never put generated code in CVS.
That's a good point. Even though it might be handy to have them in tree
for systems that don't have lex/yacc (or rpcgen BTW),

That's the reason.
Lex/Bison C generated output used to be very portable
so it was convenient to put them in.

Another reason comes from pregenerated rpc_xxx files
which are used on the win32 port. They were generated
on linux box and them patched a little in order to work
with open source oncprc (see tsp/external/ACPLT-ONCRPC/)
we use on Win32 platform which works perfectly besides the
rpcgen command :((

I admit this is ugly but convenient, waiting for a cleaner
way to go :))

we could have some
sort of:
IF(IS_GEN_TOOL_PRESENT)
        #generate files with GEN_TOOL
ELSE(IS_GEN_TOOL_PRESENT)
        #cp files from tree (eg. cp tsp_rpc.h.pregen tsp_rpc.h)
ENDIF(IS_GEN_TOOL_PRESENT)

If nobody has a strong objection, I'll wrap the generated files build
that we have in-tree with the above logic.

That's seems a good scheme to me and would
ease to support both in-source AND out-of-source build.

This could be used for:
   bison/yacc generated files
   flex/lex  generated files
   rpcgen generated files.

I did begin to write CMake macros to wrap
RPC machinery (see grep for ONCRPC_SETUP)
I'd like doing the same for lex and yacc.

You may either
IF (PRESENT)
  ONCRPC_SETUP
ELSE (PRESENT)
  DO_IT_ANOTHER_WAY
ENDIF()

or update the macro to handle the "pregen case".

I did begin MACRO for lex and yacc I give you the files
if you want to go this way. Others files are already in CVS.

tsp/make/*.cmake


--
Erk

Attachment: FindBISON.cmake
Description: Binary data

Attachment: FindFLEX.cmake
Description: Binary data

Attachment: FindLexYacc.cmake
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]