chiark / gitweb /
meson.build: remove unnecessary `ln --relative` check
authorKylie McClain <kylie@somas.is>
Thu, 7 Jun 2018 04:23:07 +0000 (00:23 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 8 Jun 2018 13:33:05 +0000 (15:33 +0200)
`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.

meson.build
tools/meson-make-symlink.sh [deleted file]

index 8cb15aff5c89e72a5fb9764e018b4eb72338d773..817f68585c4eb1a13d26c0bacb65258d6bca0a93 100644 (file)
@@ -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 (executable)
index 501cd43..0000000
+++ /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