[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: %{expand:...} documentation
- From: Michael Jennings <mej kainx org>
- To: rpm-list redhat com
- Subject: Re: %{expand:...} documentation
- Date: Mon, 27 Aug 2007 14:55:25 -0400
On Monday, 27 August 2007, at 20:48:14 (+0200),
Jos Vos wrote:
> Just some excerpts from RHEL5 spec files (some are even used frequently):
>
> %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
This is valid and proper usage, IMHO, because it prevents the subshell
execution (i.e., %(...) expansion) to be invoked every time %{pyver}
is employed in the spec file. I do this too.
> %{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
This seems unnecessary, particularly since we already have %bcond_with
and %bcond_without. But I wouldn't call it gratuitous.
> I think this is an example of proper use (as there is a recursion), right?
>
> %{expand: %%define _includedir %{_includedir}/%{name}}
I believe so, yes.
Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <mej kainx org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"I believe God's grace is so incredible that He saves those who so
much as grunt in His general direction, as long as it is from their
heart." -- Rick Durrance, Youth Pastor, Wilmore UMC (paraphrased)
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]