[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Macros inside conditional macros aren't substituted ?



On Tue, 8 Apr 2003, Jeff Johnson wrote:

On Tue, Apr 08, 2003 at 05:31:21PM +0200, Dag Wieers wrote:

%patch must start at BOL iirc. Is there other white space?

It is working without the space. But that is not the behaviour I would expect.



> And when you have a line like
> > #%configure


Yes, macros are expanded everywhere, in comments, within quotes, in false
branch of %if, everywhere.

That's what I expect, what I don't expect is that the '#' is lost in the end.



> The '#' is simply ignored ;)
>


By the macro expander, yes, "#" is ignored, it's just another character.

The macro-expander should ignore it, not remove it. Maybe it's not the macro-expander that is removing it, but in the end configure is ran where I would have expected it was still commented out.



> Maybe the way this ought to work should be reconsidered.

Why? The above rules are brutally simple even if not to your expectations.

Because I wouldn't expect a space before a macro would cause the macro-expander to actually NOT expand the macro and leave the space.
(Just as a space before a command in a shell-script would still work)


And I would expect that when a '#' is before a macro, the macro-expander leaves the '#' in place.


Both would be regarded a bug in my book ;) Would you accept a bug-report in Bugzilla for any of these ?


--   dag wieers,  dag@wieers.com,  http://dag.wieers.com/   --
«Any errors in spelling, tact or fact are transmission errors»





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []