summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-05-26 09:43:44 -0300
committerEuAndreh <eu@euandre.org>2026-05-26 09:43:44 -0300
commit94bef68330c09ffb052c7bd881e5d9cd7ba04d32 (patch)
tree828f718271de83bc6d4fbafe9806ef56c204c924 /src
parentmeta.capim: Add with :dependencies key (diff)
downloadmkwb-94bef68330c09ffb052c7bd881e5d9cd7ba04d32.tar.gz
mkwb-94bef68330c09ffb052c7bd881e5d9cd7ba04d32.tar.xz
Extract canonical site rules into share/mkwb/site.mk
Sites used to copy-paste ~340 lines of suffix rules, derived-asset lists, and recipes (global.conf assembly, sitemap, security.txt, gpg-derived fingerprint/expiry, check-unit-*) into every Makefile. Move all of it into share/mkwb/site.mk, shipped at install time. Add src/rules.in -> `mkwb rules`: prints the absolute path of the shipped site.mk so a site's mkdeps.sh can append it as the last `include` line of deps.mk. The site's own Makefile then needs only an `all:` anchor (to keep it as the default target ahead of deps.mk's first rule) and `include deps.mk`. Also adds tests/resources/{site,expected}/ and tests/integration.sh exercising mkwb htmlbody / links / snippets / sortdata against golden files, with sortdata covering >1 collection and >1 entry per collection to verify per-collection chronological ordering. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/rules.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rules.in b/src/rules.in
new file mode 100755
index 0000000..b998091
--- /dev/null
+++ b/src/rules.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Print the absolute path of the canonical Makefile rules shipped
+# alongside mkwb. Sites consume it with:
+# include $(shell mkwb rules)
+# in their top-level Makefile.
+echo '@SHAREDIR@/mkwb/site.mk'