[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:41:01 UTC 2019


pmatilai commented on this pull request.



>  	%endif
 \endverbatim
 
-Conditionals are not macros, thus they can be used in spec files only.
+%ifos is used to control RPM's spec file processing according to the
+build system's operating system.
+
+%if can be used for various purposes. The test can be evaluated based on
+the existence of a macro, like:
+\verbatim
+	%if %{defined with_foo} && %{undefined with_bar}
+\endverbatim
+string comparison:
+\verbatim
+	%if %{optimize_flags} != "none"

To set a good example, for string comparisons it's best to quote both operands.

-- 
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-285477252
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190909/39cbeaee/attachment.html>


More information about the Rpm-maint mailing list