[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: mkoctfile suggestion

From: Lippert, Ross A.
Subject: RE: mkoctfile suggestion
Date: Mon, 6 Nov 2000 08:19:43 -0500

I could not help notice the name of your file was "make_sparse".
I've been working on some ways to implement sparse matrix manipulations
at the ".m" level (I have been using mostly octave primitives and just
one hand-hacked .oct file for a kind reduction octave doesn't yet support).
Could you and I exchange information, and perhaps, if others are interested,
have a general discussion about sparse matrices in octave?


-----Original Message-----
From: Andy Adler [mailto:address@hidden
Sent: Friday, November 03, 2000 9:29 PM
To: address@hidden
Subject: mkoctfile suggestion

I suggest that the -c option be added to mkoctfile.
This would have the same effect as with gcc, ie
to compile to object but not link:

So, for example, you could do
An:~/octave/sparse> mkoctfile -c make_sparse.cc -ISuperLU/SRC/
An:~/octave/sparse> mkoctfile make_sparse.o -lsuperlu -L.

This would allow it to be nicely used in Makefiles,
so that large projects with multiple source
files don't need to be recompiled from scratch
each time.
Andy Adler,                address@hidden

Patch against 2.1.31

--- mkoctfile.orig      Fri Nov  3 20:57:41 2000
+++ mkoctfile   Fri Nov  3 21:02:04 2000
@@ -48,6 +48,7 @@
 if [ $# -eq 0 ]; then
   echo $usage_msg
@@ -88,6 +89,7 @@
   -lLIB                   Add library LIB to link command.
   -LDIR                   Add -LDIR to link command.
   -o FILE, --output FILE  Output file name.  Default extension is .oct.
+  -c                      Compile, but do not link
   -s, --strip             Strip output file.
   -v, --verbose           Echo commands as they are executed.
@@ -124,6 +126,9 @@
     -s | --strip)
+    -c)
+      link=false
+    ;;
       echo "mkoctfile: unrecognized argument $1"
       exit 1
@@ -202,14 +207,16 @@
 # Link all the object files.
-$dbg $SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags
-eval $SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags
+if $link; then
+  $dbg $SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags
+  eval $SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags
 # Maybe strip it.
 if $strip; then
   $dbg strip $octfile
   eval strip $octfile
 exit 0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]