<p></p>
<p><b>@eli-schwartz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2761#discussion_r790346896">doc/meson.build</a>:</p>
<pre style='color:#555'>> +    dep_doxygen = declare_dependency(sources: ['plugins.dox',
+                                               'pluginsignals.c',
+                                               'pluginsymbols.c',
+                                               'stash-example.c',
+                                               'stash-gui-example.c'])
+
+    custom_target('doxygen.stamp',
+                  input: dox,
+                  output: ['doxygen.stamp'],
+                  command: [doxygen, '@INPUT@', '&&', 'touch', '@OUTPUT@'],
+                  depends: libgeany,
+                  build_by_default: true)
+    doxy_xml = custom_target('doxygen-gi.stamp',
+                             input: doxgi,
+                             output: ['doxygen-gi.stamp'],
+                             command: [doxygen, '@INPUT@', '&&', 'touch', '@OUTPUT@'],
</pre>
<p dir="auto">Please do not pass arguments by embedding them inside a shell script. There is no <code>shellquote('@OUTPUT@')</code>, you cannot guarantee it has a shell-safe name like that.</p>
<p dir="auto">Instead, use</p>
<div class="highlight highlight-source-meson"><pre><span class="pl-smi">command</span>: [sh, <span class="pl-s"><span class="pl-pds">'</span>-c<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>doxygen "$1" && touch "$2"<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>_argv0<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>@INPUT@<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>@OUTPUT@<span class="pl-pds">'</span></span>],</pre></div>
<p dir="auto">Which will safely pass the filenames as command line <em>arguments</em>, and allow the shell to reference those filenames using variables, since variables can be safely quoted regardless of their content.</p>
<p dir="auto">This <em>also</em> means that meson has a much more accurate understanding of how to replace those strings.</p>
<p dir="auto">Specifically, you cannot replace both INPUT and OUTPUT in the <em>same</em> string. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="231905801" data-permission-text="Title is private" data-url="https://github.com/mesonbuild/meson/issues/1864" data-hovercard-type="issue" data-hovercard-url="/mesonbuild/meson/issues/1864/hovercard" href="https://github.com/mesonbuild/meson/issues/1864">mesonbuild/meson#1864</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2761#discussion_r790346896">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJYW2KJB6VJ4NOT6BLLUXSFWVANCNFSM4ZDZAFLA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ5ALLP3ADVSXSUBJ7DUXSFWVA5CNFSM4ZDZAFLKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOGNEHUJA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/2761/review/860387876</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2761#discussion_r790346896",
"url": "https://github.com/geany/geany/pull/2761#discussion_r790346896",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>