summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-03-14 18:18:31 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-03-17 13:49:41 -0400
commitb54a1c9686eec3c1114e9b58cb67679ba59c45bd (patch)
tree0bdb2f3ed51ff077a8c3e337e4bc556aacec108e /Makefile
parent54feeb027d6e5a760b49769dfe695ea2591dc6fe (diff)
directories
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile58
1 files changed, 38 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 3ce825e..2f62fac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,48 @@
-all: index.html style.css jarmon-style/jquerytools.tabs.tabs-no-images.css jarmon-style/style.css
+all: public/index.html
+all: public/style.css
+all: public/jarmon-style/jquerytools.tabs.tabs-no-images.css
+all: public/jarmon-style/style.css
-%: %.go util $(wildcard util/*.go)
- go build $<
+NET-%:
+ date > $@
-index.html: tls.html.part crtsh.html.part diff.html.part jarmon.html.in
+.DELETE_ON_ERROR:
+.SECONDARY:
-crtsh.pem: crtsh-getcerts config-domains.txt NET-crtsh
- ./crtsh-getcerts $$(sed 's/#.*//' config-domains.txt) > $@
+# bin/
-tls.pem: tls-getcerts config-sockets.txt NET-tls
- ./tls-getcerts $$(sed 's/#.*//' config-sockets.txt) > $@
+bin/%: bin-src/%.go bin-src/util $(wildcard bin-src/util/*.go)
+ go build -o $@ $<
-diff.pem: diff tls.pem crtsh.pem
- ./diff tls.pem crtsh.pem > $@
+bin/%: bin-src/%
+ @mkdir -p '$(@D)'
+ ln -srTf '$<' '$@'
-tls.html.part crtsh.html.part diff.html.part: %.html.part: %.pem %-pem2html
- ./$*-pem2html < $< > $@
+# public/
-%: %.gen
- ./$< $(filter-out $<,$^) > $@
+public/%: public-src/%
+ @mkdir -p '$(@D)'
+ ln -srTf '$<' '$@'
-%.css: %.scss
- scss $< $@
+public/index.html: public/tls.html.part public/crtsh.html.part public/diff.html.part public/jarmon.html.in
-NET-%:
- date > $@
+public/crtsh.pem: bin/crtsh-getcerts cfg/domains.txt NET-crtsh
+ @mkdir -p '$(@D)'
+ bin/crtsh-getcerts $$(sed 's/#.*//' cfg/domains.txt) > $@
-.DELETE_ON_ERROR:
-.SECONDARY:
+public/tls.pem: bin/tls-getcerts cfg/sockets.txt NET-tls
+ @mkdir -p '$(@D)'
+ bin/tls-getcerts $$(sed 's/#.*//' cfg/sockets.txt) > $@
+
+public/diff.pem: bin/pem-diff public/tls.pem public/crtsh.pem
+ $^ > $@
+
+public/tls.html.part public/crtsh.html.part public/diff.html.part: \
+public/%.html.part: public/%.pem bin/%-pem2html
+ bin/$*-pem2html < $< > $@
+
+public/%: public/%.gen
+ $^ > $@
+
+public/%.css: public/%.scss
+ scss $< $@