srcs = $(shell find public-src -name 3rd-party -prune -o -not -type d -not -name '*.log' -print) outs = $(patsubst public-src/%,public/%,\ $(patsubst %.scss,%.css,\ $(patsubst %.gen,%,\ $(srcs)))) all: $(outs) all: public/3rd-party .PHONY: all NET-%: date > $@ .DELETE_ON_ERROR: .SECONDARY: .PHONY: FORCE # bin/ bin/%: bin-src/%.go bin-src/util $(wildcard bin-src/util/*.go) go build -o $@ $< bin/%: bin-src/% @mkdir -p '$(@D)' ln -srTf '$<' '$@' # public/ # Normal pattern rules public/%: public-src/% @mkdir -p '$(@D)' ln -srTf '$<' '$@' public/%: public/%.gen $^ > $@ public/%.css: public/%.scss scss $< $@ # Specific stuff public/index.html: public/tls.html.part public/crtsh.html.part public/diff.html.part public/jarmon.html.in public/crtsh.pem: bin/crtsh-getcerts cfg/domains.txt NET-crtsh @mkdir -p '$(@D)' bin/crtsh-getcerts $$(sed 's/#.*//' cfg/domains.txt) > $@ 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-src/3rd-party/yarn.LICENSES.txt: bin/yarn-bower public-src/3rd-party/package.json $(wildcard public-src/3rd-party/yarn.lock) bin/yarn-bower install bin/yarn-bower licenses generate-disclaimer > $@ public/3rd-party: public-src/3rd-party/yarn.LICENSES.txt public/3rd-party: public-src/3rd-party/jquery-1.6.3.js public/3rd-party: @touch $@ public-src/jarmon-style/%.gif: public-src/3rd-party/yarn.LICENSES.txt @test -f $@ public-src/3rd-party/jquery-%.js: wget -O - 'http://code.jquery.com/jquery-$*.js' > $@