macro expansion problems

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

 



I am trying to define a macro and it seems I do not understand the macro
expansion correctly.

The macro I want to use, uses a variable which is defined later and I
cannot get it right. The following is a short example of what I would
like to do:

%global debug_package %{nil}
%global newname %(eval echo %{extname} | tr [a-z] [A-Z])
%global extname lower
Name: %{extname}
Version: 1
Release: 1
Summary: Summary
License: yes
%description
%{newname}

# rpmspec -q test.spec --parse 
Name: lower
Version: 1
Release: 1
Summary: Summary
License: yes
%description
%{EXTNAME}


I understand the result but I tried many variants with expand to get it
working, but I failed. This is on CentOS 7.

Is it possible to change the value of a variable in a macro with a
variable which is defined later?

		Adrian
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux