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: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Thu, 16 Jun 2011 01:45:43 +0200
Am Freitag, 10. Juni 2011, um 17:48:09 schrieben Sie:
> 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.

It is certainly supposed to be one.

> 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.

I see no chance of something like this being implemented in the forseeable
future. It would also add another point of failure and create an extra burden
of maintenance (viz. how hard it is for me to get the new sequencer to compile
on Windows).

> 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>
>   }%

Yes, this should work (with the "#" as first character on the line).

> 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.

It's a kludge but not a bad one. It means you need to check for vxWorks using
#ifdef, but I think everyone does so anyway. The advantage is that the word
"vxWorks" can be freely used in your program, even as an identifier.

Cheers
Ben

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


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

Navigate by Date:
Prev: Re: AreaDetector: Prosilica camera on different subnet? Bob Gunion
Next: Re: radiation damage to electronics inside accelerator tunnel? 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 
Navigate by Thread:
Prev: Re: Sequencer Preprocessor Build Rules J. Lewis Muir
Next: Re: Sequencer Preprocessor Build Rules Andrew Johnson
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 ·