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

"#include" equivalent in spec files?

Is there any way, in a spec file, to include another spec file snippet, similar to #include in C or source/eval in shell scripts?

My dilemma is this:

I maintain many spec files which need to build on different distributions (RHEL, Fedora, Suse, etc). I have achieved this through a series of custom macros. These macros, which determine the build platform and distribution, are the same across all the spec files. I find myself needing to update those macros from time to time, and would like to avoid changing every single spec file which contains them.

I can get around this by having a comment act as a placeholder in my spec file, and having my build system import the platform detection macros, but I'm hoping there's a way to do it entirely within rpmbuild and the spec file. I played around with something like % (cat /path/to/spec), which seems to correctly import the file, but % define and other macros don't get processed, so that would only be useful for tags.



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