Не удалось найти связанный шаблон Android .mk в исходном дереве android - PullRequest
0 голосов
/ 09 января 2020

Я читаю android документы по сборке платформы с помощью make-файла gnu (Android .mk) из https://android.googlesource.com/platform/build/+/master/core/build-system.html.

Теперь я столкнулся с проблемой, которую не делал найти связанный пример шаблона?

<h3><a name="templates"/>How to add another component to the build - Android.mk templates</h3>
<p>You have a new library, a new app, or a new executable.  For each of the
common types of modules, there is a corresponding file in the templates
directory.  It will usually be enough to copy one of these, and fill in your
own values.  Some of the more esoteric values are not included in the
templates, but are instead just documented here, as is the documentation
on using custom tools to generate files.</p>
<p>Mostly, you can just look for the TODO comments in the templates and do
what it says.  Please remember to delete the TODO comments when you're done
to keep the files clean.  The templates have minimal documentation in them,
because they're going to be copied, and when that gets stale, the copies just
won't get updated.  So read on...</p>
<h4>Apps</h4>
<p>Use the <code>templates/apps</code> file.</p>
<p>This template is pretty self-explanitory.  See the variables below for more
details.</p>

Как уже упоминалось выше, я предполагаю, что есть нечто, называемое каталогом шаблонов для библиотеки, приложений ... Но я не смог найти это в android исходном дереве .

Может ли кто-нибудь просветить меня?

1 Ответ

0 голосов
/ 10 января 2020

Примеры находятся не в подпапке templates, а в том же каталоге, что и build-system.html:

binary.mk , shared_library.mk, java_library.mk и многие другие.

Примечание : Android переключается с системы сборки на основе Makefile на Soong . Возможно, вы захотите подумать и о переключении.

...