quatuorbellefeuille.com

Content, build scripts and admin scripts for the Bellefeuille Quartet website.
git clone https://git.kevinlegouguec.net/quatuorbellefeuille.com
Log | Files | Refs

commit 03629bb44b541ba63b61c6f03bf3b6a7d34e64ef
parent 697963c5e4f56f871d4364043af450af6b6a2f9d
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Wed, 30 Dec 2020 23:46:44 +0100

Allow changing the build directory

Diffstat:
MMakefile | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,11 +1,13 @@ +OUTDIR = public + pages_src = $(filter-out template.html,$(wildcard *.html)) -pages = $(foreach p,$(pages_src),public/$(p)) +pages = $(foreach p,$(pages_src),$(OUTDIR)/$(p)) sheets = $(wildcard *.css) images = $(wildcard *.svg) feeds = $(wildcard *.xml) resources_src = $(sheets) $(images) $(feeds) -resources = $(foreach f,$(resources_src),public/$(f)) +resources = $(foreach f,$(resources_src),$(OUTDIR)/$(f)) .PHONY: all clean site @@ -14,15 +16,15 @@ all: site site: $(pages) $(resources) -public: +$(OUTDIR): mkdir $@ -$(resources): public/%: % | public +$(resources): $(OUTDIR)/%: % | $(OUTDIR) cp $< $@ # TODO: optional dependency to .sh template parameters. -$(pages): public/%.html: %.html | public +$(pages): $(OUTDIR)/%.html: %.html | $(OUTDIR) ./build.sh $< $@ clean: - -rm -r public + -rm -r $(OUTDIR)