From 8ef0df096fe6668134f266338533829bda5e3190 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Fri, 7 Aug 2015 01:37:58 +0530 Subject: [PATCH] All new Makefile --- Makefile | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a3777f1..7b56e49 100755 --- a/Makefile +++ b/Makefile @@ -1,14 +1,45 @@ -SASS=sass -SCSS_DIR=gtk-3.0/scss -DIST_DIR=gtk-3.0/dist +SASS=scss +SASSFLAGS=--sourcemap=none +GLIB_COMPILE_RESOURCES=glib-compile-resources +RES_DIR=gtk-3.0 +SCSS_DIR=$(RES_DIR)/scss +DIST_DIR=$(RES_DIR)/dist +INSTALL_DIR=$(DESTDIR)/usr/share/themes/Ozon + +all: gresource css: - $(SASS) --sourcemap=none --update $(SCSS_DIR):$(DIST_DIR) + $(SASS) --update $(SASSFLAGS) $(SCSS_DIR):$(DIST_DIR) -all: css +gresource: css + $(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR) $(RES_DIR)/gtk.gresource.xml + +watch: + while true; do \ + make gresource; \ + inotifywait @gtk.gresource -qr -e modify -e create -e delete $(RES_DIR); \ + done clean: rm -rf $(DIST_DIR) + rm -f $(RES_DIR)/gtk.gresource +install: all + install -d -m755 $(INSTALL_DIR) + + for f in *; do cp -pr $$f $(INSTALL_DIR)/; done + +uninstall: + rm -rf $(INSTALL_DIR) + +.PHONY: all .PHONY: css +.PHONY: watch +.PHONY: gresource +.PHONY: clean +.PHONY: install +.PHONY: uninstall + +.DEFAULT_GOAL := all + # vim: set ts=4 sw=4 tw=0 noet :