changeset 5159:f0f3ccba4388

[project @ 2005-02-23 00:57:13 by jwe]
author jwe
date Wed, 23 Feb 2005 00:57:13 +0000
parents 955ed0dcdc5f
children 6b9c4cf05a6a
files ChangeLog mkoctfile.in
diffstat 2 files changed, 32 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 23 00:40:57 2005 +0000
+++ b/ChangeLog	Wed Feb 23 00:57:13 2005 +0000
@@ -1,3 +1,8 @@
+2005-02-22  Shan G. Smith  <shan@cybertrails.com>
+
+	* mkoctfile.in: If not linking, then use output file name
+	specified with -o.
+
 2005-02-21  John W. Eaton  <jwe@octave.org>
 
 	* texi2dvi: Delete our private version.
--- a/mkoctfile.in	Wed Feb 23 00:40:57 2005 +0000
+++ b/mkoctfile.in	Wed Feb 23 00:57:13 2005 +0000
@@ -304,7 +304,15 @@
       ;;
     esac
     if [ -n "$F77" ]; then
-      o=$b.o
+      if [ -n "$outputfile" ]; then
+	if $link; then 
+	  o=$b.o
+	else
+	  o=$outputfile
+	fi
+      else
+        o=$b.o
+      fi
       objfiles="$objfiles $o"
       cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $pass_on_options $f -o $o"
       $dbg $cmd
@@ -325,7 +333,15 @@
   for f in $cfiles; do
     if [ -n  "$CC" ]; then
       b=`echo $f | $SED 's,\.c$,,'`
-      o=$b.o
+      if [ -n "$outputfile" ]; then
+	if $link; then
+	  o=$b.o
+	else
+	  o=$outputfile
+	fi
+      else
+	o=$b.o
+      fi
       objfiles="$objfiles $o"
       cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $pass_on_options $incflags $defs $f -o $o"
       $dbg $cmd
@@ -350,7 +366,15 @@
 	  b=`echo $f | $SED 's,\.cpp$,,'`
 	;;
       esac
-      o=$b.o
+      if [ -n "$outputfile" ]; then
+	if $link; then
+	  o=$b.o
+	else
+	  o=$outputfile
+	fi
+      else
+	o=$b.o
+      fi
       objfiles="$objfiles $o"
       cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $pass_on_options $incflags $defs $f -o $o"
       $dbg $cmd