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: Andrew Johnson <[email protected]>
To: "J. Lewis Muir" <[email protected]>
Cc: EPICS tech-talk <[email protected]>, Benjamin Franksen <[email protected]>
Date: Fri, 10 Jun 2011 10:14:15 -0500
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.

> Why does using "vxWorks.h" work when <vxWorks.h> does not?
> Because it thinks "vxWorks.h" is a C string constant and so
> doesn't touch it?

Correct, the pre-processor does not replace tokens inside quoted strings.

> I'm not the biggest fan of using "vxWorks.h".  It's, as you
> said, a workaround.  When I read that, I think the author wrote
> a vxWorks.h header file and wants to include it.

I just worked out how to fix this nicely: Change the definition in Base's 
configure/os/CONFIG.Common.vxWorksCommon to this:
    OP_SYS_CPPFLAGS += -DvxWorks=vxWorks

Works perfectly, and will only break code where someone is using  #if vxWorks  
instead of  #ifdef vxWorks.  Just don't try %%#including a file called CPU.h 
though, I can't fix that one...

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham

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

Navigate by Date:
Prev: driver support for SIS3302 and SIS3305 Hu, Yong
Next: Re: Sequencer Preprocessor Build Rules J. Lewis Muir
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 J. Lewis Muir
Next: Re: Sequencer Preprocessor Build Rules J. Lewis Muir
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 ·