DOXY_XML_PATH=$(GENDIR)/doxygenxml
endif
+GENERATED_JSON = $(INTERFACES_DIR)/json-rpc/ServiceDescription.h addons/xbmc.json/addon.xml
+ifeq ($(wildcard $(JSON_BUILDER)),)
+ JSON_BUILDER = $(shell which JsonSchemaBuilder)
+ifeq ($(JSON_BUILDER),)
+ JSON_BUILDER = tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder
+endif
+endif
+
GENDIR = $(INTERFACES_DIR)/python/generated
GROOVY_DIR = $(TOPDIR)/lib/groovy
vpath %.i $(INTERFACES_DIR)/swig
$(GENDIR)/%.cpp: $(GENDIR)/%.xml $(JAVA) $(SWIG) $(DOXY_XML_PATH)
+ # Work around potential groovy bug reported at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733234
$(JAVA) -cp "$(GROOVY_DIR)/groovy-all-2.1.7.jar:$(GROOVY_DIR)/commons-lang-2.6.jar:$(TOPDIR)/tools/codegenerator:$(INTERFACES_DIR)/python" \
org.codehaus.groovy.tools.FileSystemCompiler -d $(TOPDIR)/tools/codegenerator $(TOPDIR)/tools/codegenerator/Helper.groovy $(TOPDIR)/tools/codegenerator/SwigTypeParser.groovy $(INTERFACES_DIR)/python/MethodType.groovy $(INTERFACES_DIR)/python/PythonTools.groovy
$(JAVA) -cp "$(GROOVY_DIR)/groovy-all-2.1.7.jar:$(GROOVY_DIR)/commons-lang-2.6.jar:$(TOPDIR)/tools/codegenerator:$(INTERFACES_DIR)/python" \
mkdir -p $(GENDIR)
$(SWIG) -w401 -c++ -o $@ -xml -I$(TOPDIR)/xbmc -xmllang python $<
-codegenerated: $(DOXYGEN) $(SWIG) $(JAVA) $(GENERATED)
+codegenerated: $(DOXYGEN) $(SWIG) $(JAVA) $(GENERATED) $(GENERATED_JSON) $(GENERATED_ADDON_JSON)
$(DOXY_XML_PATH): $(SWIG) $(JAVA)
cd $(INTERFACES_DIR)/python; ($(DOXYGEN) Doxyfile > /dev/null) 2>&1 | grep -v " warning: "
@echo This is not necessarily an error.
@false
+$(GENERATED_JSON): $(JSON_BUILDER)
+ @echo Jsonbuilder: $(JSON_BUILDER)
+ make -C $(INTERFACES_DIR)/json-rpc $(notdir $@)
+
+$(JSON_BUILDER):
+ifeq ($(BOOTSTRAP_FROM_DEPENDS), yes)
+ @echo JsonSchemaBuilder not found. You didn\'t build depends. Check docs/README.\<yourplatform\>
+ @false
+else
+#build json builder - ".." because makefile is in the parent dir of "bin"
+ make -C $(abspath $(dir $@)..)
+endif