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 72c0097a737b21b1b14be8732db537d3098c8004
parent c9bb4783d3a90c8a462caf50d913183eeffa1e4f
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Tue,  9 Mar 2021 20:20:48 +0100

Tuck all folder shenanigans to the bottom of the Makefile

Diffstat:
MMakefile | 23++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile @@ -25,23 +25,19 @@ all: site site: $(pages) $(members_pages) $(resources) $(images) $(stylesheets) -$(OUTDIR) $(images_folders) $(stylesheets_folders): - mkdir $@ - -.SECONDEXPANSION: -$(resources): $(OUTDIR)/%: % | $$(@D) +$(resources): $(OUTDIR)/%: % cp $< $@ -$(images): $(OUTDIR)/%: % | $$(@D) +$(images): $(OUTDIR)/%: % cp $< $@ -$(stylesheets): $(OUTDIR)/%: % | $$(@D) +$(stylesheets): $(OUTDIR)/%: % cp $< $@ -$(pages): $(OUTDIR)/%.html: %.html %.sh template.html | $$(@D) +$(pages): $(OUTDIR)/%.html: %.html %.sh template.html ./build.sh $< $*.sh $@ -$(members_pages): $(OUTDIR)/%.html: %.membre.in build-member.sh template.html | $$(@D) +$(members_pages): $(OUTDIR)/%.html: %.membre.in build-member.sh template.html ./build-member.sh $< $@ $(OUTDIR)/quatuor.html: quatuor.md @@ -49,3 +45,12 @@ $(OUTDIR)/programmes.html: programs.in clean: -rm -r $(OUTDIR) + +# Rules for automatic, incremental folder creation. +# ⚠ Fail for intermediate folders which hold only subdirs. + +$(OUTDIR) $(images_folders) $(stylesheets_folders): + mkdir $@ + +.SECONDEXPANSION: +$(resources) $(images) $(stylesheets) $(pages) $(members_pages): | $$(@D)