Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # ---------- ---------- ---------- ---------- ---------- ----------
  2. #
  3. # fenrispunk
  4. #
  5. # ---------- ---------- ---------- ---------- ---------- ----------
  6. STAGE_DIR=content
  7. BUILD_DIR=output
  8. TEMPLATE_DIR=template
  9. target: help
  10. .PHONY: help
  11. help:
  12. @echo "Usage: make [PHONY]"
  13. @sed -n -e '/sed/! s/\.PHONY: //p' Makefile
  14. .PHONY: init
  15. init:
  16. @mkdir -p src/static/artwork/rob_michaud/
  17. @git -C lib/fenrispunk-assets pull || git clone https://notabug.org/vaeringjar/fenrispunk-assets.git lib/fenrispunk-assets
  18. @rsync -av --delete \
  19. lib/fenrispunk-assets/artwork/rob_michaud/ \
  20. src/static/artwork/rob_michaud/ \
  21. || echo "failed to get fenrispunk-assets"
  22. @touch headlines.org
  23. .PHONY: sitemap
  24. sitemap:
  25. @fenrisg \
  26. "sitemap" \
  27. "src" \
  28. "etc/templates/sitemap.org" \
  29. "src/sitemap/index.org" \
  30. ".."
  31. .PHONY: build-home
  32. build-home:
  33. @./build_home_page
  34. .PHONY: html
  35. html: build-home
  36. @rsync -avh --delete src/ $(STAGE_DIR)/
  37. @cp $(STAGE_DIR)/static/images/favicon.ico $(STAGE_DIR)/favicon.ico
  38. @cp $(STAGE_DIR)/static/images/default-logo.png $(STAGE_DIR)/banner.png
  39. @cp $(STAGE_DIR)/static/images/avatar.png $(STAGE_DIR)/logo.svg
  40. @fenrisg \
  41. org \
  42. $(STAGE_DIR)/ \
  43. etc/templates/fenrispunk.html \
  44. etc/filters/links-org-to-html.lua \
  45. dark \
  46. ./ \
  47. $(BUILD_DIR)
  48. .PHONY: feed
  49. feed:
  50. @fenrisg rss output/archive /archive output/feeds/file.rss.xml FenrisPunk 10
  51. .PHONY: build
  52. build: template sitemap html feed
  53. .PHONY: clean
  54. clean:
  55. @rm -rf $(BUILD_DIR) $(STAGE_DIR) $(TEMPLATE_DIR)
  56. .PHONY: rebuild
  57. rebuild: clean build
  58. .PHONY: template
  59. template:
  60. @rsync -avh --delete etc/setupfiles/org-publish-project/ $(TEMPLATE_DIR)/