The rest of Yann E. Morin's install revamp.
authorRob Landley <rob@landley.net>
Thu, 15 Dec 2005 07:25:54 +0000 (07:25 -0000)
committerRob Landley <rob@landley.net>
Thu, 15 Dec 2005 07:25:54 +0000 (07:25 -0000)
Rules.mak
applets/install.sh
sysdeps/linux/Config.in

index fdac364b93e0293962c281327de86e62249a38a4..c1a61e30c3d7b5810336f327f28c59c7ff99209d 100644 (file)
--- a/Rules.mak
+++ b/Rules.mak
@@ -205,4 +205,16 @@ endif
 # have a chance of winning.
 CFLAGS += $(CFLAGS_EXTRA)
 
+#------------------------------------------------------------
+# Installation options
+ifeq ($(strip $(CONFIG_INSTALL_APPLET_HARDLINKS)),y)
+INSTALL_OPTS=--hardlinks
+endif
+ifeq ($(strip $(CONFIG_INSTALL_APPLET_SYMLINKS)),y)
+INSTALL_OPTS=--symlinks
+endif
+ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y)
+INSTALL_OPTS=
+endif
+
 .PHONY: dummy
index d163a2ef84303034728339ebffa4e19cb68ab32e..2fcd2ae6e873ee5e8c51bbb15e7cbdbb20dfeff6 100755 (executable)
@@ -8,12 +8,13 @@ if [ "$prefix" = "" ]; then
     echo "No installation directory, aborting."
     exit 1;
 fi
-if [ "$2" = "--hardlinks" ]; then
-    linkopts="-f"
-else
-    linkopts="-fs"
-fi
 h=`sort busybox.links | uniq`
+case "$2" in
+    --hardlinks) linkopts="-f";;
+    --symlinks)  linkopts="-fs";;
+    "")          h="";;
+    *)           echo "Unknown install option: $2"; exit 1;;
+esac
 
 
 rm -f $prefix/bin/busybox || exit 1
index fb97c8f05987c63d4be4827ee0d1f6de40a8d792..3501ff767aa3292b5b759f9d93d929bc56805355 100644 (file)
@@ -229,6 +229,35 @@ config CONFIG_INSTALL_NO_USR
          Disable use of /usr. Don't activate this option if you don't know
          that you really want this behaviour.
 
+choice
+       prompt "Applets links"
+       default CONFIG_INSTALL_APPLET_SYMLINKS
+       help
+         Choose how you install applets links.
+
+config CONFIG_INSTALL_APPLET_SYMLINKS
+       bool "as soft-links"
+       help
+         Install applets as soft-links to the busybox binary. This needs some
+         free inodes on the filesystem, but might help with filesystem
+         generators that can't cope with hard-links.
+
+config CONFIG_INSTALL_APPLET_HARDLINKS
+       bool "as hard-links"
+       help
+         Install applets as hard-links to the busybox binary. This might count
+         on a filesystem with few inodes.
+
+config CONFIG_INSTALL_APPLET_DONT
+       bool
+       prompt "not installed"
+       depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL
+       help
+         Do not install applets links. Usefull when using the -install feature
+         or a standalone shell for rescue pruposes.
+
+endchoice
+
 config PREFIX
        string "BusyBox installation prefix"
        default "./_install"