feat: seperate config

This commit is contained in:
Daylin Morgan 2023-01-19 14:30:47 -06:00
parent 39289ae67b
commit 0ebf57bd9e
4 changed files with 12 additions and 9 deletions

10
.task.cfg.mk Normal file
View File

@ -0,0 +1,10 @@
define USAGE
{a.style('usage','header')}:\n make <recipe>\n
Turn your {a.style('`Makefile`','b_magenta')} into
the {a.italic}{a.underline}task runner{a.end} you always needed.
See the example output below.\n
endef
EPILOG = \nfor more info: gh.dayl.in/task.mk
PRINT_VARS := VERSION SHELL

View File

@ -73,15 +73,6 @@ info:
task.mk: $(TEMPLATES) generate.py
./generate.py $(VERSION) > task.mk
define USAGE
{a.style('usage','header')}:\n make <recipe>\n
Turn your {a.style('`Makefile`','b_magenta')} into
the {a.italic}{a.underline}task runner{a.end} you always needed.
See the example output below.\n
endef
EPILOG = \nfor more info: gh.dayl.in/task.mk
PRINT_VARS := VERSION SHELL
-include .task.mk
.task.mk: $(TEMPLATES) generate.py
$(call msg,re-jinjaing the local .task.mk)

View File

@ -54,6 +54,7 @@ See this project's `make info` for an example.
## Configuration
You can quickly customize some of the default behavior of `task.mk` by overriding the below variables prior to the `-include .task.mk`.
These can also be included in a seperate file `.task.cfg.mk`.
```make
# ---- [config] ---- #

View File

@ -1,4 +1,5 @@
# ---- [config] ---- #
-include .task.cfg.mk
HEADER_STYLE ?= b_cyan
ACCENT_STYLE ?= b_yellow
PARAMS_STYLE ?= $(ACCENT_STYLE)