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

Re: Macros get expanded in comments..



Circa 2000-Sep-24 16:54:51 -0400 dixit Mike A. Harris:

: 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'm assuming this relates to the thread with subject "%_initscript?".)

Come to think of it, though, what you probably *really* want to do is
something like this:

  if (/etc/init.d exists and is not a symlink)
    %define _initdir /etc/init.d
  else
    %define _initdir /etc/rc.d/init.d
  endif

and

  if (/etc/rc1.d exists and is not a symlink)
    %define _rcdir /etc
  else
    %define _rcdir /etc/rc.d
  endif

This makes your specfile not depend on what release the build system
thinks it is, but rather what the actual characteristics are, much like
autoconf.  Hence, if you're building on a hybrid system, (such as
Mandrake ;), it still works.

Cheers.

-- 
jim knoble | jmknoble@jmknoble.cx | http://www.jmknoble.cx/





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