Defining macro name as the value of another macro

Fabricio Cannini fcannini at gmail.com
Wed Apr 8 23:12:46 UTC 2015


Hello there

I'm trying to do the above but without success, so I could do something 
like this:

%if %centos
	foo
%else
%if %suse
	bar
%endif
%endif

I've tried using the value of '%_vendor' as the name of a macro with the 
value of '1', like this in '~/.rpmmacros' :

'%{expand:%_vendor} 1'

Or

'%define '%{expand:%_vendor} 1'

In a separate macro file.



Is it possible? If yes, what am I doing wrong?
I've tried in centos 6.5 (rpm 4.8.0) and suse 11.3 (4.4.2.3) .



TIA,
Fabricio


More information about the Rpm-list mailing list