comparison 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
comparison
equal deleted inserted replaced
9955:33537a4d223f 9956:f26a33e21db9
403 403
404 if [ -n "$f77files" ]; then 404 if [ -n "$f77files" ]; then
405 for f in $f77files; do 405 for f in $f77files; do
406 case $f in 406 case $f in
407 *.f) 407 *.f)
408 b=`echo $f | $SED 's,\.f$,,'` 408 b=`echo $f | $SED 's,.*/,,; s,\.f$,,'`
409 ;; 409 ;;
410 *.F) 410 *.F)
411 b=`echo $f | $SED 's,\.F$,,'` 411 b=`echo $f | $SED 's,.*/,,; s,\.F$,,'`
412 ;; 412 ;;
413 *.f90) 413 *.f90)
414 b=`echo $f | $SED 's,\.f90$,,'` 414 b=`echo $f | $SED 's,.*/,,; s,\.f90$,,'`
415 ;; 415 ;;
416 *.F90) 416 *.F90)
417 b=`echo $f | $SED 's,\.F90$,,'` 417 b=`echo $f | $SED 's,.*/,,; s,\.F90$,,'`
418 ;; 418 ;;
419 esac 419 esac
420 if [ -n "$F77" ]; then 420 if [ -n "$F77" ]; then
421 if [ -n "$outputfile" ]; then 421 if [ -n "$outputfile" ]; then
422 if $link; then 422 if $link; then
438 fi 438 fi
439 439
440 if [ -n "$cfiles" ]; then 440 if [ -n "$cfiles" ]; then
441 for f in $cfiles; do 441 for f in $cfiles; do
442 if [ -n "$CC" ]; then 442 if [ -n "$CC" ]; then
443 b=`echo $f | $SED 's,\.c$,,'` 443 b=`echo $f | $SED 's,.*/,,; s,\.c$,,'`
444 if [ -n "$outputfile" ]; then 444 if [ -n "$outputfile" ]; then
445 if $link; then 445 if $link; then
446 o=$b.o 446 o=$b.o
447 else 447 else
448 o=$outputfile 448 o=$outputfile
463 if [ -n "$ccfiles" ]; then 463 if [ -n "$ccfiles" ]; then
464 for f in $ccfiles; do 464 for f in $ccfiles; do
465 if [ -n "$CXX" ]; then 465 if [ -n "$CXX" ]; then
466 case $f in 466 case $f in
467 *.cc) 467 *.cc)
468 b=`echo $f | $SED 's,\.cc$,,'` 468 b=`echo $f | $SED 's,.*/,,; s,\.cc$,,'`
469 ;; 469 ;;
470 *.C) 470 *.C)
471 b=`echo $f | $SED 's,\.C$,,'` 471 b=`echo $f | $SED 's,.*/,,; s,\.C$,,'`
472 ;; 472 ;;
473 *.cpp) 473 *.cpp)
474 b=`echo $f | $SED 's,\.cpp$,,'` 474 b=`echo $f | $SED 's,.*/,,; s,\.cpp$,,'`
475 ;; 475 ;;
476 esac 476 esac
477 if [ -n "$outputfile" ]; then 477 if [ -n "$outputfile" ]; then
478 if $link; then 478 if $link; then
479 o=$b.o 479 o=$b.o