Makefile 843 B

123456789101112131415161718192021222324
  1. # Title
  2. # Auto-Documenting Section. Displays a target list with `##` descriptions.
  3. help:
  4. @grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}'
  5. .PHONY: help dist
  6. dist: ## Create a distribution for live usage
  7. @mkdir -p dist/{css,js,tags}
  8. @echo "combining css"
  9. @cat css/vendor/* > dist/css/app.css
  10. @cat css/style.css >> dist/css/app.css
  11. @echo "combining javascript"
  12. @cat js/vendor/* > dist/js/app.js
  13. @cat js/pgsh.js >> dist/js/app.js
  14. @echo "copying riot tags"
  15. @cp tags/*.tag dist/tags/
  16. @echo "adjusting index.html"
  17. @sed "/$(JS_TAGS)/D" index.html | sed "s|$(APPJS_PH)|$(APPJS_TAG)|" > dist/index.html
  18. @echo "all done!"
  19. JS_TAGS = <script.*type='text\/javascript'
  20. APPJS_PH = <!-- appjsplaceholder -->
  21. APPJS_TAG = <script type='text/javascript' src='js/app.js'><\/script>