Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FONT := DroidSansMono.ttf
  15. PNGS := $(patsubst %.seqdiag,%.png,$(wildcard *.seqdiag))
  16. .PHONY: all
  17. all: $(PNGS)
  18. .PHONY: watch
  19. watch:
  20. fswatch *.seqdiag | xargs -n 1 sh -c "make || true"
  21. $(FONT):
  22. curl -sLo $@ https://googlefontdirectory.googlecode.com/hg/apache/droidsansmono/$(FONT)
  23. %.png: %.seqdiag $(FONT)
  24. seqdiag --no-transparency -a -f '$(FONT)' $<
  25. # Build the stuff via a docker image
  26. .PHONY: docker
  27. docker:
  28. docker build -t clustering-seqdiag .
  29. docker run --rm clustering-seqdiag | tar xvf -
  30. docker-clean:
  31. docker rmi clustering-seqdiag || true
  32. docker images -q --filter "dangling=true" | xargs docker rmi
  33. fix-clock-skew:
  34. boot2docker ssh sudo date -u -D "%Y%m%d%H%M.%S" --set "$(shell date -u +%Y%m%d%H%M.%S)"