Re: rpm macro magic help

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

 




On 01.11.2013 16:07, Dridi Boukelmoune wrote:
On Fri, Nov 1, 2013 at 3:59 PM, Sandro Mani <manisandro@xxxxxxxxx> wrote:
Hi,

I'm trying to do some rpm macro magic:

%define do_build() \
mkdir build_win%{1}_%{2}; \
(cd build_win%{1}_%{2}; \
%{mingw%{1}_qmake_%{2}} 'PREFIX=%{mingw%{1}_prefix}' 'TARGET=quazip-%{2}'
../libquazip; \
%{mingw%{1}_make} %{?_smp_mflags}; \
)\
%{nil}
According to the guidelines you should use %global instead of %define.

Oh right, true.
Problem: when I call i.e. "%do_build 32 qt4", %{mingw%{1}_qmake_%{2}} gets
expanded to %{mingw32_qmake_qt4} but that macro does then not get expanded
to /usr/bin/mingw32-qmake-qt4. So basically it ends up trying to call the
command %{mingw32_qmake_qt4} which does not exist.

So, is there anyway to use macros inside macros and have the resulting thing
correctly expanded? :)
Have you tried the %{expand:...} macro ? I've seen it in the docs but
never actually used it.

Something like %{expand:%%{mingw%{1}_qmake_%{2}}} I suppose.

Yep that did it :)

Sandro
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux