From 2ec786a56c19e2b3eddd3e3340a3b728d28dd5cb Mon Sep 17 00:00:00 2001 From: Lucia Ceionia Date: Sat, 24 Jun 2023 21:42:19 +0000 Subject: [PATCH] Changed Makefile --- .gitignore | 2 +- Makefile | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2d19fc7..35b5e99 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*.html +/html diff --git a/Makefile b/Makefile index 7f2433f..ea345aa 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,26 @@ -%.html: %.md +# Update this for new files +files = perks.html spelllist.html main.html creatures.html\ + magical_items.html calc.html effect.html\ + test.html test.js + + +OUTDIR=html + +LIST=$(addprefix html/, $(files)) + +$(OUTDIR)/%.html: %.md | $(OUTDIR) pandoc $< -f markdown -t html -s -o $@ -ttrpg: perks.html spelllist.html test.html main.html creatures.html magical_items.html calc.html effect.html +$(OUTDIR)/%.js: %.js | $(OUTDIR) + cp $< $@ -all: ttrpg +$(OUTDIR)/%.html: %.html | $(OUTDIR) + cp $< $@ + +all: $(LIST) + +$(OUTDIR): + mkdir -p $(OUTDIR) + +clean: + rm -r $(OUTDIR)