sgregoratto.me

source files for www.sgregoratto.me
git clone git://git.sgregoratto.me/sgregoratto.me
Log | Files | Refs

commit 7ad5c4483594eeac79debed1a5b45b4523bd7db8
parent 6146c14785279d06cb86eacd4facab911bb43e24
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Sun,  8 Sep 2019 23:58:45 +1000

Makefile: replace sblg -L with explicit make rules

This requrires GNU make to function cleanly, so I might as well make use
of it.

Diffstat:
MMakefile | 29+++++++++++++++--------------
Mposts | 2+-
2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,26 +1,27 @@ include posts -SERVER = liquid@www.sgregoratto.me -WEBROOT = /var/www/homepage -RSOPTS = -chavzP +SERVER := liquid@www.sgregoratto.me +WEBROOT := /var/www/homepage +RSOPTS := -chazvP +HTML := $(POSTS:.xml=.html) +FILES = index.html $(HTML) blog.html atom.xml css -all: index.html blog.html atom.xml +all: $(FILES) -index.html: index.xml templates/post.xml - sblg -t templates/post.xml -co $@ index.xml - -blog.html: $(POSTS) templates/post.xml templates/postlist.xml - sblg -t templates/post.xml -L $(POSTS) - sblg -t templates/postlist.xml -o $@ $(POSTS) +blog.html: $(POSTS) templates/postlist.xml + @echo $@ + @sblg -t templates/postlist.xml -o $@ $(POSTS) atom.xml: $(POSTS) templates/atom.xml - sblg -t templates/atom.xml -ao - $(POSTS) | grep -Fv "Untitled author" > $@ - -new: + @echo $@ + @sblg -t templates/atom.xml -ao - $(POSTS) | grep -Fv "Untitled author" > $@ +%.html: %.xml templates/post.xml + @echo $@ + @sblg -t templates/post.xml -co $@ $< sync: all - rsync $(RSOPTS) --delete atom.xml *.html css $(SERVER):$(WEBROOT)/ + rsync $(RSOPTS) --delete $(FILES) $(SERVER):$(WEBROOT)/ clean: rm -f *.html atom.xml diff --git a/posts b/posts @@ -1,4 +1,4 @@ # vim: ft=make -POSTS = \ +POSTS := \ gpg-sync-all-pub-keys.xml