In regard to: Re: help loading additional macros from file, Paul Nasrat...:
On Tue, 2007-07-03 at 11:54 -0500, Tim Mooney wrote:
All-
I need some macro-fu help. I want to (in a spec file)
- test to see if a particular macro is defined.
- if it's not, I would like to
- source/load a file that has additional macro definitions, making
them available in my spec file.
- for extra credit, if the file doesn't exist, exit with an error.
It looks like I can do the test part with something like
%if %{undefined perl_sitelib}
Does something like this work for you:
%{!?foo: %{expand: %%include /path/to/foo}}
Where /path/to/foo contains a bunch of %global foo bar type definitions,
you can include from the build root or a SourceN too
Yup, works perfectly, even on RHEL 2.1.
Thanks for the tip!
Tim
--
Tim Mooney mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list