From e64050035dc9d3c810e14c205688a54393dd7b43 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 31 Dec 2016 23:16:24 -0700 Subject: indexes --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6c58b95..47f4827 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ html.suffixes = md org html.src = $(shell find src -type f \( -false $(foreach s,$(html.suffixes), -o -name '*.$s' ) \)) # Translate the source filenames into output filenames html.out = $(call patsubst-all,$(addprefix src/%.,$(html.suffixes)),out/%.html,$(html.src)) -html.out += $(addsuffix index.html,$(sort $(dir $(patsubst src/%,out/%,$(html.src))))) +html.out += $(foreach d,$(sort $(dir $(patsubst src/%,out/%,$(html.src)))),$dindex.html $dindex.atom) mydir = $(patsubst %/,%,$(patsubst out/%,%,$(dir $@))) @@ -43,12 +43,16 @@ out/%.css: src/%.scss out/%.css: out/%.scss scss --stdin < $< > $@ +out/index.md : $(bin/index) bin/index.md.erb .var.html.src $(html.src) bin/write-atomic + bin/index md '$(mydir)' $(filter $(patsubst out%,src%,$(@D))/%,$^) | bin/write-atomic $@ out/%/index.md : $(bin/index) bin/index.md.erb .var.html.src $(html.src) bin/write-atomic - bin/index md $(mydir) $(filter $(patsubst out/%,src/%,$(@D))/%,$^) | bin/write-atomic $@ + bin/index md '$(mydir)' $(filter $(patsubst out%,src%,$(@D))/%,$^) | bin/write-atomic $@ +out/index.atom : $(bin/index) bin/index.atom.erb .var.html.src $(html.src) bin/write-atomic + bin/index atom '$(mydir)' $(filter $(patsubst out%,src%,$(@D))/%,$^) | bin/write-atomic $@ out/%/index.atom: $(bin/index) bin/index.atom.erb .var.html.src $(html.src) bin/write-atomic - bin/index atom $(mydir) $(filter $(patsubst out/%,src/%,$(@D))/%,$^) | bin/write-atomic $@ + bin/index atom '$(mydir)' $(filter $(patsubst out%,src%,$(@D))/%,$^) | bin/write-atomic $@ -www: +www: FORCE mkdir -p $@ unionfs -o ro out:src www -- cgit v1.2.3-54-g00ecf