> Technically %define and %global can appear anywhere at all in the spec, not
> just beginning of line
OK, true. One example: `%{!?foo:%define foo ...}` For some reason, this didn't
occur to me, sigh...
In that case, I agree it doesn't make sense to specifically handle the
"beginning of line" case only. That's not a systemic solution, just a band-aid.
> Another twist is that unlike %define, the body of the %global is expanded at
> the time of definition, which means that a %global macro defined in the spec
> itself with an %if is always broken (wrt the %if in spec context).
Wait, isn't the distinction between those two macros about the time their
*bodies* get expanded? I mean, both macros *are* expanded at definition time,
it's just that the body of a `%define` is itself only expanded when actually
used, right? Just to re-iterate - expanding a `%define` or `%global` macro
means introducing the macro that's being defined into the respective (local or
global) namespace.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1343#issuecomment-679928150
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint