summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2023-01-09 09:59:27 +0200
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commitc39626ec68b0cc5b5efd66aecfaf23992c762467 (patch)
treec1f882b71e160d729b7dfca28949e4f42a9240bd
parentb3f0720413f924019ff2ce53c4d7cb4bca0e6a10 (diff)
downloadrpm-c39626ec68b0cc5b5efd66aecfaf23992c762467.tar.gz
Use proper macro conditional negation syntax in the manual
Historically only %{!?foo} syntax has been used, the reversed ?! version was only introduced in 0d75ef1e0a0609ee61386f02fa311d6d8ac79450 (perhaps accidentally) and should not be used, much less recommended. (cherry picked from commit 7b0b5e7d2cf53817ec5e2545c5f591a26db72cec)
-rw-r--r--docs/manual/macros.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/manual/macros.md b/docs/manual/macros.md
index 14e287e70..ac891b07d 100644
--- a/docs/manual/macros.md
+++ b/docs/manual/macros.md
@@ -121,19 +121,19 @@ Sometimes it is useful to test whether a macro is defined or not. Syntax
```
%{?macro_name:value}
-%{?!macro_name:value}
+%{!?macro_name:value}
```
can be used for this purpose. `%{?macro_name:value}` is expanded to "value"
if "macro_name" is defined, otherwise it is expanded to the empty string.
-`%{?!macro_name:value}` is the negative variant. It is expanded to "value"
+`%{!?macro_name:value}` negates the test. It is expanded to "value"
if `macro_name` is not defined. Otherwise it is expanded to the empty string.
Frequently used conditionally expanded macros are e.g.
Define a macro if it is not defined:
```
-%{?!with_python3: %global with_python3 1}
+%{!?with_python3: %global with_python3 1}
```
A macro that is expanded to 1 if "with_python3" is defined and 0 otherwise: