From octave-maintainers-request at bevo dot che dot wisc dot edu Mon Nov 6 07:36:19 2000 Subject: RE: mkoctfile suggestion From: "Lippert, Ross A." To: "'Andy Adler'" , octave-maintainers@bevo.che.wisc.edu 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? -r -----Original Message----- From: Andy Adler [mailto:en254 at freenet dot carleton dot ca] Sent: Friday, November 03, 2000 9:29 PM To: octave-maintainers at bevo dot che dot wisc dot edu 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, en254 at ncf dot ca Patch against 2.1.31 --- mkoctfile.orig Fri Nov 3 20:57:41 2000 +++ mkoctfile Fri Nov 3 21:02:04 2000 at @ -48,6 +48,7 @@ ldflags= dbg=: strip=false +link=true if [ $# -eq 0 ]; then echo $usage_msg at @ -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. at @ -124,6 +126,9 @@ -s | --strip) strip=true ;; + -c) + link=false + ;; *) echo "mkoctfile: unrecognized argument $1" exit 1 at @ -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 +fi fi exit 0