<p><b>@benpicco</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11565#discussion_r323860620">Makefile.base</a>:</p>
<pre style='color:#555'>> @@ -52,14 +52,18 @@ ifeq ($(strip $(ASSMSRC))$(NO_AUTO_SRC),)
   ASSMSRC := $(wildcard *.S)
 endif
 
+# include makefile snippets that modify GENSRC here:
+include $(RIOTBASE)/pkg/nanopb/nanopb.inc.mk
</pre>
⬇️ Suggested change
<pre style="color: #555">-include $(RIOTBASE)/pkg/nanopb/nanopb.inc.mk
+# include makefile snippets for packages in $(USEPKG) that modify GENSRC:
+-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.gensrc)
</pre>

<p>This solves two issues:</p>
<ul>
<li>packages don't have to modify <code>Makefile.base</code></li>
<li>if the package is not used, the package Makefile is not included.</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/RIOT-OS/RIOT/pull/11565?email_source=notifications&email_token=ABE7WYD2YGKNACOHQJQ7L6LQJJ333A5CNFSM4HO3NDNKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCESD2MA#pullrequestreview-287587632">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFQTSYCSOFOAA73RXTQJJ333ANCNFSM4HO3NDNA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYBA2WL4G26WZ7WJTOLQJJ333A5CNFSM4HO3NDNKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCESD2MA.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/RIOT-OS/RIOT/pull/11565?email_source=notifications\u0026email_token=ABE7WYD2YGKNACOHQJQ7L6LQJJ333A5CNFSM4HO3NDNKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCESD2MA#pullrequestreview-287587632",
"url": "https://github.com/RIOT-OS/RIOT/pull/11565?email_source=notifications\u0026email_token=ABE7WYD2YGKNACOHQJQ7L6LQJJ333A5CNFSM4HO3NDNKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCESD2MA#pullrequestreview-287587632",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>