[omniORB] #include in .IDL file works incorrectly!!!

Rusty Carruth c1040@azfms.com
Tue, 19 Jan 1999 14:29:08 -0700


> However, I don't have time to deal with this approach now, especially writing
> the script (& having to learn awk, or whatever).  So I'm going to take the Q&D

well, its not THAT hard to make a script:

if the lines you want to remove look like this:

----begin file----
good stuff...;

#line 2 /* the bad stuff */

#debuginfo foo /* more bad stuff */

some good stuff;

#hellothere now /* the last bad thing */
----end of file------


then you could just use a grep (grep is available for windows as
well as unix - go get gnugrep) like this:

cat thefile.c | grep -v '^#(line)|(debuginfo)|(hellothere) ' > theoutputfile.cpp

in fact, you don't really have to put it into your make file if you
don't mind making it manually...  (just have theoutputfile.cpp rely
on your original file - the one you pre process with the c preprocessor
to get 'thefile.c' - but don't tell it how to make it and you'll
get forcefully reminded to update the file when needed ;-)

Or, use m4 instead of the c preprocessor...

rusty