Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. SASS=scss
  2. SASSFLAGS=--sourcemap=none
  3. GLIB_COMPILE_RESOURCES=glib-compile-resources
  4. RES_DIR=src/gtk-3.0
  5. SCSS_DIR=$(RES_DIR)/scss
  6. DIST_DIR=$(RES_DIR)/dist
  7. RES_DIR320=src/gtk-3.20
  8. SCSS_DIR320=$(RES_DIR320)/scss
  9. DIST_DIR320=$(RES_DIR320)/dist
  10. INSTALL_DIR=$(DESTDIR)/usr/share/themes/Librix
  11. ROOT_DIR=${PWD}
  12. UTILS=scripts/utils.sh
  13. gtk3: clean gresource_gtk3
  14. gtk320: clean gresource_gtk320
  15. all: clean gresource
  16. css_gtk3:
  17. $(SASS) --update $(SASSFLAGS) $(SCSS_DIR):$(DIST_DIR)
  18. css_gtk320:
  19. $(SASS) --update $(SASSFLAGS) $(SCSS_DIR320):$(DIST_DIR320)
  20. css: css_gtk3 css_gtk320
  21. gresource_gtk3: css_gtk3
  22. $(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR) $(RES_DIR)/gtk.gresource.xml
  23. gresource_gtk320: css_gtk320
  24. $(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR320) $(RES_DIR320)/gtk.gresource.xml
  25. gresource: gresource_gtk3 gresource_gtk320
  26. watch: clean
  27. while true; do \
  28. make gresource; \
  29. inotifywait @gtk.gresource -qr -e modify -e create -e delete $(RES_DIR); \
  30. done
  31. clean:
  32. rm -rf $(DIST_DIR)
  33. rm -f $(RES_DIR)/gtk.gresource
  34. rm -rf $(DIST_DIR320)
  35. rm -f $(RES_DIR320)/gtk.gresource
  36. rm -rf $(ROOT_DIR)/dist
  37. install: all
  38. $(UTILS) install $(INSTALL_DIR)
  39. uninstall:
  40. rm -rf $(INSTALL_DIR)
  41. changes:
  42. $(UTILS) changes
  43. zip: all
  44. mkdir $(ROOT_DIR)/dist
  45. $(UTILS) install $(ROOT_DIR)/dist/$$(basename $(INSTALL_DIR))
  46. cd $(ROOT_DIR)/dist && zip --symlinks -rq $$(basename $(INSTALL_DIR)) $$(basename $(INSTALL_DIR))
  47. .PHONY: all
  48. .PHONY: css
  49. .PHONY: watch
  50. .PHONY: gresource
  51. .PHONY: clean
  52. .PHONY: install
  53. .PHONY: uninstall
  54. .PHONY: changes
  55. .DEFAULT_GOAL := all
  56. # vim: set ts=4 sw=4 tw=0 noet :