aboutsummaryrefslogtreecommitdiffstats
path: root/CHANGELOG.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-11-21 15:55:37 +0100
committerLoïc Hoguin <[email protected]>2024-11-22 14:36:39 +0100
commite299e34960cd8968f7a8a9914e47ea83ed9218c2 (patch)
treed63594a5a95d23904b8e95bd68387c66e032df85 /CHANGELOG.asciidoc
parent9376f53f549c05cf692d0e259763049a039e96eb (diff)
downloaderlang.mk-templates.tar.gz
erlang.mk-templates.tar.bz2
erlang.mk-templates.zip
Move templates outside the source .mk filestemplates
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 'CHANGELOG.asciidoc')
-rw-r--r--CHANGELOG.asciidoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 863780e..0261b82 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -43,3 +43,11 @@
without an explicit fetch method). Adding "git"
at the beginning of the dep line is the modern
equivalent.
+
+2024/11/22: Templates no longer use Make variables for
+ substitution. Instead the strings template_name
+ and project_name get replaced by their equivalent.
+ Note that using variables in your own templates
+ should still work, but that this way of doing
+ things is deprecated. This change makes it
+ possible to have templates outside of Makefiles.