why does 'make install' install .cc files?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

why does 'make install' install .cc files?

Carlo de Falco-2
Hi,

I just tried installing the 4.3.0+ built from hg id 90c3839825a3
and I see a bunch of .cc files installed in ${prefix}/include/octave-4.3.0+/octave

ls ${prefix}/include/octave-4.3.0+/octave/*.cc

/opt/octave/4.3/include/octave-4.3.0+/octave/Array.cc           /opt/octave/4.3/include/octave-4.3.0+/octave/MSparse.cc         /opt/octave/4.3/include/octave-4.3.0+/octave/intNDArray.cc
/opt/octave/4.3/include/octave-4.3.0+/octave/DiagArray2.cc      /opt/octave/4.3/include/octave-4.3.0+/octave/Sparse.cc          /opt/octave/4.3/include/octave-4.3.0+/octave/mx-inlines.cc
/opt/octave/4.3/include/octave-4.3.0+/octave/MArray.cc          /opt/octave/4.3/include/octave-4.3.0+/octave/bsxfun-defs.cc     /opt/octave/4.3/include/octave-4.3.0+/octave/oct-sort.cc
/opt/octave/4.3/include/octave-4.3.0+/octave/MDiagArray2.cc     /opt/octave/4.3/include/octave-4.3.0+/octave/graphics-props.cc


Is this expected or is it a bug in "make install"? If it is expected, why is it so?

c.



Reply | Threaded
Open this post in threaded view
|

Re: why does 'make install' install .cc files?

Mike Miller-4
On Sun, Oct 30, 2016 at 16:36:32 +0000, Carlo De Falco wrote:

> Hi,
>
> I just tried installing the 4.3.0+ built from hg id 90c3839825a3
> and I see a bunch of .cc files installed in ${prefix}/include/octave-4.3.0+/octave
>
> ls ${prefix}/include/octave-4.3.0+/octave/*.cc
>
> /opt/octave/4.3/include/octave-4.3.0+/octave/Array.cc           /opt/octave/4.3/include/octave-4.3.0+/octave/MSparse.cc         /opt/octave/4.3/include/octave-4.3.0+/octave/intNDArray.cc
> /opt/octave/4.3/include/octave-4.3.0+/octave/DiagArray2.cc      /opt/octave/4.3/include/octave-4.3.0+/octave/Sparse.cc          /opt/octave/4.3/include/octave-4.3.0+/octave/mx-inlines.cc
> /opt/octave/4.3/include/octave-4.3.0+/octave/MArray.cc          /opt/octave/4.3/include/octave-4.3.0+/octave/bsxfun-defs.cc     /opt/octave/4.3/include/octave-4.3.0+/octave/oct-sort.cc
> /opt/octave/4.3/include/octave-4.3.0+/octave/MDiagArray2.cc     /opt/octave/4.3/include/octave-4.3.0+/octave/graphics-props.cc
>
>
> Is this expected or is it a bug in "make install"? If it is expected, why is it so?

Yes, it is expected and has been this way for some time. These *.cc
files are (all? mainly?) class template implementations. For example,
MArray.h includes mx-inlines.cc. So any user .oct file that uses the
Array or Matrix classes needs to include (indirectly) mx-inlines.cc.

They are basically private implementation that needs to be included due
to the way C++ templates work.

We could clean some of these up or look at other ways of instantiating
the template specializations in a future version, but this is nothing
new (going back to 3.6.4) and nothing to worry about for this release.

--
mike