-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Fran�ois Pons wrote:
> Buchan Milne <[EMAIL PROTECTED]> writes:
>
>
>>>it should be written:
>>>%define build_foo 0
>>>%{?_with_foo: %{expand: %%global build_foo 1}}
>>> ^^^^^^^^
>>
>>Dump the %expand, it's not necessary:
>>%{?_with_foo: %global build_foo 1}
>
>
> FYI, I used the following to make it work in adiusbadsl :
>
> %{expand:%%define build_modules %(if [[ `/bin/uname -r|sed 's/-.*$//'`
< 2.4.21 ]]; then echo 1; else echo 0; fi)}
> #- how to use the following: rpm --without modules -ba SPECS/...
> %{?_with_modules: %{expand: %%define build_modules 1}}
> %{?_without_modules: %{expand: %%define build_modules 0}}
>
> But I'am not expert, this could be simplfied using %global ?
>
Hmm, if you were using %{expand:} in order to get %build_modules
available in %files (I am not sure about %install, but I think something
besides a straight %define may be necessary), then yes. I haven't used
%expand before, and if I need a macro in %files/%install and it doesn't
make it, I use %global.
Regards,
Buchan
- --
|--------------Another happy Mandrake Club member--------------|
Buchan Milne Mechanical Engineer, Network Manager
Cellphone * Work +27 82 472 2231 * +27 21 8828820x202
Stellenbosch Automotive Engineering http://www.cae.co.za
GPG Key http://ranger.dnsalias.com/bgmilne.asc
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/Tio/rJK6UGDSBKcRAvIqAKCuzwrIo+/RahSs0J5v9ZeADCpWTQCgqHVF
7XsZ9jH4kBbmMIYCbz5zgJ0=
=m5hw
-----END PGP SIGNATURE-----
*****************************************************************
Please click on http://www.cae.co.za/disclaimer.htm to read our
e-mail disclaimer or send an e-mail to [EMAIL PROTECTED] for a copy.
*****************************************************************