[Rpm-maint] [rpm-software-management/rpm] Improve description of conditionals + comments in spec documentation (#830)
Panu Matilainen
notifications at github.com
Mon Sep 9 12:51:06 UTC 2019
pmatilai commented on this pull request.
> +%elifarch, %elifos or %else can be optionally used. Conditionals %endif and
+%else should not be followed by any text. Conditionals may be nested within
+other conditionals.
+
+Conditionals are not macros. It has an interesting consequence (similar as
+the fact that macros get expanded in comments). If a conditional is a part
+of a definition like
+\verbatim
+ %define macro_with_if \
+ %if 0 \
+ %global output XXX\
+ %endif
+\endverbatim
+the expansion (including %global) occurs before evaluating of the
+conditionals. Thus after the expansion of %macro_with_if macro %output
+is defined to XXX.
I don't think this last block belongs here, at least in this detail. Dark corners are often best left undocumented to allow changing if a saner behavior becomes feasible later. I'd condense that into something like:
%if-conditionals are not macros, and are unlikely to yield expected results if used in them.
--
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/830#pullrequestreview-285483065
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190909/3d3e8afa/attachment.html>
More information about the Rpm-maint
mailing list