EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer Preprocessor Build Rules
From: "J. Lewis Muir" <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: EPICS tech-talk <[email protected]>, Benjamin Franksen <[email protected]>
Date: Fri, 10 Jun 2011 10:48:09 -0500
On 6/10/11 10:14 AM, Andrew Johnson wrote:
> Hi Lewis,
> 
> On 2011-06-09 J. Lewis Muir wrote:
>> My vote would be to fix the preprocessor; it shouldn't do that
>> substitution.
> 
> That means removing $(OP_SYS_CPPFLAGS) from the options passed to the 
> preprocessor when we run it before the SNC.  However anyone who has an  #ifdef 
> vxWorks  that modifies their SNL code when building it for vxWorks isn't going 
> to be very happy with that.

Hi, Andrew.

I still feel it doesn't mean removing $(OP_SYS_CPPFLAGS) from
the options passed to the preprocessor but rather means fixing
the preprocessor itself.  I haven't looked at it, but I'm
guessing the preprocessor is a C preprocessor.  If so, then the
problem is that we're abusing the use of the C preprocessor by
trying to use it on source that is not C; it's SNL.  So, ideally
we would have a preprocessor that could properly preprocess SNL.

My guess is that for this vxWorks.h problem, the C preprocessor
sees a line starting with "%%" and concludes it is not a
preprocessor command, hence the bad substitution; it would
normally understand an include command and know not to
substitute within the angle brackets.  If this is the case, I
think another workaround would be to use the SNL block escape
syntax instead of the single line syntax:

  %{
    #include <vxWorks.h>
  }%

But I haven't tried this.

Anyway, your "-DvxWorks=vxWorks" idea is a reasonable workaround
(but it adds a little confusion due to being nonstandard since
now the value must be vxWorks or else things will break).  The
real problem still remains.  But maybe no one will run into it.

Lewis

Replies:
Re: Sequencer Preprocessor Build Rules Benjamin Franksen
References:
Sequencer Preprocessor Build Rules Andrew Johnson
Re: Sequencer Preprocessor Build Rules J. Lewis Muir
Re: Sequencer Preprocessor Build Rules Andrew Johnson

Navigate by Date:
Prev: Re: Sequencer Preprocessor Build Rules Andrew Johnson
Next: SNS CSS org.csstudio.basic.epics.product John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Sequencer Preprocessor Build Rules Andrew Johnson
Next: Re: Sequencer Preprocessor Build Rules Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·