diff options
author | EuAndreh <eu@euandre.org> | 2023-04-05 16:14:00 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-04-05 16:14:00 -0300 |
commit | 24e24b49fb6375189cfa527a113eb965087a293a (patch) | |
tree | fc75f8267a22f6473432ee6b07c4013561c303dc /v2/dynamic.mk | |
parent | v2: Recove h[2-6] anchor link and icon (diff) | |
download | euandre.org-24e24b49fb6375189cfa527a113eb965087a293a.tar.gz euandre.org-24e24b49fb6375189cfa527a113eb965087a293a.tar.xz |
v2: Support Atom feeds and collection translations
Diffstat (limited to 'v2/dynamic.mk')
-rw-r--r-- | v2/dynamic.mk | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/v2/dynamic.mk b/v2/dynamic.mk index b31e269..768ba30 100644 --- a/v2/dynamic.mk +++ b/v2/dynamic.mk @@ -1,6 +1,4 @@ .POSIX: -DOMAIN = euandre.org -EMAIL = eu@euandre.org default: all @@ -8,48 +6,42 @@ default: all include generated.mk - .SUFFIXES: -.SUFFIXES: .in .md .conf .content .html - -.in: - sed \ - -e 's|@DOMAIN@|$(DOMAIN)|g' \ - -e 's|@EMAIL@|$(EMAIL)|g' \ - < $< > $@ - if [ -x $< ]; then chmod +x $@; fi +.SUFFIXES: .md .content .conf .html .xmlentry -.md.conf: - sh src/development/genconf.sh $< > $@ .md.content: awk 'sep >= 2; /^---$$/ {sep++}' < $< > $@ +.md.conf: + conf $< > $@ + .md.html: - sh src/development/genhtml.sh $< > $@ + html $< > $@ +.md.xmlentry: + xmlentry $< > $@ -sed.in-files = \ - src/lib/base-conf \ - src/development/security-txt.sh \ derived-assets = \ $(all-generated) \ - $(sed.in-files) \ - public/favicon.ico \ - + $(feeds) \ -$(all-generated.conf) $(all-generated.content): $(non-content) -$(sed.in-files): dynamic.mk all: public -$(all-generated.conf): src/lib/base-conf + +$(all-generated.conf) $(all-generated.content): $(non-content) +$(all-generated.conf): src/lib/base.conf + +$(all-generated.xml): + feed $@ clean: rm -rf \ public/ $(derived-assets) *.sentinel generated.mk \ - src/content/*.html.*.txt src/content/*/*.html.*.txt + src/content/*/*.html.*.txt src/content/*/*/*.html.*.txt \ + src/content/*/*/*.sortdata src/content/**/feeds/ \ public: $(derived-assets) public-copy-content.sentinel public-copy-code-snippets.sentinel @@ -58,14 +50,10 @@ public-mkdir.sentinel: mkdir -p public touch $@ -public/favicon.ico: public-mkdir.sentinel src/content/favicon.svg - convert src/content/favicon.svg $@ - content = \ $(all-generated.html) \ + $(all-generated.xml) \ $(static-content) \ - src/content/public.asc.txt \ - src/content/.well-known/security.txt \ public-copy-content.sentinel: $(content) public-content-mkdir.sentinel echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ @@ -86,11 +74,15 @@ public-content-mkdir.sentinel: $(content) $(all-generated.snippets) xargs -P`nproc` -I% mkdir -p public/% touch $@ + +src/content/favicon.ico: src/content/favicon.svg + convert src/content/favicon.svg $@ + src/content/public.asc.txt: gpg --armour --export '$(EMAIL)' > $@ -src/content/.well-known/security.txt: src/content/public.asc.txt src/development/security-txt.sh - sh src/development/security-txt.sh > $@ +src/content/.well-known/security.txt: src/content/public.asc.txt src/bin/security-txt + security-txt > $@ @@ -98,7 +90,6 @@ test-files = \ aux/checks/shellcheck.sh \ aux/checks/todos.sh \ -aux/checks/shellcheck.sh: src/lib/base-conf $(test-files): ALWAYS sh $@ |