aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-12-15 07:25:54 +0000
committerRob Landley <rob@landley.net>2005-12-15 07:25:54 +0000
commite0c418e13b005908da492ae2151096e8f2246287 (patch)
treee03f9d292096eedba0bedca225db5f89938a9630
parent164c5c80ba122a6ed71a29d41730c802750a5ae1 (diff)
downloadbusybox-w32-e0c418e13b005908da492ae2151096e8f2246287.tar.gz
busybox-w32-e0c418e13b005908da492ae2151096e8f2246287.tar.bz2
busybox-w32-e0c418e13b005908da492ae2151096e8f2246287.zip
The rest of Yann E. Morin's install revamp.
-rw-r--r--Rules.mak12
-rwxr-xr-xapplets/install.sh11
-rw-r--r--sysdeps/linux/Config.in29
3 files changed, 47 insertions, 5 deletions
diff --git a/Rules.mak b/Rules.mak
index fdac364b9..c1a61e30c 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -205,4 +205,16 @@ endif
205# have a chance of winning. 205# have a chance of winning.
206CFLAGS += $(CFLAGS_EXTRA) 206CFLAGS += $(CFLAGS_EXTRA)
207 207
208#------------------------------------------------------------
209# Installation options
210ifeq ($(strip $(CONFIG_INSTALL_APPLET_HARDLINKS)),y)
211INSTALL_OPTS=--hardlinks
212endif
213ifeq ($(strip $(CONFIG_INSTALL_APPLET_SYMLINKS)),y)
214INSTALL_OPTS=--symlinks
215endif
216ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y)
217INSTALL_OPTS=
218endif
219
208.PHONY: dummy 220.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
8 echo "No installation directory, aborting." 8 echo "No installation directory, aborting."
9 exit 1; 9 exit 1;
10fi 10fi
11if [ "$2" = "--hardlinks" ]; then
12 linkopts="-f"
13else
14 linkopts="-fs"
15fi
16h=`sort busybox.links | uniq` 11h=`sort busybox.links | uniq`
12case "$2" in
13 --hardlinks) linkopts="-f";;
14 --symlinks) linkopts="-fs";;
15 "") h="";;
16 *) echo "Unknown install option: $2"; exit 1;;
17esac
17 18
18 19
19rm -f $prefix/bin/busybox || exit 1 20rm -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
229 Disable use of /usr. Don't activate this option if you don't know 229 Disable use of /usr. Don't activate this option if you don't know
230 that you really want this behaviour. 230 that you really want this behaviour.
231 231
232choice
233 prompt "Applets links"
234 default CONFIG_INSTALL_APPLET_SYMLINKS
235 help
236 Choose how you install applets links.
237
238config CONFIG_INSTALL_APPLET_SYMLINKS
239 bool "as soft-links"
240 help
241 Install applets as soft-links to the busybox binary. This needs some
242 free inodes on the filesystem, but might help with filesystem
243 generators that can't cope with hard-links.
244
245config CONFIG_INSTALL_APPLET_HARDLINKS
246 bool "as hard-links"
247 help
248 Install applets as hard-links to the busybox binary. This might count
249 on a filesystem with few inodes.
250
251config CONFIG_INSTALL_APPLET_DONT
252 bool
253 prompt "not installed"
254 depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL
255 help
256 Do not install applets links. Usefull when using the -install feature
257 or a standalone shell for rescue pruposes.
258
259endchoice
260
232config PREFIX 261config PREFIX
233 string "BusyBox installation prefix" 262 string "BusyBox installation prefix"
234 default "./_install" 263 default "./_install"