[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: %if
- From: "Marcus Habermehl (BMH1980)" <bmh1980de yahoo de>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: %if
- Date: Sat, 23 Dec 2006 01:31:28 +0100
Jeff Johnson schrieb:
On 12/17/06, Frank Cusack <fcusack fcusack com> wrote:
Please quote any URL, page#, or spec file where you see '%ifdef' used or
documented. You're probably trying to use a SuSE-specific macro on a
non-SuSE system.
Just for historical accuracy, here's a reference to %ifdef in
/usr/lib/rpm/macros:
Historical? So you mean %ifdes is deprecated?
[reference to %ifdef]
The issue of whether to add %ifdef was discussed at the time build
conditionals
were added to rpm (PLD invented the concept).
It would be possible to create a %ifdef rather easily, but there are
other, and
much harder problems to solve, because %if is not a macro, but rather
a section
marker, that is parsed and handled entirely differently than macros.
Adding a %ifdef construct would only complicate matters because of two
different parsers imho.
The still harder problem is that
Prefix:
parsing is going to add a definition for
%prefix
which is going to be pushed on top of whatever %prefix is configured or
passed from the CLI.
Personally, I solve the whole problem of unifying %prefix and %_prefix
values by doing
Prefix: /usr
%define _prefix %{prefix}
on a per-specfile basis, which achieves the same end goal of unifying
%prefix and %_prefix values without the fuss and muss of testing for
values and existence.
I have solved the problem with
%_prefix {?prefix:%{prefix}}{!?prefix:/usr}
For all other paths like %_sysconfdir I'm using the test command in %().
Okay, it doesn't looks good. But now my life is easier. ;)
Thanks and best regards
Marcus
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]