diff --git a/build-aux/meson/dist-data.py b/build-aux/meson/dist-data.py deleted file mode 100644 index 2df333a9933367545eb869a5e07b09b481f1230c..0000000000000000000000000000000000000000 --- a/build-aux/meson/dist-data.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 - -import os -import shutil -import subprocess -import sys - -from pathlib import PurePath - -stylesheets = [ - 'src/stylesheet/base.css', - 'src/stylesheet/base-hc.css', - 'src/stylesheet/defaults-light.css', - 'src/stylesheet/defaults-dark.css', -] - -references = [ - 'doc/libadwaita-1', -] - -sourceroot = os.environ.get('MESON_SOURCE_ROOT') -buildroot = os.environ.get('MESON_BUILD_ROOT') -distroot = os.environ.get('MESON_DIST_ROOT') - -for stylesheet in stylesheets: - stylesheet_path = PurePath(stylesheet) - src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss')) - dst = PurePath(distroot, stylesheet_path) - subprocess.call(['sassc', '-a', '-M', '-t', 'compact', src, dst]) - -for reference in references: - src_path = os.path.join(buildroot, reference) - if os.path.isdir(src_path): - dst_path = os.path.join(distroot, reference) - shutil.copytree(src_path, dst_path) - else: - sys.exit("Documentation not found. Please pass -Dgtk_doc=true and to Meson and run ninja once.") diff --git a/meson.build b/meson.build index cc21113d9ee398662205a0632a5ee58f78739b65..b62747adf9fb176a9848fb9f67a8bef31feb5541 100644 --- a/meson.build +++ b/meson.build @@ -155,10 +155,6 @@ configure_file( output: 'run', configuration: run_data) -if not meson.is_subproject() - meson.add_dist_script('build-aux'/ 'meson'/ 'dist-data.py') -endif - summary( { 'Tests': get_option('tests'), diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build index 563cafcc4c9bb29aa4e0c0c3aa1b969ba194cd40..1b4c784e6e7192e572864c5d3e5f786122bd4e26 100644 --- a/src/stylesheet/meson.build +++ b/src/stylesheet/meson.build @@ -2,88 +2,85 @@ fs = import('fs') stylesheet_deps = [] -# For git checkouts, but not for tarballs... -if not fs.exists('base.css') - sassc = find_program('sassc', required: false) - if not sassc.found() - subproject('sassc', default_options: ['warning_level=0', 'werror=false']) - sassc = find_program('sassc') - endif +sassc = find_program('sassc', required: false) +if not sassc.found() + subproject('sassc', default_options: ['warning_level=0', 'werror=false']) + sassc = find_program('sassc') +endif - if sassc.found() - sassc_opts = [ '-a', '-M', '-t', 'compact' ] +if sassc.found() + sassc_opts = [ '-a', '-M', '-t', 'compact' ] - scss_deps = files([ - '_colors.scss', - '_common.scss', - '_compat-colors.scss', - '_defaults.scss', - '_drawing.scss', - '_functions.scss', - '_widgets.scss', + scss_deps = files([ + '_colors.scss', + '_common.scss', + '_compat-colors.scss', + '_defaults.scss', + '_drawing.scss', + '_functions.scss', + '_widgets.scss', - 'widgets/_avatar.scss', - 'widgets/_bottom-sheet.scss', - 'widgets/_buttons.scss', - 'widgets/_calendar.scss', - 'widgets/_checks.scss', - 'widgets/_color-chooser.scss', - 'widgets/_column-view.scss', - 'widgets/_deprecated.scss', - 'widgets/_dialogs.scss', - 'widgets/_dropdowns.scss', - 'widgets/_emoji-chooser.scss', - 'widgets/_entries.scss', - 'widgets/_expanders.scss', - 'widgets/_file-chooser.scss', - 'widgets/_header-bar.scss', - 'widgets/_labels.scss', - 'widgets/_level-bar.scss', - 'widgets/_linked.scss', - 'widgets/_links.scss', - 'widgets/_lists.scss', - 'widgets/_menus.scss', - 'widgets/_message-dialog.scss', - 'widgets/_misc.scss', - 'widgets/_notebook.scss', - 'widgets/_paned.scss', - 'widgets/_popovers.scss', - 'widgets/_preferences.scss', - 'widgets/_progress-bar.scss', - 'widgets/_scale.scss', - 'widgets/_scrolling.scss', - 'widgets/_shortcuts-window.scss', - 'widgets/_sidebars.scss', - 'widgets/_spinner.scss', - 'widgets/_spin-button.scss', - 'widgets/_switch.scss', - 'widgets/_tab-view.scss', - 'widgets/_text-selection.scss', - 'widgets/_toolbars.scss', - 'widgets/_tooltip.scss', - 'widgets/_views.scss', - 'widgets/_view-switcher.scss', - 'widgets/_window.scss', - ]) + 'widgets/_avatar.scss', + 'widgets/_bottom-sheet.scss', + 'widgets/_buttons.scss', + 'widgets/_calendar.scss', + 'widgets/_checks.scss', + 'widgets/_color-chooser.scss', + 'widgets/_column-view.scss', + 'widgets/_deprecated.scss', + 'widgets/_dialogs.scss', + 'widgets/_dropdowns.scss', + 'widgets/_emoji-chooser.scss', + 'widgets/_entries.scss', + 'widgets/_expanders.scss', + 'widgets/_file-chooser.scss', + 'widgets/_header-bar.scss', + 'widgets/_labels.scss', + 'widgets/_level-bar.scss', + 'widgets/_linked.scss', + 'widgets/_links.scss', + 'widgets/_lists.scss', + 'widgets/_menus.scss', + 'widgets/_message-dialog.scss', + 'widgets/_misc.scss', + 'widgets/_notebook.scss', + 'widgets/_paned.scss', + 'widgets/_popovers.scss', + 'widgets/_preferences.scss', + 'widgets/_progress-bar.scss', + 'widgets/_scale.scss', + 'widgets/_scrolling.scss', + 'widgets/_shortcuts-window.scss', + 'widgets/_sidebars.scss', + 'widgets/_spinner.scss', + 'widgets/_spin-button.scss', + 'widgets/_switch.scss', + 'widgets/_tab-view.scss', + 'widgets/_text-selection.scss', + 'widgets/_toolbars.scss', + 'widgets/_tooltip.scss', + 'widgets/_views.scss', + 'widgets/_view-switcher.scss', + 'widgets/_window.scss', + ]) - scss_files = [ - 'base', - 'base-hc', - 'defaults-light', - 'defaults-dark', - ] + scss_files = [ + 'base', + 'base-hc', + 'defaults-light', + 'defaults-dark', + ] - foreach scss: scss_files - stylesheet_deps += custom_target('@0@.scss'.format(scss), - input: '@0@.scss'.format(scss), - output: '@0@.css'.format(scss), - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@', - ], - depend_files: scss_deps, - ) - endforeach - endif + foreach scss: scss_files + stylesheet_deps += custom_target('@0@.scss'.format(scss), + input: '@0@.scss'.format(scss), + output: '@0@.css'.format(scss), + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@', + ], + depend_files: scss_deps, + ) + endforeach endif libadwaita_stylesheet_resources = gnome.compile_resources(