From 268d8f822e7bc5dceeac73046a31e15c9c9b5934 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 21 Feb 2022 13:01:26 +0530 Subject: doc: Add manual. * Makefile (GUILD, SKRIBILO, sources, doc_skribilo_config, doc_skribilo_config_go, doc_sources, doc_html): New variables. (%.go, html, $(doc_html), website/manual/dev/en, clean): New targets. (website): Depend on website/manual/dev/en. (.PHONY): Add html and clean targets. * doc/forge.skb, doc/skribilo.scm: New files. --- Makefile | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b4063c4..2fe0dd3 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,37 @@ # along with guix-forge. If not, see . EMACS = emacs +GUILD = guild +SKRIBILO = skribilo -.PHONY: all +sources = $(wildcard forge/*.scm) $(wildcard forge/*/*.scm) +doc_skribilo_config = doc/skribilo.scm +doc_skribilo_config_go = $(doc_skribilo_config:.scm=.go) +doc_sources = doc/forge.skb +doc_html = $(doc_sources:.skb=.html) + +.PHONY: all html clean all: ; -website: website/index.html +%.go: %.scm + $(GUILD) compile -L . -o $@ $< + +html: $(doc_html) + +$(doc_html): $(doc_sources) $(sources) $(doc_skribilo_config_go) + rm -rf $@ + mkdir -p $@ + GUILE_LOAD_PATH=$(CURDIR):$(GUILE_LOAD_PATH) GUILE_LOAD_COMPILED_PATH=$(CURDIR):$(GUILE_LOAD_COMPILED_PATH) $(SKRIBILO) --target=html $< --output=$@/index.html + +website: website/index.html website/manual/dev/en website/index.html: README.org build-aux/build-home-page.el $(EMACS) -Q --batch --load build-aux/build-home-page.el --funcall build-website + +website/manual/dev/en: $(doc_html) + rm -rf $@ + mkdir -p $(dir $@) + cp -vr $^ $@ + +clean: + rm -f $(doc_skribilo_config_go) -- cgit v1.2.3