Makefile 812 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # ---------- ---------- ---------- ---------- ---------- ----------
  2. #
  3. # static-site-generator
  4. #
  5. # ---------- ---------- ---------- ---------- ---------- ----------
  6. site_name=$(if $(n),$(n),Site)
  7. target: help
  8. .PHONY: help
  9. help:
  10. @echo "Usage: make [PHONY]"
  11. @sed -n -e '/sed/! s/\.PHONY: //p' Makefile
  12. .PHONY: init
  13. init:
  14. @cp -air example/ content/
  15. .PHONY: deps
  16. deps:
  17. git clone https://github.com/hniksic/emacs-htmlize.git bin/htmlize
  18. .PHONY: publish
  19. publish:
  20. @cd content/ && make build
  21. @cd content/site/ && ../../src/main.el
  22. .PHONY: rss
  23. rss:
  24. @cd output/ && ../src/generate-rss.sh $(site_name)
  25. .PHONY: build
  26. build: publish rss
  27. .PHONY: rebuild
  28. rebuild: clean build
  29. .PHONY: reset
  30. reset:
  31. @./src/reset-timestamps.el
  32. .PHONY: clean
  33. clean: reset
  34. @cd content/ && make clean
  35. @rm -rf output/