<p>In <a href="https://github.com/geany/geany-plugins/pull/277#discussion_r46152993">spellcheck/src/Makefile.rel.am</a>:</p>
<pre style='color:#555'>> +
> +%C%_spellcheck_la_CFLAGS = \
> + $(AM_CFLAGS) \
> + $(ENCHANT_CFLAGS)
> +
> +if HAVE_ENCHANT_1_5
> +%C%_spellcheck_la_CFLAGS += -DHAVE_ENCHANT_1_5
> +endif
> +
> +%C%_spellcheck_la_LIBADD = \
> + $(COMMONLIBS) \
> + $(ENCHANT_LIBS)
> +
> +%C%_spellcheck_la_CPPCHECKFLAGS = \
> + $(AM_CPPCHECKFLAGS) \
> + -DSCE_PAS_DEFAULT=0
</pre>
<p>That's cute, but <code>AM_CPPCHECKFLAGS</code> is not a real Automake variable, and we don't support per-target versions of it. I have no good solution to propose here, but maybe having the cppcheck snippet define plugin-specific targets that get added to check-local, something like</p>
<div class="highlight highlight-source-makefile"><pre><span class="pl-en">check-cppcheck-<span class="pl-s">$(<span class="pl-smi">plugin</span>)</span></span>: <span class="pl-s">$(<span class="pl-smi">something clever</span>)</span> ...
<span class="pl-en">check-local</span>: check-cppcheck-<span class="pl-s">$(<span class="pl-smi">plugin</span>)</span></pre></div>
<p>That'd probably work just fine for both recursive and non-recursive versions, and "only" requires additionally having <code>$(plugin)</code> defined -- but for the <code>$(something clever)</code> part I'm not certain how to handle… maybe defining <code>reldir=%D%</code> in the caller and using that somehow?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany-plugins/pull/277/files#r46152993">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9sn1R3jN1xvoOhODSQ01E_Vcj0Eks5pLFyZgaJpZM4Fg-b2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/geany/geany-plugins/pull/277/files#r46152993"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>