mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 21:20:29 +02:00
* Try to get script to work for freebsd
git-svn-id: trunk@15892 -
This commit is contained in:
parent
fb313ff87e
commit
8b874e0646
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$1" != "" ]; then
|
if [ "$1" != "" ]; then
|
||||||
destdir=$1
|
destdir=$1
|
||||||
@ -18,7 +18,13 @@ fi
|
|||||||
echo "Deleting gdb${EXEEXT} to force recompile"
|
echo "Deleting gdb${EXEEXT} to force recompile"
|
||||||
rm -f gdb${EXEEXT}
|
rm -f gdb${EXEEXT}
|
||||||
echo "Rebuilding gdb${EXEEXT}"
|
echo "Rebuilding gdb${EXEEXT}"
|
||||||
make gdb${EXEEXT} | tee make.log
|
MAKE=`which gmake`
|
||||||
|
|
||||||
|
if [ "${MAKE}" == "" ]; then
|
||||||
|
MAKE=make
|
||||||
|
fi
|
||||||
|
|
||||||
|
${MAKE} gdb${EXEEXT} | tee make.log
|
||||||
|
|
||||||
gdb_full_version=`sed -n "s:.*version.*\"\(.*\)\".*:\1:p" version.c`
|
gdb_full_version=`sed -n "s:.*version.*\"\(.*\)\".*:\1:p" version.c`
|
||||||
gdbcvs=`sed -n "s:.*version.*\"\(.*\)cvs\(.*\)\".*:\1cvs\2:p" version.c`
|
gdbcvs=`sed -n "s:.*version.*\"\(.*\)cvs\(.*\)\".*:\1cvs\2:p" version.c`
|
||||||
@ -61,7 +67,7 @@ if ( doprint == 1 ) {
|
|||||||
echo Creating ./copy-libs.sh script
|
echo Creating ./copy-libs.sh script
|
||||||
cat comp-cmd.log |gawk -v destdir=${destdir} -v libdir=${libdir} '
|
cat comp-cmd.log |gawk -v destdir=${destdir} -v libdir=${libdir} '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
print "#!/bin/bash"
|
print "#!/usr/bin/env bash"
|
||||||
print "# copy-libs.sh generated by awk script"
|
print "# copy-libs.sh generated by awk script"
|
||||||
print "if [ \"$1\" != \"\" ]; then"
|
print "if [ \"$1\" != \"\" ]; then"
|
||||||
print " destdir=$1"
|
print " destdir=$1"
|
||||||
@ -84,6 +90,10 @@ BEGIN {
|
|||||||
staticlib = gensub (/([^ ]*)(lib[^ ]*\.a)/,"\\1\\2 ","g",list[i]);
|
staticlib = gensub (/([^ ]*)(lib[^ ]*\.a)/,"\\1\\2 ","g",list[i]);
|
||||||
print "cp " staticlib " ${destdir}";
|
print "cp " staticlib " ${destdir}";
|
||||||
}
|
}
|
||||||
|
if ( list[i] ~ /lib[^ ]*\.so/ ) {
|
||||||
|
dynamiclib = gensub (/([^ ]*)(lib[^ ]*\.so)/,"\\1\\2 ","g",list[i]);
|
||||||
|
print "echo " dynamiclib " found";
|
||||||
|
}
|
||||||
if ( list[i] ~ /-l/ ) {
|
if ( list[i] ~ /-l/ ) {
|
||||||
systemlib = gensub (/-l([^ ]*)/,"lib\\1.a ","g",list[i]);
|
systemlib = gensub (/-l([^ ]*)/,"lib\\1.a ","g",list[i]);
|
||||||
print "systemlib=`find " libdir " -name " systemlib "`" ;
|
print "systemlib=`find " libdir " -name " systemlib "`" ;
|
||||||
@ -124,6 +134,12 @@ BEGIN {
|
|||||||
use_mingw=1
|
use_mingw=1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( list[i] ~ /lib[^ ]*\.so/ ) {
|
||||||
|
dynamiclib = gensub (/([^ ]*)(lib[^ ]*\.so)/,"{$LINKLIB \\2} { found in \\1 }","g",list[i]);
|
||||||
|
librarypath = gensub (/([^ ]*)(lib[^ ]*\.so)/,"{$LIBRARYPATH \\1} { for \\2 }","g",list[i]);
|
||||||
|
print dynamiclib;
|
||||||
|
print librarypath;
|
||||||
|
}
|
||||||
if ( list[i] ~ /-l/ ) {
|
if ( list[i] ~ /-l/ ) {
|
||||||
systemlib = gensub (/-l([^ ]*)/,"{$LINKLIB \\1} { with -l gcc option}","g",list[i]);
|
systemlib = gensub (/-l([^ ]*)/,"{$LINKLIB \\1} { with -l gcc option}","g",list[i]);
|
||||||
print systemlib;
|
print systemlib;
|
||||||
|
Loading…
Reference in New Issue
Block a user