Re: basic macro definitions

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

 



On Thu, Apr 01, 2004 at 10:50:33AM -0500, Piela, Ben wrote:
> Hello all,
> 
> I was just looking around the /usr/lib/rpm/macros file at some of the
> default macros and I had a question about macro syntax.  
> 
> It seems the RPM_BUILD_DIR environment variable is defined as 
> 
> RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"
> 
> I am having a hard time figuring out what the "u2p" part of that definition
> means.  %_builddir is defined earlier in the file.  Is this the format of a
> conditional macro?  Or is this a builtin macro?  
> 

u2p is a macro primitive that strips the leading part of a URI
(like file://hostname/path) and leaves behind only the path component.

Does nothing at all with normal paths.

> What about the following:
> 
> %___build_shell  %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
> 
> Does this say something along the lines of set %___build_shell to the value
> of %_buildshell if it exists.  If it doesn't exist, set the value to
> /bin/sh?
> 

That's gooky syntax for
	if build shell exists
	    then the value is %{_buildshell}
	    else the value is "/bin/sh"

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@xxxxxxxxxx (jbj@xxxxxxx)
Chapel Hill, NC


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux