summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-11-17 18:01:46 -0300
committerEuAndreh <eu@euandre.org>2024-11-17 18:33:15 -0300
commitbdcfd72202b1ef58c46a6a503398fda7822771b7 (patch)
treec0945cef1fa653a2d1065c16d00a04d10e7c298b /Makefile
parentMakefile: Adapt code for mkwb-html subcommand (diff)
downloadpapo.im-bdcfd72202b1ef58c46a6a503398fda7822771b7.tar.gz
papo.im-bdcfd72202b1ef58c46a6a503398fda7822771b7.tar.xz
Update to latest mkwb to support multiple collections
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile72
1 files changed, 42 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 7fa49f8..4a2a8cf 100644
--- a/Makefile
+++ b/Makefile
@@ -23,11 +23,11 @@ LDLIBS =
.SUFFIXES:
-.SUFFIXES: .adoc .htmlbody .conf .snippets .html .indexentry .feedentry
-.SUFFIXES: .sortdata .xml
+.SUFFIXES: .adoc .conf .snippets .indexentry .feedentry .sortdata .xml .xmldeps
+.SUFFIXES: .htmlbody .htmlheader .htmlfooter .htmllisting .html
.adoc.conf:
- mkwb conf src/base.conf src/global.conf $< > $@
+ mkwb conf src/global.conf $< > $@
.adoc.htmlbody:
mkwb htmlbody $< > $@
@@ -35,6 +35,15 @@ LDLIBS =
.htmlbody.html:
mkwb html $< > $@
+.conf.htmlheader:
+ mkwb html -H $< > $@
+
+.conf.htmlfooter:
+ mkwb html -F $< > $@
+
+.conf.htmllisting:
+ mkwb indexbody $< > $@
+
.adoc.snippets:
mkwb snippets $< > $@
@@ -53,14 +62,20 @@ all:
include deps.mk
-sources.adoc = $(articles.adoc) $(pages.adoc)
-sources.htmlbody = $(sources.adoc:.adoc=.htmlbody)
-sources.html = $(sources.adoc:.adoc=.html)
-sources.snippets = $(sources.adoc:.adoc=.snippets)
-sources.conf = $(sources.adoc:.adoc=.conf)
-articles.indexentry = $(articles.adoc:.adoc=.indexentry)
-articles.feedentry = $(articles.adoc:.adoc=.feedentry)
-articles.sortdata = $(articles.adoc:.adoc=.sortdata)
+sources.adoc = $(articles.adoc) $(listings.adoc) $(pages.adoc)
+sources.htmlbody = $(sources.adoc:.adoc=.htmlbody)
+sources.html = $(sources.adoc:.adoc=.html)
+sources.snippets = $(sources.adoc:.adoc=.snippets)
+sources.conf = $(sources.adoc:.adoc=.conf)
+articles.indexentry = $(articles.adoc:.adoc=.indexentry)
+articles.feedentry = $(articles.adoc:.adoc=.feedentry)
+articles.sortdata = $(articles.adoc:.adoc=.sortdata)
+listings.htmlheader = $(listings.adoc:.adoc=.htmlheader)
+listings.htmlfooter = $(listings.adoc:.adoc=.htmlfooter)
+listings.htmllisting = $(listings.adoc:.adoc=.htmllisting)
+listings.htmldeps = $(listings.adoc:.adoc=.htmldeps)
+listings.html = $(listings.adoc:.adoc=.html)
+feeds.xmldeps = $(feeds.xml:.xml=.xmldeps)
sources = \
$(sources.adoc) \
@@ -69,7 +84,7 @@ sources = \
contents = \
$(sources.html) \
- src/content/atom.xml \
+ $(feeds.xml) \
static-contents = \
$(images.svg) \
@@ -82,15 +97,20 @@ derived-assets = \
$(sources.snippets) \
$(sources.conf) \
src/global.conf \
- src/combined.conf \
+ $(listings.htmlheader) \
+ $(listings.htmlfooter) \
+ $(listings.htmllisting) \
+ $(listings.htmldeps) \
+ $(feeds.xmldeps) \
$(articles.indexentry) \
$(articles.feedentry) \
$(articles.sortdata) \
side-assets = \
- src/content/*/*/*/*/*.html.*.txt \
- src/content/*.html.*.txt \
- src/*.sortdata \
+ src/collections/*/*/*/*/*.html.*.txt \
+ src/collections/*/index.html.*.txt \
+ src/collections/*/*.sortdata \
+ src/pages/*/*.html.*.txt \
@@ -100,25 +120,17 @@ all: $(derived-assets)
$(derived-assets): Makefile deps.mk
-$(sources.conf): src/global.conf
-$(sources.html): src/headers.txt
+$(sources.conf): src/global.conf src/headers.txt
src/global.conf: src/base.conf
- mkwb conf src/base.conf > $@
-
-src/combined.conf: src/base.conf src/global.conf
- cat src/base.conf src/global.conf > $@
-
-src/content/atom.xml src/content/blog.html: $(articles.sortdata) \
- src/combined.conf
-
-src/content/atom.xml: $(articles.feedentry)
- mkwb feed src/combined.conf $(articles.sortdata) > $@
+ mkwb conf -G src/base.conf > $@
-src/content/blog.html: $(articles.indexentry) src/content/blog.htmlbody
- mkwb indexbody $*.conf $(articles.sortdata) | mkwb html $*.htmlbody > $@
+$(listings.html):
+ cat $*.htmlheader $*.htmllisting $*.htmlbody $*.htmlfooter > $@
+$(feeds.xml):
+ mkwb feed src/global.conf $*.xmldeps > $@
check-unit: