[PATCH] configure: add option to skip creating multicall symlinks

From: Colin Booth <colin_at_heliocat.net>
Date: Sun, 14 Mar 2021 07:37:01 +0000

In some cases it is preferential to only explicitly install a subset of
the possible functions that s6-front-end-alias and friends provide.
The --disable-symlinks option will suppress automatic generation of
symlinks on install and instead only install the main binaries.

Signed-off-by: Colin Booth <colin_at_heliocat.net>
---
 configure           | 8 ++++++++
 package/targets.mak | 7 ++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 449eabd..2a5135e 100755
--- a/configure
+++ b/configure
_at_@ -48,6 +48,7 @@ Optional features:
   --enable-nsss                 use the nsss library for user information [disabled]
   --enable-aliases-daemontools  build emulation of daemontools programs [disabled]
   --enable-aliases-runit        build emulation of runit programs [disabled]
+  --disable-symlinks            do not create multicall symlinks [enabled]
 
 EOF
 exit 0
_at_@ -164,6 +165,7 @@ vpathd=''
 build=
 adaemontools=false
 arunit=false
+symlinks=true
 
 for arg ; do
   case "$arg" in
_at_@ -200,6 +202,7 @@ for arg ; do
     --disable-aliases-daemontools|--enable-aliases-daemontools=no) adaemontools=false ;;
     --enable-aliases-runit|--enable-aliases-runit=yes) arunit=true ;;
     --disable-aliases-runit|--enable-aliases-runit=no) arunit=false ;;
+    --disable-symlinks|--enable-symlinkss=no) symlinks=false ;;
     --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
     --host=*|--target=*) target=${arg#*=} ;;
     --build=*) build=${arg#*=} ;;
_at_@ -465,6 +468,11 @@ if $arunit ; then
 else
   echo "WRAP_RUNIT :="
 fi
+if $symlinks ; then
+  echo "SYMLINK := 1"
+else
+  echo "SYMLINK :="
+fi
 
 exec 1>&3 3>&-
 echo "  ... done."
diff --git a/package/targets.mak b/package/targets.mak
index 5767606..086dcb5 100644
--- a/package/targets.mak
+++ b/package/targets.mak
_at_@ -6,7 +6,7 @@ LIBEXEC_TARGETS :=
 WRAP_ANY :=
 
 ifdef WRAP_DAEMONTOOLS
-
+ifdef SYMLINK
 DAEMONTOOLS_TARGETS := \
 envdir \
 envuidgid \
_at_@ -25,7 +25,7 @@ svscanboot \
 svstat \
 tai64n \
 tai64nlocal
-
+endif
 install-bin: $(DAEMONTOOLS_TARGETS:%=$(DESTDIR)$(bindir)/%)
 
 ifneq ($(exthome),)
_at_@ -37,7 +37,7 @@ WRAP_ANY := 1
 endif
 
 ifdef WRAP_RUNIT
-
+ifdef SYMLINK
 RUNIT_TARGETS := \
 runit \
 runit-init \
_at_@ -48,6 +48,7 @@ svlogd \
 utmpset
 
 RUNIT_SPECIAL_TARGETS := chpst sv
+endif
 BIN_TARGETS += s6-frontend-alias-sv s6-frontend-alias-chpst
 
 install-bin: $(RUNIT_TARGETS:%=$(DESTDIR)$(bindir)/%) $(RUNIT_SPECIAL_TARGETS:%=$(DESTDIR)$(bindir)/%)
-- 
2.30.2
Received on Sun Mar 14 2021 - 07:37:01 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC