[gnome-shell] build: Keep CSS updated when sass is installed



commit c749facedb227c1a3615e1f667a5ba3931b57387
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 21 15:05:16 2015 +0100

    build: Keep CSS updated when sass is installed

 configure.ac     |    2 ++
 data/Makefile.am |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bac63af..e729666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,8 @@ if test -z "$GDBUS_CODEGEN"; then
   AC_MSG_ERROR([gdbus-codegen not found])
 fi
 
+AC_PATH_PROG([SASS],[sass],[])
+
 AC_CONFIG_FILES([
   Makefile
   data/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index c46e350..56d629a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -57,6 +57,12 @@ dist_theme_files =                                           \
        theme/gnome-shell-sass/gnome-shell-sass.doap            \
        $(NULL)
 
+%.css: %.scss $(theme_sources)
+       @if test -n "$(SASS)"; then \
+               if $(AM_V_P); then PS4= set -x; else echo "  GEN      $@"; fi; \
+               $(SASS) --sourcemap=none -f -q --update $<; \
+       fi
+
 resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/theme --generate-dependencies 
$(srcdir)/gnome-shell-theme.gresource.xml)
 gnome-shell-theme.gresource: gnome-shell-theme.gresource.xml $(resource_files)
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/theme $<


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]