SRC := $(filter-out $(wildcard meta_*), $(wildcard *.m4))
OUTPUTS := $(patsubst %.m4,out/%.html, $(SRC))
STATIC := $(patsubst static/%,out/%, $(filter-out static/GNUmakefile, $(wildcard static/* static/.*)))
+NOTES := $(shell ./get-notes.sh)
all: $(OUTPUTS) out/notes.atom out/notes.rss out/style.css out/GNUmakefile $(STATIC)
out/%.html: %.m4 header.html footer.html
@mkdir -p $(@D)
m4 -D__d=$(SITE_DOMAIN) -D__p=$(SITE_PREFIX) $< > $@
-out/notes.%: meta_feed_%.m4 $(SRC) header.html footer.html
+out/notes.%: meta_feed_%.m4 $(NOTES) header.html footer.html
m4 -D__d=$(SITE_DOMAIN) -D__p=$(SITE_PREFIX) $< > $@
sed -i 's|href="/\([^/]\)|href="$(SITE_DOMAIN)/\1|' $@
sed -i 's|href="//|href="https://|' $@