From: Kylie McClain Date: Thu, 7 Jun 2018 04:23:07 +0000 (-0400) Subject: meson.build: remove unnecessary `ln --relative` check X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7874bff7a506ee2b442e294f81e9d06dba739e9e;p=elogind.git meson.build: remove unnecessary `ln --relative` check `ln --relative` is used by tools/meson-make-symlink.sh, which is never once ran during the build process for elogind. additionally, it incurrs a dependency on GNU coreutils (or any other `ln` that has the non-standard `--relative` extension), so there's no real need to check for it. --- diff --git a/meson.build b/meson.build index 8cb15aff5..817f68585 100644 --- a/meson.build +++ b/meson.build @@ -637,8 +637,9 @@ stat = find_program('stat') git = find_program('git', required : false) env = find_program('env') -meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh' -#if 1 /// Needed by elogind +#if 0 /// elogind does not use this but needs a tool to symlink its installed headers. +# meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh' +#else /// Needed by elogind meson_symlink_headers = meson.source_root() + '/tools/meson-symlink_headers.sh' #endif // 1 mkdir_p = 'mkdir -p $DESTDIR/@0@' @@ -685,12 +686,11 @@ endforeach #if 0 /// unneeded by elogind # conf.set_quoted('TELINIT', get_option('telinit-path')) +# if run_command('ln', '--relative', '--help').returncode() != 0 +# error('ln does not support --relative') +# endif #endif // 0 -if run_command('ln', '--relative', '--help').returncode() != 0 - error('ln does not support --relative') -endif - ############################################################ gperf = find_program('gperf') diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh deleted file mode 100755 index 501cd43d4..000000000 --- a/tools/meson-make-symlink.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -eu - -# this is needed mostly because $DESTDIR is provided as a variable, -# and we need to create the target directory... - -mkdir -vp "$(dirname "${DESTDIR:-}$2")" -if [ "$(dirname $1)" = . ]; then - ln -vfs -T "$1" "${DESTDIR:-}$2" -else - ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" -fi