RFC: spec preprocessor

Michal Moskal malekith at pld-linux.org
Tue May 20 23:18:07 CEST 2003


On Tue, May 20, 2003 at 05:07:05PM +0200, Artur Frysiak wrote:
> W liście z wto, 20-05-2003, godz. 15:44, Michal Moskal pisze: 
> > On Tue, May 20, 2003 at 02:59:32PM +0200, Artur Frysiak wrote:
> > Maybe something like:
> > 
> > %define bcond_with()	%{expand:%%{?_with_%{1}:%%define %{1} 1}}
> > %define bcond_without()	%{expand:%%{!?_without_%{1}:%%define %{1} 1}}
> > 
> > And then:
> > 
> > %bcond_with	foo	# foo inc. support
> > %bcond_without	bar	# bar fonts support
> 
> %define bcond_with()	%{expand:%%{?_with_%{1}:%%global %{1} 1}}
> 
> And works.
> 
> Any volunteer to describe this in some documentation and implement in
> /usr/lib/rpm/macros ?

I'm not quite sure, if symbol to be defined should be name of bcond. For
example consider --with patch or --with setup or something like this.

Maybe define with_foo for --with foo or lack of --without foo?

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h



More information about the pld-devel-en mailing list