[gnome-shell-extensions/wip/fmuellner/require-sassc-for-classic] build: Require sassc for classic style



commit 11b5ba092b1d3890206533f1c31640eccaa7e4e9
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 6 00:42:58 2018 +0100

    build: Require sassc for classic style
    
    Meson has a strict separation of source- and build directory, and
    expects anything generated in the latter. That means that in order
    to maintain our current setup - shipping the generated CSS in the
    repo while also optionally updating it automatically when sassc is
    found - we have to fight the build system to some extent, which makes
    it less reliable than we would like.
    
    Since we switched to sassc which is a more acceptable build-time
    dependency than the original ruby-based tool, just drop the CSS
    from the repo and unconditionally generate it from SASS if classic
    mode is enabled.

 data/HACKING           |    4 -
 data/gnome-classic.css | 1957 ------------------------------------------------
 data/meson.build       |   23 +-
 data/update-theme.sh   |    9 -
 meson.build            |    1 -
 5 files changed, 10 insertions(+), 1984 deletions(-)
---
diff --git a/data/HACKING b/data/HACKING
index 9b87ee2..8e05339 100644
--- a/data/HACKING
+++ b/data/HACKING
@@ -1,6 +1,2 @@
-To generate the css files, from the project directory:
-
-sassc -a gnome-classic.scss gnome-classic.css
-
 To update the gnome-shell-sass submodule to latest upstream commit:
 git submodule update --rebase
diff --git a/data/meson.build b/data/meson.build
index c1fbece..5240efb 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -43,22 +43,19 @@ theme_data = [
   'classic-toggle-off-us.svg',
   'classic-toggle-on-intl.svg',
   'classic-toggle-on-us.svg',
-  'gnome-classic.css',
   'gnome-classic-high-contrast.css'
 ]
 
-update_theme = files('update-theme.sh')
-
-if sassc.found()
-  style = 'gnome-classic'
-  custom_target(style + '.css',
-    input: style + '.scss',
-    output: style + '.css',
-    depend_files: theme_sources + files(style + '.css'),
-    command: [update_theme, '@INPUT@', '@OUTPUT@'],
-    build_by_default: true
-  )
-endif
+sassc = find_program('sassc', required: true)
+style = 'gnome-classic'
+custom_target(style + '.css',
+  input: style + '.scss',
+  output: style + '.css',
+  depend_files: theme_sources,
+  command: [sassc, '-a', '@INPUT@', '@OUTPUT@'],
+  install: true,
+  install_dir: themedir
+)
 
 install_data(theme_data, install_dir: themedir)
 
diff --git a/meson.build b/meson.build
index 23a0cfc..bd2b8fa 100644
--- a/meson.build
+++ b/meson.build
@@ -23,7 +23,6 @@ xsessiondir = join_paths(datadir, 'xsession')
 extensionlib = files('lib/convenience.js')
 
 js52 = find_program('js52', required: false)
-sassc = find_program('sassc', required: false)
 
 ver_arr = meson.project_version().split('.')
 if ver_arr[1].to_int().is_even()


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