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

Re: Macros inside conditional macros aren't substituted ?



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.

> 
> And I start building with --define "rh80 1", the build process exits with:
> 
> 	+ %patch -b .bswap32
> 	/var/tmp/rpm-tmp.22235: line 35: fg: no job control
> 	error: Bad exit status from /var/tmp/rpm-tmp.22235 (%prep)
> 
> As if '%patch -b .bswap32' wasn't substituted. My current work-around is 
> this:
> 
> 	%if %{?rh80:1}%{!?rh80:0}
> 		%patch -b .bswap32
> 	%endif
> 	%if %{?rh90:1}%{!?rh90:0}
> 		%patch -b .bswap32
> 	%endif
> 
> Which is ugly ;)

But works.

73 de Jeff

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





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