2023-04-30 11:12:06 +00:00
|
|
|
SHELL = /bin/sh
|
|
|
|
SOURCES = $(shell find src/ -type f)
|
2023-05-02 11:26:37 +00:00
|
|
|
SITEMAP_INDEX_FILES = $(wildcard src/*/index.gmi)
|
2023-04-30 11:12:06 +00:00
|
|
|
|
2023-05-07 11:51:33 +00:00
|
|
|
all: subdirs \
|
|
|
|
$(SOURCES:src/%.gmi=html/%.html) \
|
|
|
|
$(SOURCES:src/%.gmi=gmi/%.gmi) \
|
|
|
|
gmi/sitemap.gmi \
|
|
|
|
gmi/feed.atom \
|
|
|
|
html/sitemap.html
|
2023-04-30 11:12:06 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf html/* gmi/*
|
|
|
|
|
|
|
|
subdirs:
|
|
|
|
find src -mindepth 1 -type d -printf '%P\0' | xargs -0 -I{} mkdir -p gmi/{} html/{}
|
|
|
|
|
2023-05-08 12:07:48 +00:00
|
|
|
html/%.html: src/%.gmi scripts/html.awk
|
|
|
|
mawk -f scripts/common_functions.awk -f scripts/html.awk -- $< > $@
|
2023-04-30 11:12:06 +00:00
|
|
|
|
2023-05-08 12:07:48 +00:00
|
|
|
gmi/%.gmi: src/%.gmi scripts/gemini.awk
|
|
|
|
mawk -f scripts/common_functions.awk -f scripts/gemini.awk -- $< > $@
|
2023-05-01 03:51:16 +00:00
|
|
|
|
2023-05-08 12:07:48 +00:00
|
|
|
gmi/sitemap.gmi: $(SITEMAP_INDEX_FILES) scripts/sitemap_gmi.awk
|
|
|
|
mawk -f scripts/common_functions.awk -f scripts/sitemap_gmi.awk -- $(SITEMAP_INDEX_FILES) > $@
|
2023-05-01 06:03:48 +00:00
|
|
|
|
2023-05-08 12:07:48 +00:00
|
|
|
html/sitemap.html: $(SITEMAP_INDEX_FILES) scripts/sitemap_html.awk
|
|
|
|
mawk -f scripts/common_functions.awk -f scripts/sitemap_html.awk -- $(SITEMAP_INDEX_FILES) > $@
|
2023-05-03 10:57:57 +00:00
|
|
|
|
2023-05-08 12:07:48 +00:00
|
|
|
gmi/feed.atom: src/feed.ass scripts/feed.awk
|
|
|
|
mawk -f scripts/common_functions.awk -f scripts/feed.awk -- $< > $@
|