Re: Macro constructs



You are probably correct.  I assumed that the construct was a RPM
construct, but it could also be handled by the shell.  In the CFLAGS
case, it would appear that is means:
If CFLAGS is not set use %optflags, otherwise use CFLAGS.

Thank you for helping out on this one.  I am carboning to the gnome
packaging project list because this came up in a discussion about the
best way to allow people to set their own CFLAGS when building a RPM.

Thanks.
Peter

On 04 May 2001 13:23:16 -0400, Rich Clark wrote:
> 
> Hey-
> 
> I would guess that it is ksh like parameter expansion.
> 
> >From the bash man page:
> 
> In  each  of  the cases below, word is subject to tilde expansion,
> parameter expan­
> sion, command substitution, and arithmetic expansion.  Bash tests for  a
> parameter
> that  is  unset  or null; omitting the colon results in a test only for a
> parameter
> that is unset.
> 
> ${parameter:-word}
>         Use Default Values.  If parameter is unset or null, the expansion
> of word is
>         substituted.  Otherwise, the value of parameter is substituted.
> 
> Your milage may vary.
> 
> Rich
> 
> 
> Peter Bowen wrote:
> 
> > In the %configure macro that comes with RPM the CFLAGS variable is set
> > using the following line:
> >
> > CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
> >
> > I cannot find any documentation about the ${VARNAME:-%macroname}
> > construct that is used.  Can anyone enlighten me?
> >
> > Thanks.
> > Peter
> >
> > _______________________________________________
> > Rpm-list mailing list
> > Rpm-list redhat com
> > https://listman.redhat.com/mailman/listinfo/rpm-list
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list redhat com
> https://listman.redhat.com/mailman/listinfo/rpm-list





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