diff options
author | Rob Landley <rob@landley.net> | 2005-12-15 07:25:54 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-15 07:25:54 +0000 |
commit | e0c418e13b005908da492ae2151096e8f2246287 (patch) | |
tree | e03f9d292096eedba0bedca225db5f89938a9630 | |
parent | 164c5c80ba122a6ed71a29d41730c802750a5ae1 (diff) | |
download | busybox-e0c418e13b005908da492ae2151096e8f2246287.tar.gz |
The rest of Yann E. Morin's install revamp.
-rw-r--r-- | Rules.mak | 12 | ||||
-rwxr-xr-x | applets/install.sh | 11 | ||||
-rw-r--r-- | sysdeps/linux/Config.in | 29 |
3 files changed, 47 insertions, 5 deletions
@@ -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 diff --git a/applets/install.sh b/applets/install.sh index d163a2ef8..2fcd2ae6e 100755 --- a/applets/install.sh +++ b/applets/install.sh @@ -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 diff --git a/sysdeps/linux/Config.in b/sysdeps/linux/Config.in index fb97c8f05..3501ff767 100644 --- a/sysdeps/linux/Config.in +++ b/sysdeps/linux/Config.in @@ -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" |