diff --git a/Makefile b/Makefile index 0b71c42..355f95e 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ all: check .PHONY: clean clobber install uninstall -clean: +clean:: rm -f tests/*/generated/* jqt.1.gz clobber: clean @@ -139,6 +139,22 @@ help: echo ' datadir = /usr/local/share'; \ echo ' mandir = /usr/local/share/man' +######################################################################## +# Generate help text +######################################################################## + +# Independent target: helps generating text for `jqt -h` +# Needs explicit call: `make /tmp/help` +/tmp/help: docs/content/help.text + $(info ==> $@) + jqt -P MarkDown -Idocs < $< \ + | pandoc --from markdown --to plain - \ + | sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \ + > $@ + +clean:: + @rm -f /tmp/help + ######################################################################## # Tests ######################################################################## diff --git a/docs/Makefile b/docs/Makefile index a86b4bf..5f2811c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -125,7 +125,7 @@ include make.d/tools.make # ====================================================================== ######################################################################## -include project.make +include config.make # # Project specific makefile. All the previous modules are expected to be # independent, valid for any project without any change. diff --git a/docs/project.make b/docs/config.make similarity index 77% rename from docs/project.make rename to docs/config.make index 1baa83c..4998a42 100644 --- a/docs/project.make +++ b/docs/config.make @@ -67,20 +67,4 @@ clean:: clobber:: @rm -f $(ManPage) -######################################################################## -# Generate help text -######################################################################## - -# Independent target: helps generating text for `jqt -h` -# Needs explicit call: `make /tmp/help` -/tmp/help: $(Content)/help.text - $(info ==> $@) - @jqt -P MarkDown -I$(Content) < $< \ - | pandoc --from markdown --to plain - \ - | sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \ - > $@ - -clean:: - @rm -f /tmp/help - # vim:ai:sw=8:ts=8:noet:fileencoding=utf8:syntax=make