summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrewMurrell <ImFromNASA@gmail.com>2017-12-24 21:16:48 -0500
committerAndrewMurrell <ImFromNASA@gmail.com>2017-12-24 21:16:48 -0500
commit37cf878b62c49d23cdc0cf09b972456bb98b2736 (patch)
tree11efcf65d45de738c4082e6658b2bc355b22f48b /Makefile
parent517aec2364abb99431cfe91f318b2fb109226db5 (diff)
parentbdb62265c5e0f8cbaa647479e10549f324e0712c (diff)
Merge remote-tracking branch 'ls/master'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
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