From 0ebf57bd9e1a0807de1791ca991fdb2f8a62e941 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 19 Jan 2023 14:30:47 -0600 Subject: [PATCH] feat: seperate config --- .task.cfg.mk | 10 ++++++++++ Makefile | 9 --------- docs/usage.md | 1 + src/config.mk | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .task.cfg.mk diff --git a/.task.cfg.mk b/.task.cfg.mk new file mode 100644 index 0000000..aa0fe0d --- /dev/null +++ b/.task.cfg.mk @@ -0,0 +1,10 @@ +define USAGE +{a.style('usage','header')}:\n make \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 + diff --git a/Makefile b/Makefile index 779a4db..6c59dcb 100644 --- a/Makefile +++ b/Makefile @@ -73,15 +73,6 @@ info: task.mk: $(TEMPLATES) generate.py ./generate.py $(VERSION) > task.mk -define USAGE -{a.style('usage','header')}:\n make \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) diff --git a/docs/usage.md b/docs/usage.md index a796c5a..4c96da4 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -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] ---- # diff --git a/src/config.mk b/src/config.mk index 7485ae8..70630cc 100644 --- a/src/config.mk +++ b/src/config.mk @@ -1,4 +1,5 @@ # ---- [config] ---- # +-include .task.cfg.mk HEADER_STYLE ?= b_cyan ACCENT_STYLE ?= b_yellow PARAMS_STYLE ?= $(ACCENT_STYLE)