octave-maintainers
[Top][All Lists]
Advanced

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

Re: octave tools in C++ form


From: John W. Eaton
Subject: Re: octave tools in C++ form
Date: Fri, 8 Dec 2006 02:08:21 -0500

On  7-Dec-2006, Thomas Weber wrote:

| Am Donnerstag, 7. Dezember 2006 18:46 schrieb John W. Eaton:
| > On  7-Dec-2006, address@hidden wrote:
| > If we are going to have the C++ version, I think we should use it on
| > all systems for consistency.  I think it will just be confusing if
| > mkoctfile does slightly different things on different platforms.
| 
| Would it be possible to generate the bash script from the C++ file?

I don't know how we would do that.

| I routinely open the bash script in an editor to look for paths. It's much 
| faster than reading the manpage and guessing which variable I'm looking for. 

Why do you have to guess?  I think this shows that the man page (and
text printed by --help) is not good enough.  What information is
missing?  Would it help if it said precisely what commands are run
(using the variable names that you can set) and what the default
values for those variables are on your system?  For example, something
like

  C++ files are compiled using the command

    $CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $pass_on_options $incflags 
$defs $f -o $o

  The default values of these variables on this system are:

    $CXX = g++
    $CPPFLAGS = 
    $CXXPICFLAG = -fPIC
    $ALL_CXXFLAGS = $INCFLAGS $XTRA_CXXFLAGS $CXXFLAGS
    $INCFLAGS = -I/usr/include/octave-2.9.9 -I/usr/include/octave-2.9.9/octave 
-I/usr/include
    $CXXFLAGS = -02 -g
    $XTRA_CXXFLAGS = 

  In addition,

    $pass_on_options are the -Wl,* options passed to mkoctfile

    $incflags are the -I* options passed to mkoctfile

    $defs are the -D* options passed to mkoctfile

    $f is the source file (any *.cc, *.C, or *.cpp file named in the
    mkoctfile command

    $o is the output file name, constructed from the basename of $f


We would need similar additions for Fortran and  C files, and also for
the final link step.

I think that the fact that these programs can change is a good reason
to have just one version.

jwe


reply via email to

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