[Fedora-packaging] %{macro} vs. %macro in spec files
Tom Callaway
tcallawa at redhat.com
Wed Apr 24 18:06:26 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/19/2013 05:12 AM, Alexey I. Froloff wrote:
> On Fri, Apr 19, 2013 at 01:00:31PM +0400, Peter Lemenkov wrote:
>> Let's say someone defines a macro "_bindirmacro", and actually
>> starts using it in a spec-files. Then there will be an ambiguity
>> during substituting %_bindirmacro - is this %{_bindir}macro or
>> %{_bindirmacro}? Adding brackets will resolve this.
> %_bindir will never be substituted in %_bindirmacro. Another thing
> that comes to mind is mass greps.
You're right, but someone might think it will. Using the brackets
clears up any ambiguity as to what is the macro and what isn't,
especially in combined strings.
The brackets also allow for more complicated conditional actions.
~tom
==
Fedora Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlF4HxsACgkQPF6ZrZMFQmCrMQCgiE7OEKCIQCQ+czI3Xbir78+e
39wAmgLn6JbLlJ+6rSDI8A50PcKDnWvp
=G6m1
-----END PGP SIGNATURE-----
More information about the packaging
mailing list