From: William S F. <ws...@fu...> - 2014-10-31 18:59:44
|
Hi Simon This sound better, the test-suite run time improvement is rather dramatic. A few questions still: 1) Why is builder.sce the default given all its problems? 2) Why have builder.sce at all? It clearly doesn't work very well and as I've said before, SWIG is not a build tool generator and I don't see why SWIG should support some quirky build system. 3) Why are the contents of gw_<module>.c file generated separately to the contents of <module>_wrap.c instead of generating just one file? 4) I haven't seen any doc updates as mentioned below. These need to be in place, but I suggest we finish the discussion on the need for builder first. William On 22 October 2014 14:05, Simon Marchetto < sim...@sc...> wrote: > Hello William, > > Now SWIG Scilab supports standard build. The SWIG test-suite and examples > now build like all other languages. > The Scilab build system is still also supported, and used by default. > > In detail: > > - by default, SWIG generates the builder.sce script, that you have to run > from Scilab to build the module. > Nothing changed, except I could simplify the builder.sce code since it is > no more used in the context of SWIG testing. > > - with the -nobuilder option, SWIG generates two files: > - the gateway (module) entry point gw_<module>.c, mandatory, which > is used to link the functions declared in Scilab to the function C > implementations. > - the loader.sce script, which is used later to load the module > (link dynamically the module with Scilab). > The SWIG test-suite and examples use now this option, then build the > wrapper and the gateway entry point, and link to the shared libray, all > these with the configured compiler. > > I've prefixed all SWIG Scilab command line options related to builder.sce > mode (-addcflags -> -buildercflags), so that the user knows these options > concern this mode only. > > The test-suite execution time on Travis has been reduced drastically with > the change, from about 15mn to 3mn. > The difference comes probably from the fact Scilab build system uses > libtool. > > I'm updating now the documentation. > > Simon > > > Le 17/09/2014 22:54, William S Fulton a écrit : > > I'm sorry if it wasn't clear enough that the build should use the > successful approaches utilised elsewhere. SWIG has long tried not to be too > builder generator as this is a specialised area which numerous other tools > attempt to solve. The reasons for this should be clearer now, I trust. > > Probably you have fixed all the bugs now, like -o. What I'd like to see > next is the Example/Makefile.in operating like the other languages... just > a nice simple and clear invocation of the C/C++ compiler after running > SWIG. Modifying the makefiles really shouldn't be hard, as you'd base it on > what is already in the other languages, you hardly need to think about that > too much. I don't quite follow what you mean by having to break the C++ > module code, is this some sort of initialisation? > > Fixing typos etc can be done in a later release... better to get the > fundamentals right first. At least everything else looks to be in good > shape. > > William > > On 17 September 2014 09:00, Simon Marchetto < > sim...@sc...> wrote: > >> William, >> >> I will fix the build system. >> >> I am just a bit sad because it should have been done before, as it is an >> important change and has several impacts. >> I thought about changing it long time ago, but my focus was on >> functionalities like typemaps, and other things, and I was not used at SWIG >> as I am now, it was a little risky. >> Now it means that I have to break all the C++ module code and makefiles, >> on which I have spent many time to get it fixed. >> And documentation will also have several changes too, and these last days >> I was fixing typos.... >> >> But let's move on, it will be a good thing anyway. >> >> Which bugs are you talking about ? I think I ve fixed the -o bug. Are >> there another issues that do not concern the build ? >> >> Regards, >> >> Simon >> >> >> Le 16/09/2014 20:54, William S Fulton a écrit : >> >> Simon, you've addressed everything now except the build complexity and >> bugs, thanks. I'd be happy to merge it but for the quirky build system. >> Users need to get started easily and currently it seems to be user >> unfriendly. As we know that this fundamental component needs fixing, I'd >> rather fix it before release. >> >> One important problem that I can see is the use of full paths in the >> build, eg I see this in the generated code: >> >> cflags = cflags + " >> -I/home/william/swig/github/dabble/Examples/scilab/class"; >> >> This is not portable. For all these reasons, I'd like you to fix all this >> before Scilab is merged into master. I hope that you can find the time and >> that it won't actually take too much effort. Perhaps you could let us know >> when you think it will be realistically ready for release planning. >> >> William >> >> |