aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArun Isaac2022-02-21 13:01:26 +0530
committerArun Isaac2022-02-28 17:41:08 +0530
commit268d8f822e7bc5dceeac73046a31e15c9c9b5934 (patch)
treee93c0bea9f57737213f6ffc6bce9d69b51335c84 /Makefile
parent30bb755d584e612dfddf38494e6305fb98aad6f0 (diff)
downloadguix-forge-268d8f822e7bc5dceeac73046a31e15c9c9b5934.tar.gz
guix-forge-268d8f822e7bc5dceeac73046a31e15c9c9b5934.tar.lz
guix-forge-268d8f822e7bc5dceeac73046a31e15c9c9b5934.zip
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 28 insertions, 2 deletions
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 <https://www.gnu.org/licenses/>.
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)