On Tue, Jul 13, 1999 at 03:26:27 -0700, Simon Marlow wrote:
> > Use `gcc -E -` then.
>
> Good point :-)
nearly..., but we have to use '$CPP -x c-header' which would expand to
'gcc -E -x c-header', otherwise gcc wants to link those temporary *.lpp
files :-(
IMHO '-x c-header' just means to gcc:
"READ MY LIPS: THIS HAS TO BE PREPROCESSED, NOT LINKED"
But afters some more tests, I have to admit that it's worse: in mkdependHS,
$Cpp must be run *with* '-' in '&run_something("... | $Cpp...");'.
In hscpp OTOH, it has to be run *without* dash, because hscpp gets its input
from command line, and else waits forever on stdin...
Nevertheless, this is pretty much straight-forward to me: if there is input
from stdin, one has to use '-', otherwise not...
> We also like to get as clean a cpp as possible - if you go through gcc -E
> you get a whole bunch of symbols defined, and cpp gets passed the -lang-c
> flag (whatever that means, but it looks pretty scary).
also goes away with '-x c-header'
Cheers,
Michael
--
Fog Lamps, n. (see also ->"Idiot Lights"):
Excessively (often obnoxiously) bright lamps mounted on the
fronts of automobiles; used on dry, clear nights to indicate that the
driver's brain is in a fog. -- fortune cookie