Re: define versus global !?

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

 



On 07/10/2011 03:47 PM, Farkas Levente wrote:
> On 07/05/2011 12:49 AM, Farkas Levente wrote:
>>>>> On Tue, 2011-06-28 at 13:58 +0200, Farkas Levente wrote:
>>>>>> does anybody who can tell me the real reason of why:
>>>>>> ------------------------------------
>>>>>> %define __debug_install_post %{mingw_debug_install_post}
>>>>>> ------------------------------------
>>>>>> works why
>>>>>> ------------------------------------
>>>>>> %global __debug_install_post %{mingw_debug_install_post}
>>>>>> ------------------------------------
>>>>>> not? 
> 
> i find the reason but don't know how to solve. the problem was
> %{?buildsubdir} which is not defined in the header part of the spec file
> just in and after the %setup section. which means it's very hard to
> define any kind of macro for __debug_install_post in the header part
> without know which directory contains the compiled code so where have to
> extract the debug info...
> any tip?
> 

One of the differences between %global and %define is that %define is
lazily expanded, but global is not. Now if you say that buildsubdir
definition isn't available when you are setting __debug_install_post, it
means you need to use lazy expansion. This is probably the reason why
%define works for you but %global doesn't: %global is expanded at
definition time. If you really want to use %global instead of %define,
you could try forcing lazy expansion by escaping %:

%global __debug_install_post %%{mingw_debug_install_post}
                             ^^ force lazy expansion


Hope this helps,
Kalev
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux