<p dir="ltr">You can take a look at the hidden/Makefile for an example.</p>
<div class="gmail_quote">On Jul 20, 2015 15:38, "Chaoren Lin" <<a href="mailto:chaorenl@google.com">chaorenl@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">chaoren added a comment.<br>
<br>
We're going to need to hard code each of those in the base Makefile (and a copy for //every// rule involving each of those variables). AFAIK, Makefiles don't have pattern matching on variable names. Maybe it'll be more readable if instead of relying on `$(MAKECMDGOALS)` we can explicitly call different Makefiles?<br>
<br>
E.g.,<br>
<br>
Have Makefile.a, Makefile.b, ..., etc each containing the rules for lib_a, lib_b, ..., etc. Then the main Makefile call each of these with `$(MAKE) -f Makefile.X`.<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11367&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=r_VuA-MJilI-7UMfcShQ4rmsaC2keUd1HnIeWNxa4FQ&s=S_jw4QMDvwEzHSMdhLe1JoOLGFPcuMu94Yal-DOTjAA&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11367</a><br>
<br>
<br>
<br>
</blockquote></div>