robotology / yarp-matlab-bindings

SWIG-based bindings of YARP for Matlab and Octave, based on the MEX C-API.
6 stars 5 forks source link

Clone order of yarp and yarp-matlab-bindings affects the binding generation #18

Open diegoferigo opened 6 years ago

diegoferigo commented 6 years ago

If yarp is cloned before yarp_matlab_bindings, the matlab/autogenerated/yarpMATLAB_wrap.cxx file is more recent than yarp.i (contained in the yarp repository).

If the aim is generating the bindings (YARP_GENERATE_MATLAB=ON), the make logic about edit date on target files prevents the regeneration of the cxx (since due to the clone order it is more recent its dependency - the .i file). The process goes directly to linking it with matlab or octave libraries, and the process might fail.

Together with @traversaro we thought that a possible solution, even if not the cleanest, would be to delete the yarpMATLAB_wrap.cxx every time the generation is enabled. This would trigger it whatsoever.

Another quick solution would be to touch the yarp.i file, but that would mean operating on an external folder, that would be even more dirty.

traversaro commented 6 years ago

I think the proper solution is actually to use the yarp.i provided in the YARP installation for generation instead of the one contained in the YARP source directory. This will also permit to generate the bindings from binary distribution of YARP .