diff mkoctfile.in @ 5285:fe5ee25a5e6c

[project @ 2005-04-19 15:02:49 by jwe]
author jwe
date Tue, 19 Apr 2005 15:02:49 +0000
parents 16a6247730d9
children d2df058c4319
line wrap: on
line diff
--- a/mkoctfile.in
+++ b/mkoctfile.in
@@ -7,6 +7,8 @@
 
 set -e
 
+OCTAVE_VERSION="%OCTAVE_CONF_VERSION%"
+
 # Default values for these variables are filled in when Octave is
 # compiled. 
 
@@ -63,6 +65,8 @@
 
 usage_msg="usage: mkoctfile [options] file ..."
 
+version_msg="mkoctfile, version $OCTAVE_VERSION"
+
 cfiles=
 ccfiles=
 f77files=
@@ -87,6 +91,15 @@
   exit 1
 fi
 
+if [ $# -eq 1 ]; then
+  case "$1" in
+    -v | --version)
+      echo $version_msg 1>&2
+      exit 0
+    ;;
+  esac
+fi
+
 while [ $# -gt 0 ]; do
   file=
   case "$1" in
@@ -404,7 +417,7 @@
 
 # Link all the object files.
 
-if $link; then
+if $link && [ -n "$objfiles" ]; then
   if $link_stand_alone; then
     if [ -n "$LD_CXX" ]; then
       cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS"