[PATCH] fixing install dirs

Enrico Weigelt weigelt at metux.de
Wed Mar 21 17:07:28 UTC 2007


Hi folks,

here's a little patch which fixes installation dir handling.

cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact at metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------
-------------- next part --------------
#
# Submitted-By: Enrico Weigelt <weigelt at metux.de>, 2007-03-12
# Committed-By: Enrico Weigelt <weigelt at metux.de>, 2007-03-12
# 
# Error:
#
# Passing an install prefix via environment was possible, but used 
# non-standard variables. Confusing.
#
# Description:
# 
# If either $DESTDIR or $INSTALLDIR is defined, we use this.
# In this case we just set the traditional variable to the value of 
# our new standard variable. So our intrucion is very minimal and 
# backwards compatibility is remained.
#
# State:
# 
# Not notified yet.
#
diff -ruN busybox-1.4.1.orig/Makefile.custom busybox-1.4.1/Makefile.custom
--- busybox-1.4.1.orig/Makefile.custom	2007-03-07 17:14:24.000000000 +0100
+++ busybox-1.4.1/Makefile.custom	2007-03-07 17:18:12.000000000 +0100
@@ -2,6 +2,14 @@
 # Build system
 # ==========================================================================
 
+ifdef DESTDIR
+INSTALLDIR=$(DESTDIR)
+endif
+
+ifndef INSTALLDIR
+INSTALLDIR=$(CONFIG_PREFIX)
+endif
+
 %.bflt: %_unstripped
 	$(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@
 
@@ -17,7 +25,7 @@
 endif
 install: $(srctree)/applets/install.sh busybox busybox.links
 	$(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
-		$(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)
+		$(SHELL) $< $(INSTALLDIR) $(INSTALL_OPTS)
 ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
 	@echo
 	@echo


More information about the busybox mailing list