jwt27 / build-gcc

Shell scripts to build various gcc cross-compilers (primarily djgpp)
https://jw.h4ck.me/debian/
GNU General Public License v3.0
41 stars 9 forks source link

DESTDIR support #11

Closed stsp closed 4 years ago

stsp commented 4 years ago

I tried the following for DESTDIR support:

diff --git a/script/init.sh b/script/init.sh
index 9f78fd9..6f7b201 100755
--- a/script/init.sh
+++ b/script/init.sh
@@ -3,7 +3,7 @@ unset CDPATH
 BASE=`pwd`

 # target directory
-PREFIX=${PREFIX-/usr/local/cross}
+PREFIX=${DESTDIR}${PREFIX-/usr/local/cross}

 # enabled languages
 #ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++}

But at some point the build fails. Can someone try to add the DESTDIR support?

stsp commented 4 years ago

No, adding it to prefix was wrong. Will try to get it to work differently.