dependencies: ensure that DESTDIR isn't set when running Buildroot
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 29 Jun 2012 00:14:56 +0000 (00:14 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 30 Jun 2012 21:53:38 +0000 (23:53 +0200)
Having DESTDIR set in the environment before running Buildroot creates
some funky problems in the build process. Prevent users from running
into this kind of troubles.

Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
support/dependencies/dependencies.sh

index c47ffcf43cc319bfe7caf1c0e6b2a0e359d2a1dd..43ec3cc0f9a315eb5a492fc53610ebe1b009bf84 100755 (executable)
@@ -48,6 +48,12 @@ if test -n "$PERL_MM_OPT" ; then
     exit 1
 fi
 
+if test -n "$DESTDIR" ; then
+    /bin/echo -e "\nYou have the DESTDIR environment variable set. Please"
+    /bin/echo -e "unset it so that Buildroot can work properly."
+    exit 1
+fi
+
 # Verify that which is installed
 if ! which which > /dev/null ; then
        /bin/echo -e "\nYou must install 'which' on your build machine\n";