diff options
author | Jonas Smedegaard <dr@jones.dk> | 2021-06-04 20:21:50 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2021-06-04 20:21:50 +0200 |
commit | 56e96aa6ef4a08184c2e85387d9c1ee52d669ec2 (patch) | |
tree | 86ddeaf9879fe4fe018f3e4a276451addcc43871 /Makefile | |
parent | 29f911b173093cf2037bea03fb49bf5c2c55a7c6 (diff) | |
parent | d2679dcda9fcf6fe518d18befd4c7f146e7e5d51 (diff) |
Merge branch 'master' of xayide.jones.dk:/srv/git/source.redpill.dk/features
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -1,22 +1,18 @@ -# Depends: myrepos git mkdocs w3c-linkchecker libtext-hogan-perl +# Depends: myrepos git mkdocs w3c-linkchecker libconfig-tiny-perl libpath-tiny-perl libtext-hogan-perl libio-prompter-perl -include site.mk domain ?= example.org +eventhost ?= event.$(domain) shellhost ?= shell.$(domain) githost ?= source.$(domain) gitshellhost ?= $(shellhost) matrixhost ?= matrix.$(domain) organisation ?= Example orga contact_sysadmins ?= contact sysadmins +VARIABLES = domain eventhost shellhost githost gitshellhost matrixhost organisation contact_sysadmins -MUSTACHE = cat source/source/USE.md | perl -MText::Hogan::Compiler -0777 -nE '\ - my $$compiler = Text::Hogan::Compiler->new;\ - my $$template = $$compiler->compile($$_);\ - say $$template->render({ \ - domain => "$(domain)", shellhost => "$(shellhost)", githost => "$(githost)", gitshellhost => "$(gitshellhost)", \ - matrixhost => "$(matrixhost)", \ - organisation => "$(organisation)", contact_sysadmins => "$(contact_sysadmins)" })' +MKDOCS_PREP ?= bin/mkdocs-prep.pl all: doc @@ -30,23 +26,24 @@ check: docs: mkdir -p docs find docs -type l -delete - $(MUSTACHE) < README.md > docs/index.md - $(MUSTACHE) < SETUP.md > docs/setup.md + $(MKDOCS_PREP) README.md docs/index.md + $(MKDOCS_PREP) SETUP.md docs/setup.md docs/%: source mkdir -p docs/$* - $(MUSTACHE) < source/$(subst /,-,$*)/README.md > docs/$*/index.md + $(MKDOCS_PREP) source/$(subst /,-,$*)/README.md docs/$*/index.md $(if $(wildcard source/$(subst /,-,$*)/USE.md),\ - $(MUSTACHE) < source/$(subst /,-,$*)/USE.md > docs/$*/use.md) + $(MKDOCS_PREP) source/$(subst /,-,$*)/USE.md docs/$*/use.md) $(if $(wildcard source/$(subst /,-,$*)/ADMIN.md),\ - $(MUSTACHE) < source/$(subst /,-,$*)/ADMIN.md > docs/$*/admin.md) + $(MKDOCS_PREP) source/$(subst /,-,$*)/ADMIN.md docs/$*/admin.md) $(if $(wildcard source/$(subst /,-,$*)/SETUP.md),\ - $(MUSTACHE) < source/$(subst /,-,$*)/SETUP.md > docs/$*/setup.md) + $(MKDOCS_PREP) source/$(subst /,-,$*)/SETUP.md docs/$*/setup.md) $(if $(wildcard source/$(subst /,-,$*)/DEVELOP.md),\ - $(MUSTACHE) < source/$(subst /,-,$*)/DEVELOP.md > docs/$*/devel.md) + $(MKDOCS_PREP) source/$(subst /,-,$*)/DEVELOP.md docs/$*/devel.md) init: mr update + $(if $(wildcard site.mk),,$(foreach v,$(VARIABLES),echo $v = $($v) >> site.mk;)) clean: rm -rf site @@ -54,5 +51,6 @@ clean: distclean: clean rm -rf source + rm -f site.mk .PHONY: all doc check clean distclean |