xbmc/xbmc — pull request #4846 by Memphiz (2014-06-02 20:05:36+00:00)
Title: [jsonbuilder] - do it properly ...

The way the native tool JsonSchemaBuilder was integrated into our buildsystem was not the way it should be.

1. JsonSchemaBuilder was ment to be built during bootstrap of XBMCs configure. This is just not possible atm. When building / bootstrapping for ios for example and missing JsonSchemaBuilder (because depends wasn't rebuild before) this implicit call built JsonSchemaBuilder for the ARM architecture and when trying to generate the json schema it just failed (because arm binaries can't be run on the build side). The check for "CROSS_COMPILING" there didn't have any chance to work because this variable is set in tools/depends/Makefile.include which is not available in codegenerator.mk. The problem is that CXXFLAGS for the target are leaking in somewhere when calling make from the codegenerator.mk / bootstrap. Didn't figure out why

2. The handcrafted makefile of the JsonSchemaBuilder totally ignored our config.site scripts and missused environment variables

3. The JsonSchemaBuilder was built in source which polluted the src dir with tracked and non tracked files. We try to prevent this in the depends dir.

What this PR does:
1. Added a autoconf/automake based buildsystem for JsonSchemaBuilder to get rid of the handcrafted Makefile and obey any config.site scripts and environment variables

2. Fixed the "." Prefix which would never work because prefixes have to be absolute - instead determine the ROOT_DIR of the Makefile (independently of the dir we call make from) and create a proper absolute Prefix

3. Adapt the depends Makefile to match what we have for the other depends (e.x. out of source build - proper clean and distclean targets)

4. Don't implicitly build JsonSchemaBuilder from bootstrap. Instead echo a message that instructs the user to manually build it (make -C tools/depends/native/JsonSchemaBuilder). - NOTE - this is what we want - calling a make into our depends from the bootstrap WILL build for the target side and ignores our real intention! - This is invalid! Calling tools and stuff is valid - but not building them (until someone figures out how to do it correctly without leaking target CXXFLAGS in there).

Jenkins was happy with it:

http://jenkins.xbmc.org/view/Helpers/job/XBMC-BuildMulti-All/206/

@wsnipex and @davilla for review