blob: 1b7187415517cf66f8da21686f560bfce7065334 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# guix-forge --- Guix software forge meta-service
# Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
#
# This file is part of guix-forge.
#
# guix-forge is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# guix-forge is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with guix-forge. If not, see <https://www.gnu.org/licenses/>.
EMACS = emacs
GUILD = guild
SKRIBILO = skribilo
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_snippets = $(wildcard doc/snippets/*.scm)
doc_html = $(doc_sources:.skb=.html)
fonts = $(addprefix $(GUIX_ENVIRONMENT)/share/fonts/web/, charter_regular.woff2)
.PHONY: all html clean
all: ;
%.go: %.scm
$(GUILD) compile -L . -o $@ $<
html: $(doc_html)
$(doc_html): $(doc_sources) $(doc_snippets) $(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/fonts
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 $^ $@
website/fonts: $(fonts)
rm -rf $@
mkdir -p $@
cp -v $^ $@/
clean:
rm -rf $(doc_skribilo_config_go) website/index.html website/manual website/fonts
|