diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-10 15:20:28 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-10 15:36:56 -0800 |
commit | 86e14513f1246b12525909f01a78b99901b33435 (patch) | |
tree | 12e4723eb388e187a5c068356bd68dedf43ffa68 | |
parent | e3d3b1906560db61daacdcfc23908918dfa54f84 (diff) |
meson: modernize some usage in meson.build & .gitlab-CI.yml
Suggested-by: Emmanuele Bassi <ebassi@gnome.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | .gitlab-ci.yml | 21 | ||||
-rw-r--r-- | meson.build | 8 |
2 files changed, 10 insertions, 19 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e32e7ba..e9d9bde 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -113,10 +113,8 @@ meson: script: - mkdir -p ../_inst - meson setup builddir --prefix="$PWD/../_inst" $MESON_OPTIONS - - pushd builddir > /dev/null - - meson compile - - meson install - - popd > /dev/null + - meson compile -C builddir + - meson install -C builddir meson from tarball: extends: @@ -127,7 +125,7 @@ meson from tarball: - tar xf xorg-cf-files-*.tar.gz -C _tarball_build - pushd _tarball_build/xorg-cf-files-* - meson setup builddir - - ninja -C builddir test + - meson test -C builddir needs: - autotools variables: @@ -144,10 +142,8 @@ compare meson and autotools: # to use the same --prefix for meson and autotools - ln -sf $PWD/_meson_inst $PWD/_inst - meson setup builddir --prefix=$PWD/_inst - - pushd builddir > /dev/null - - meson compile - - meson install - - popd > /dev/null + - meson compile -C builddir + - meson install -C builddir - rm $PWD/_inst - ln -sf $PWD/_autotools_inst $PWD/_inst - ./autogen.sh --prefix=$PWD/_inst @@ -161,9 +157,6 @@ check versions are in sync: script: - autoreconf -ivf - ./configure --version | head -n 1 | sed -e 's/xorg-cf-files configure //' > autotools.version - - | - meson setup builddir - pushd builddir - meson introspect --projectinfo | jq -r '.version' > ../meson.version - popd + - meson setup builddir + - meson introspect --projectinfo builddir | jq -r '.version' > meson.version - diff -u autotools.version meson.version || (echo "ERROR - autotools and meson versions not in sync" && false) diff --git a/meson.build b/meson.build index a82ae0c..d663fa0 100644 --- a/meson.build +++ b/meson.build @@ -33,8 +33,7 @@ if fontrootdir == '' fontrootdir = fontutil_dep.get_variable(pkgconfig: 'fontrootdir') endif if fontrootdir == '' - fontrootdir = join_paths(get_option('prefix'), get_option('datadir'), - '/fonts/X11') + fontrootdir = get_option('prefix') / get_option('datadir') / '/fonts/X11' endif endif conf.set('FONTROOTDIR', fontrootdir) @@ -43,14 +42,13 @@ conf.set('FONTROOTDIR', fontrootdir) # with the substitution to use the FontDir defined in the Imake configs encodingsdir = get_option('with-fontrootdir') if encodingsdir == '' - encodingsdir = join_paths('FontDir', 'encodings') + encodingsdir = 'FontDir' / 'encodings' endif conf.set('ENCODINGSDIR', encodingsdir) xconfdir = get_option('with-config-dir') if xconfdir == '' - xconfdir = join_paths(get_option('prefix'), get_option('libdir'), - 'X11/config') + xconfdir = get_option('prefix') / get_option('libdir') / 'X11/config' endif site_def = configure_file(input: 'site.def.in', output: 'site.def', |