RPM homepage link
Home
Up

  

Re: Macros inside conditional macros aren't substituted ?


Executive summary:

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

  • From: Jeff Johnson <jbj redhat com>
  • To: rpm-list redhat com
  • Subject: Re: Macros inside conditional macros aren't substituted ?
  • Date: Tue, 8 Apr 2003 11:51:19 -0400

On Tue, Apr 08, 2003 at 05:31:21PM +0200, Dag Wieers wrote:
> Hey Jeff,
> 
> On Tue, 8 Apr 2003, Jeff Johnson wrote:
> 
> > On Tue, Apr 08, 2003 at 01:17:50PM +0200, Dag Wieers wrote:
> > > Hi,
> > > 
> > > If I do the following in a SPEC file:
> > > 
> > > 	%{?rh80: %patch -b .bswap32}
> > > 	%{?rh90: %patch -b .bswap32}
> > --------------^ Try deleting.
> 
> Hehe, the funny thing is that in this example a space is too much to get 
> it to work.

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

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

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

> 
> The '#' is simply ignored ;)
> 

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

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

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

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





See also:
    Maximum RPM snapshot

Last updated: Wed, 06 Apr 2005 14:03:17 -0400

 

Back to Top page
Maintained by Owl River Company -- Comments to: rpm editor, please.