summaryrefslogtreecommitdiff
path: root/packages/gdbint
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-11-12 21:05:19 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-11-12 21:05:19 +0000
commitc214f626f3950699c84358b58e9049a9bf859441 (patch)
tree13c2151037a3ff9117913a4c227f439487146484 /packages/gdbint
parent2e06f31a1f1a5fe1e09267411af226c96fe76303 (diff)
downloadfpc-c214f626f3950699c84358b58e9049a9bf859441.tar.gz
* improve DJGPP output
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@14161 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/gdbint')
-rwxr-xr-xpackages/gdbint/gen-gdblib-inc.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/gdbint/gen-gdblib-inc.sh b/packages/gdbint/gen-gdblib-inc.sh
index 2608269087..652ba79269 100755
--- a/packages/gdbint/gen-gdblib-inc.sh
+++ b/packages/gdbint/gen-gdblib-inc.sh
@@ -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