[Rpm-maint] [rpm-software-management/rpm] Parametric macro arguments are not expanded (#127)

Panu Matilainen notifications at github.com
Fri Aug 18 11:51:06 UTC 2017


```
%define mymacro() \
echo foo\
echo bar
```
...is the line-continuation syntax.

As for the rest, it depends on what you need to do with it. If the arguments are always non-%{nil} then there's nothing you need to do. If arguments can be %{nil} (or otherwise empty), then you have two choices:

1) escape the argument in the *caller*, eg "%sdkbindir %%{nil}". If you need to pass unexpanded macros through several layers of macros as seems to be the case, then you need to escape them at each caller. So in the sdkbindir() case, you'd use %%{1} in the calls to %sdkdir.
2) handle the "missing" argument in the parametric macro (ie callee, instead of caller, basically), by using ?-conditionals.


-- 
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/issues/127#issuecomment-323333471
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170818/c2aa06da/attachment.html>


More information about the Rpm-maint mailing list