Brian S. Stephan a681bd6d54
more Makefile scaffolding, automate building a website
this isn't the final form of how the web build has to work, by any
means, but I can test with it

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-04-04 08:47:14 -05:00

31 lines
739 B
Makefile

TMPDIR := ./_tmp
CSRD := ./srd/Cypher-System-Reference-Document-2024-09-26.docx
MD_CSRD := $(TMPDIR)/csrd.md
CCSRD := $(TMPDIR)/ccsrd.md
WEBDIR := ./incorporealcms-instance
PAGESDIR := $(TMPDIR)/$(WEBDIR)/pages
all: base-patches
base-patches: $(MD_CSRD)
cp -a $(MD_CSRD) $(CCSRD)
find patches/base -type f -name *.patch -print0 | xargs -0 -n 1 patch $(CCSRD)
web: base-patches
cp -a $(WEBDIR) $(TMPDIR)/
mkdir -p $(PAGESDIR)
cp $(CCSRD) $(PAGESDIR)/index.md
incorporealcms-build $(TMPDIR)/$(WEBDIR) /var/www/localhost/incorporealcms-testing/root
$(MD_CSRD): | $(TMPDIR)
pandoc -f docx -t gfm $(CSRD) -o $(MD_CSRD) --columns 120
$(TMPDIR):
mkdir -p $(TMPDIR)
clean:
rm -rf $(TMPDIR)/ccsrd*
distclean:
rm -rf $(TMPDIR)