diff options
author | Loïc Hoguin <[email protected]> | 2024-11-21 15:55:37 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-11-22 14:47:20 +0100 |
commit | a6f9a450af99a7a95848dde671de658bb53a43dc (patch) | |
tree | 2852c4760ff7df0ae13a4241d191580712cf919d /.github | |
parent | ebe31ee0d271642fe7e038df150f11c66ab8aa11 (diff) | |
download | erlang.mk-a6f9a450af99a7a95848dde671de658bb53a43dc.tar.gz erlang.mk-a6f9a450af99a7a95848dde671de658bb53a43dc.tar.bz2 erlang.mk-a6f9a450af99a7a95848dde671de658bb53a43dc.zip |
Move templates outside the source .mk files
Templates now no longer use Make variables for substitution
but instead replace strings with their equivalent:
template_name: Corresponds to n=template_name
project_name: Corresponds to $(PROJECT) or in=project_name
This allows defining templates outside of Makefiles. For
example an external plugin could define their templates
in templates/my_template.erl and then have the following
in the included Makefile:
tpl_my_template = $(file < $(THIS)/templates/my_template.erl)
By default the created file will be in src/template_name.erl.
This can be overriden with the tplp_* variable:
tplp_my_template = src/model/my_template.erl
Substitution is applied both to the template contents and
to its path.
In addition, attempting to overwrite an existing file when
creating a template will result in failure.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions