Question about building the Python interface and Codegeneration
#1
I've been working on a bug fix for the 'xbmc.getLanguage()' Python function that I have previously described here:  372626 (thread)

I was having problems getting my Python script to recognise a new ENUM that I had created and my research lead me to this: Codegeneration (wiki) solution.

And specifically, this:
Code:
In order to run the codegenerator on any changes you made to the native api in interfaces/legacy you need to run 'make' from xbmc/interfaces/python.
Unfortunately, when I change into the specified directory and run 'make", I receive the following error.

Code:
make: *** No targets specified and no makefile found.  Stop.
I suspect, based on the high quality of the other build tools, that I am overlooking something really very simple.

If I create a new build environment from scratch, I am able to recompile everything and the new ENUM works fine, it just takes a long time to recompile.

One of the steps in creating the new build environment must also rebuild the required files (./build/swig/AddonModuleXbmc.i.cpp, etc), however, I am unable to find the command to achieve this.

Any advice will be gratefully received.

I'm using an Ubuntu build environment.
Reply
#2
If anyone else encountered this issue, here is the solution that I use.  I'm not sure if this is the 'best' solution, but this is what I've discovered:

For reference, my normal build time, from scratch, is about 32 minutes.

When I have made changes to one of the Python module files that would normally be ignored by a 'normal' rebuild, I do the following:
 
  • In my 'kodi-build' directory, I delete the 'build' sub-directory with 'rm -r build/'.
  • I then rerun 'cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl' to rebuild my 'kodi-build' directory.
  • This seems to rebuild the Codegeneration stuff but leave a lot of existing object files intact.
  • I then recompile with 'cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)'.

The build time after doing this is just under 5 minutes and the changes to the Python module are now present and working in the executable produced.
Reply

Logout Mark Read Team Forum Stats Members Help
Question about building the Python interface and Codegeneration0