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

Re: %{expand:...} documentation




On Aug 27, 2007, at 2:26 PM, Jos Vos wrote:

Hi,

Where can I find documentation about how %{expand:...} exactly is
defined and when it is useful?


The macro primitive %{expand:...} is like eval in shell.

All it does is continue a macro expansion from the beginning, not
the end, of whatever was justr expanded.

So if, say, you wanted to define
   %define foo	bing
    %define %{foo} bang
to have the result be
    %bing bang
then this construct accomplishes
%{expand:%%define %{foo} bang}

The 1st pass substitutes "bing" for %{foo}, the second pass
accomplishes the define.

When browsing through spec files, I have the impression that it is
unnecessarily used in a lot of cases.


Likely.

73 de Jeff


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