%if

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

 



Hello people.

Can someone tell me how does %if is working?

I want to define a %if %else query in my /etc/rpm/macros file for %{prefix}.

But rpm --showrc gives me everytime an error about this query.

bmh1980@phobos [~] :) % rpm --showrc | head
error: Macro %else has empty body
error: Macro %endif has empty body
ARCHITECTURE AND OS:
build arch            : i686
compatible build archs: pentium4 pentium3 i686 i586 i486 i386 noarch fat
build os              : Linux
compatible build os's : Linux
install arch          : pentium4
install os            : Linux
compatible archs      : pentium4 pentium3 i686 i586 i486 i386 noarch fat
compatible os's       : Linux

And this is the code from my /etc/rpm/macros file.

%ifdef %{prefix}
   %_prefix            %{prefix}
%else
   %_prefix            /usr
%endif

This is only for testing purpose. If this is working, I want to add macros for sysconfdir and localstatedir depending on the prefix/_prefix macro.

I have searched in the whole max-rpm book and I have readed some spec files from SuSE. As I'm understandig it, my code is right.

But it isn't working. So I'm thinking it isn't right. Can you help me?

Best regards
Marcus

		
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/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