From efbd3731c986a8555869c184cda69ff9b910ce9f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 23 Dec 2017 15:52:22 -0500 Subject: pdf support --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 96e0fdf..f61c4c3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ MAKEFLAGS += -j1 +pdfjs = https://github.com/mozilla/pdf.js/releases/download/v1.9.426/pdfjs-1.9.426-dist.zip + # Default target -all: out/index.html out/main.css +all: out/index.html out/main.css out/pdfjs phony += all # Boilerplate @@ -25,7 +27,13 @@ out/%.css: src/%.scss @mkdir -p $(@D) scss --stdin < $< > $@ -targets = $(phony) %.css +out/$(notdir $(pdfjs)): + wget -c --no-use-server-timestamp -O $@ $(pdfjs) +out/pdfjs: out/$(notdir $(pdfjs)) + rm -rf -- $@ + mkdir -- $@ && bsdtar -xf $(abspath $<) -C $@ --exclude '*.pdf' || { rm -rf -- $@; false; } + +targets = $(phony) %.css out/pdfjs% $(sort $(filter-out $(targets),out/index.html $(MAKECMDGOALS))): FORCE ./bin/sitegen -- cgit v1.2.3