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 task.mk: $(TEMPLATES) generate.py
./generate.py $(VERSION) > task.mk ./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 -include .task.mk
.task.mk: $(TEMPLATES) generate.py .task.mk: $(TEMPLATES) generate.py
$(call msg,re-jinjaing the local .task.mk) $(call msg,re-jinjaing the local .task.mk)

View file

@ -54,6 +54,7 @@ See this project's `make info` for an example.
## Configuration ## Configuration
You can quickly customize some of the default behavior of `task.mk` by overriding the below variables prior to the `-include .task.mk`. 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 ```make
# ---- [config] ---- # # ---- [config] ---- #

View file

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