You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look in the RPM spec file reference to get details about macros, I only find sparse information. I'm trying to get macros supported correctly. There are different kind of macros and all of them are either undocumented or just mentioned briefly.
%<name|builtin>
%!<name|builtin> # doesn't do anything but is allowed
%?<name|builtin> # defined expression
%!?<name|builtin> # negated defined expression
Macro Expansion
%{<name|builtin>}
%{<name>: ...} # What is the ':' for an operator here? Is it only valid for builtins?
%{?<condition>:<consequence>} # Ternary expression? Normally ternary expressions are <condition> ? <consequence> : <alternative>
%{!?<condition>:<consequence>} # Negated ternary expression
Macro Expressions
%[...] # I have no idea what this does, first time I stumbled upon it.
Macro Shell Expansion
%(...) # Macro expansion allowed inside
Also the macro builtins are not listed!
The text was updated successfully, but these errors were encountered:
cryptomilk
changed the title
Please document macros in the 'Spec file format' manual
Please document the macro syntax in the 'Spec file format' manual
Sep 26, 2024
dmnks
changed the title
Please document the macro syntax in the 'Spec file format' manual
Macro syntax and Spec syntax doc. pages should be interlinked
Oct 1, 2024
We speak about (built-in) macros and their expansion in various parts of
the spec page but never care to actually mention to the reader that
there's a dedicated page on macro syntax. Add a bunch of links where
appropriate, and since one of those places mentions %dnl, also add %dnl
to the macro page (this used to be there, just got missed in the
reformatting commit 015c829).
Fixes: rpm-software-management#3331
dmnks
linked a pull request
Oct 2, 2024
that will
close
this issue
Describe the bug
I'm currently working on a grammar for tree-sitter: tree-sitter-rpmspec
If you look in the RPM spec file reference to get details about macros, I only find sparse information. I'm trying to get macros supported correctly. There are different kind of macros and all of them are either undocumented or just mentioned briefly.
https://rpm-software-management.github.io/rpm/manual/spec.html
Simple Macro Expansion
Macro Expansion
Macro Expressions
Macro Shell Expansion
Also the macro builtins are not listed!
The text was updated successfully, but these errors were encountered: