diff options
| author | EuAndreh <eu@euandre.org> | 2026-05-26 09:43:44 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-05-26 09:43:44 -0300 |
| commit | 94bef68330c09ffb052c7bd881e5d9cd7ba04d32 (patch) | |
| tree | 828f718271de83bc6d4fbafe9806ef56c204c924 /Makefile | |
| parent | meta.capim: Add with :dependencies key (diff) | |
| download | mkwb-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 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -27,7 +27,8 @@ LDLIBS = .in: sed \ - 's:@LIBEXECDIR@:$(LIBEXECDIR):g' \ + -e 's:@LIBEXECDIR@:$(LIBEXECDIR):g' \ + -e 's:@SHAREDIR@:$(SHAREDIR):g' \ < $< > $@ if [ -x $< ]; then chmod +x $@; fi @@ -39,10 +40,14 @@ include deps.mk sources = \ $(libexec.sh) \ src/$(NAME).in \ + src/rules.in \ +share-files = \ + share/$(NAME)/site.mk \ derived-assets = \ src/$(NAME) \ + src/rules \ side-assets = \ @@ -57,7 +62,8 @@ all: $(derived-assets) check-unit: -check-integration: +check-integration: src/$(NAME) + ./tests/integration.sh ## Run all tests. Each test suite is isolated, so that a parallel @@ -79,10 +85,12 @@ install: all mkdir -p \ '$(DESTDIR)$(BINDIR)' \ '$(DESTDIR)$(LIBEXECDIR)' \ + '$(DESTDIR)$(SHAREDIR)/$(NAME)' \ '$(DESTDIR)$(SRCDIR)' \ cp src/$(NAME) '$(DESTDIR)$(BINDIR)' - cp $(libexec.sh) '$(DESTDIR)$(LIBEXECDIR)' + cp $(libexec.sh) src/rules '$(DESTDIR)$(LIBEXECDIR)' + cp $(share-files) '$(DESTDIR)$(SHAREDIR)/$(NAME)' cp $(sources) '$(DESTDIR)$(SRCDIR)' @@ -93,6 +101,7 @@ uninstall: rm -rf \ '$(DESTDIR)$(BINDIR)'/$(NAME) \ '$(DESTDIR)$(LIBEXECDIR)' \ + '$(DESTDIR)$(SHAREDIR)/$(NAME)' \ '$(DESTDIR)$(SRCDIR)' \ |
