[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Macros get expanded in comments..
- From: Jim Knoble <jmknoble jmknoble cx>
- To: rpm-list redhat com
- Subject: Re: Macros get expanded in comments..
- Date: Sun, 24 Sep 2000 18:04:20 -0400
Circa 2000-Sep-24 16:54:51 -0400 dixit Mike A. Harris:
: I have a spec file which I have a construct like:
:
: %define this that
: #%define this somethingelse
:
: After a bit of hair pulling I found that the commented out macro
: definition is acting as if not commented out after all. Is this
: a bug or a feature? If the latter, how can I get the desired
: operation?
It's a side effect of the organic evolution of RPM. Macros definitions
are parsed very early in the specfile grokking process; hence, straight
commenting doesn't work.
What you want to do is:
%define this that
#%%define this somethingelse
^^^\
\
Note the extra '%' character.
: In english, what I'm _really_ wanting to do is:
:
: if( build_os <= Red Hat 6.2 )
: %define this that
: else
: %define this somethingelse
: fi
:
:
: I have no idea how to state that in the spec file though, so I
: figured I'd just manually comment out the %define for each build.
There's an incredibly obtuse syntax for doing if/else definition of
macros based on some criterion. It's not documented anywhere in
/usr/doc/rpm-3.0.5/, and the only place i've ever seen it mentioned is
here on the rpm-list mailing list.
Unfortunately, the archives of rpm-list at:
http://www.redhat.com/mailing-lists/rpm-list/index.html
are out of date (it appears to end on 2000-Aug-02) and don't appear to
be very searchable; the 'Search Mailing Lists' link says "We're sorry!
The page you are looking for has been moved or no longer exists."
Moongroup's archives appear to end sometime in April or May of 2000
(this year):
http://www.moongroup.com/old/rpm.php
though they claim to be searchable. [Time passes...]. Hmm;
Geocrawler's archives appear to be up-to-date and searchable:
http://www.geocrawler.com/lists/3/Red-Hat-Linux/87/0/
Take a look here; it may help:
http://www.geocrawler.com/archives/3/87/1999/10/0/2739078/
(Sigh.) This whole RPM secret-society thing is beginning to bother me.
I must be getting grumpy again....
--
jim knoble | jmknoble@jmknoble.cx | http://www.jmknoble.cx/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]