|
@@ -3,10 +3,16 @@
|
|
|
if [ "$1" != "" ]; then
|
|
|
destdir=$1
|
|
|
fi
|
|
|
-if [ "$PATHEXT" != "" ]; then
|
|
|
+if [ "${PATHEXT}" != "" ]; then
|
|
|
EXEEXT=.exe
|
|
|
+ if [ "${DJDIR}" != "" ]; then
|
|
|
+ libdir=${DJDIR}/lib
|
|
|
+ else
|
|
|
+ libdir=/lib
|
|
|
+ fi
|
|
|
else
|
|
|
EXEEXT=
|
|
|
+ libdir=/libdir
|
|
|
fi
|
|
|
|
|
|
echo "Deleting gdb${EXEEXT} to force recompile"
|
|
@@ -51,7 +57,7 @@ if ( doprint == 1 ) {
|
|
|
' | tee comp-cmd.log
|
|
|
# Try to locate all libraries
|
|
|
echo Creating ./copy-libs.sh script
|
|
|
-cat comp-cmd.log |gawk -v destdir=${destdir} '
|
|
|
+cat comp-cmd.log |gawk -v destdir=${destdir} -v libdir=${libdir} '
|
|
|
BEGIN {
|
|
|
print "#!/bin/bash"
|
|
|
print "# copy-libs.sh generated by awk script"
|
|
@@ -78,7 +84,7 @@ BEGIN {
|
|
|
}
|
|
|
if ( list[i] ~ /-l/ ) {
|
|
|
systemlib = gensub (/-l([^ ]*)/,"lib\\1.a ","g",list[i]);
|
|
|
- print "systemlib=`find /lib -name " systemlib "`" ;
|
|
|
+ print "systemlib=`find " libdir " -name " systemlib "`" ;
|
|
|
print "if [ \"${systemlib}\" != \"\" ]; then";
|
|
|
print "echo System lib found: ${systemlib}";
|
|
|
print "cp ${systemlib} ${destdir}";
|
|
@@ -89,7 +95,7 @@ BEGIN {
|
|
|
}
|
|
|
}
|
|
|
' | tee copy-libs.sh
|
|
|
-chmod u+x ./copy-libs.sh
|
|
|
+chmod u+x ./copy-libs.sh
|
|
|
# For later
|
|
|
|
|
|
echo Creating ./gdblib.inc file
|