<p>There has been no way to add comments to multiline macros, and while<br>
spec files technically support #-commenting at beginning of lines, it<br>
does not apply to all sections and causes generation after generation<br>
of packagers to stumble on the same items over and over: macros<br>
are expanded within spec comment lines, which makes commenting multiline<br>
macros such as %configure annoying, comments inteded for scriptlets<br>
end up being in the previous scriptlets body, and numerous other quirks.</p>
<p>This implements the M4-inspired %dnl macro primitive which literally<br>
discards everything until the next newline (or end of string), without<br>
expanding the contents. This allows comments to be used inside multiline<br>
macros and everywhere in spec.</p>
<p>Caveat: in some places such as %description the newline doesn't actually<br>
get discarded but this is a a spec parser issue, not on the macro side.</p>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #158.">Closes</span>: <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="208443994" data-permission-text="Issue title is private" data-url="https://github.com/rpm-software-management/rpm/issues/158" data-hovercard-type="issue" data-hovercard-url="/rpm-software-management/rpm/issues/158/hovercard" href="https://github.com/rpm-software-management/rpm/issues/158">#158</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/rpm-software-management/rpm/pull/753'>https://github.com/rpm-software-management/rpm/pull/753</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Implement %dnl (discard to next line) macro primitive for comment use</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/753/files#diff-0">doc/manual/macros</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/753/files#diff-1">rpmio/macro.c</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/753/files#diff-2">tests/data/macros.testfile</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/753/files#diff-3">tests/rpmmacro.at</a>
    (18)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/753.patch'>https://github.com/rpm-software-management/rpm/pull/753.patch</a></li>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/753.diff'>https://github.com/rpm-software-management/rpm/pull/753.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/753?email_source=notifications&email_token=ADLPZU7H2T6QJN5ZHJ3EIJTP3CZ4PA5CNFSM4HY6SB32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2DGHFA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU3NE7LLSKRUV3Z6RDTP3CZ4PANCNFSM4HY6SB3Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZU6MUEL7GQVAVCPYTCDP3CZ4PA5CNFSM4HY6SB32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2DGHFA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/753?email_source=notifications\u0026email_token=ADLPZU7H2T6QJN5ZHJ3EIJTP3CZ4PA5CNFSM4HY6SB32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2DGHFA",
"url": "https://github.com/rpm-software-management/rpm/pull/753?email_source=notifications\u0026email_token=ADLPZU7H2T6QJN5ZHJ3EIJTP3CZ4PA5CNFSM4HY6SB32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2DGHFA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>