diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-09 20:20:48 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-03-09 20:21:49 +0100 |
| commit | 72c0097a737b21b1b14be8732db537d3098c8004 (patch) | |
| tree | bcaa220d4d2f62ca56827f3ef031d669fcc5261d /Makefile | |
| parent | c9bb4783d3a90c8a462caf50d913183eeffa1e4f (diff) | |
| download | quatuorbellefeuille.com-72c0097a737b21b1b14be8732db537d3098c8004.tar.xz | |
Tuck all folder shenanigans to the bottom of the Makefile
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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) |
