Mercurial > octave-nkf
diff mkoctfile.in @ 9956:f26a33e21db9
mkoctfile: when compiling files in subdirectories, place object files in current directory by default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 10 Dec 2009 01:49:15 -0500 |
parents | de6b6173c990 |
children | 59ed11557715 |
line wrap: on
line diff
--- a/mkoctfile.in Thu Dec 10 01:28:26 2009 -0500 +++ b/mkoctfile.in Thu Dec 10 01:49:15 2009 -0500 @@ -405,16 +405,16 @@ for f in $f77files; do case $f in *.f) - b=`echo $f | $SED 's,\.f$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.f$,,'` ;; *.F) - b=`echo $f | $SED 's,\.F$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.F$,,'` ;; *.f90) - b=`echo $f | $SED 's,\.f90$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.f90$,,'` ;; *.F90) - b=`echo $f | $SED 's,\.F90$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.F90$,,'` ;; esac if [ -n "$F77" ]; then @@ -440,7 +440,7 @@ if [ -n "$cfiles" ]; then for f in $cfiles; do if [ -n "$CC" ]; then - b=`echo $f | $SED 's,\.c$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.c$,,'` if [ -n "$outputfile" ]; then if $link; then o=$b.o @@ -465,13 +465,13 @@ if [ -n "$CXX" ]; then case $f in *.cc) - b=`echo $f | $SED 's,\.cc$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.cc$,,'` ;; *.C) - b=`echo $f | $SED 's,\.C$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.C$,,'` ;; *.cpp) - b=`echo $f | $SED 's,\.cpp$,,'` + b=`echo $f | $SED 's,.*/,,; s,\.cpp$,,'` ;; esac if [ -n "$outputfile" ]; then