Fix build system for the new element binding generator

This commit is contained in:
Sebastian Dröge 2009-05-27 20:58:19 +02:00
parent 32ba2488a2
commit 33d93e8e87
6 changed files with 62 additions and 47 deletions

View file

@ -1,4 +1,4 @@
SUBDIRS = coreplugins baseplugins . glue
SUBDIRS = . glue coreplugins baseplugins
TARGET = $(ASSEMBLY)
noinst_DATA = $(TARGET)
@ -136,13 +136,18 @@ generated-stamp: $(API) $(build_customs) $(overrides)
&& mv generated/ObjectManager.cs.tmp generated/ObjectManager.cs \
&& touch generated-stamp
coreplugins/*.cs: $(API) coreplugins/*.custom coreplugins/inspect/*.raw
$(MAKE) -C coreplugins
baseplugins/*.cs: $(API) baseplugins/*.custom baseplugins/inspect/*.raw
$(MAKE) -C baseplugins
$(KEYFILE): $(top_srcdir)/gstreamer-sharp.snk
cp $(top_srcdir)/gstreamer-sharp.snk .
$(ASSEMBLY): $(build_sources) generated-stamp $(KEYFILE)
$(CSC) -nowarn:0612 -debug -unsafe -out:$(ASSEMBLY) -target:library $(references) $(csc_build_sources) $(GENERATED_SOURCES)
plugins-update:
$(MAKE) -C coreplugins plugins-update
$(MAKE) -C baseplugins plugins-update

View file

@ -1,24 +1,29 @@
ELEMENTS = decodebin playbin xvimagesink
EXTRA_DIST = *.custom inspect/*.raw
CLEANFILES = $(srcdir)/*.xml $(srcdir)/*.cs element-bindings
NAMESPACE = Gst.BasePlugins
INSPECT_FILES = $(patsubst %,inspect/%.raw,$(ELEMENTS))
CUSTOM_FILES = decodebin.custom
METADATA_FILES = playbin.metadata
CS_FILES = $(patsubst %,%.cs,$(ELEMENTS))
XML_FILES = $(patsubst %,%.xml,$(ELEMENTS))
plugins-update: $(top_builddir)/elementgen/gsts-xmlinspect
for element in $(ELEMENTS); do \
$(top_builddir)/elementgen/gsts-xmlinspect $$element > inspect/$$element.raw; \
done
EXTRA_DIST = $(CUSTOM_FILES) $(INSPECT_FILES)
CLEANFILES = $(XML_FILES) $(CS_FILES)
all: element-bindings
plugins-update: $(top_builddir)/elementgen/gsts-xmlinspect $(INSPECT_FILES)
inspect/%.raw: $(top_builddir)/elementgen/gsts-xmlinspect
$(top_builddir)/elementgen/gsts-xmlinspect $(patsubst inspect/%.raw,%,$@) > $@
element-bindings: $(srcdir)/../gstreamer-api.xml $(srcdir)/inspect/*.raw
for element in $(ELEMENTS); do \
cp inspect/$$element.raw $$element.xml ; \
if [ -e $$element.metadata ]; then \
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$$element.xml \
--metadata=$$element.metadata ; \
fi ; \
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=Gst.BasePlugins \
--api=$(srcdir)/../gstreamer-api.xml --input=$$element > $$element.cs ; \
done
touch element-bindings
all: $(XML_FILES) $(CS_FILES)
%.cs: $(top_builddir)/elementgen/element-gen.exe $(CUSTOM_FILES) $(XML_FILES)
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst %.cs,%,$@) > $@
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(INSPECT_FILES) $(METADATA_FILES)
cp $(patsubst %.xml,inspect/%.raw,$@) $@
if [ -e $(patsubst %.xml,%.metadata,$@) ]; then \
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ \
--metadata=$(patsubst %.xml,%.metadata,$@) ; \
fi

View file

@ -19,11 +19,11 @@
</object>
</object>
<interfaces>
<interface name="GstPropertyProbe" />
<interface name="GstImplementsInterface" />
<interface name="GstNavigation" />
<interface name="GstXOverlay" />
<interface name="GstColorBalance" />
<interface name="GstPropertyProbe" />
</interfaces>
<pad-templates>
<pad-template>

View file

@ -1,25 +1,30 @@
#ELEMENTS = capsfilter fakesrc fakesink fdsrc fdsink filesrc filesink identity queue tee typefind multiqueue
ELEMENTS = capsfilter typefind
EXTRA_DIST = *.custom inspect/*.raw
CLEANFILES = $(srcdir)/*.xml $(srcdir)/*.cs element-bindings
NAMESPACE = Gst.CorePlugins
INSPECT_FILES = $(patsubst %,inspect/%.raw,$(ELEMENTS))
CUSTOM_FILES = typefind.custom
METADATA_FILES =
CS_FILES = $(patsubst %,%.cs,$(ELEMENTS))
XML_FILES = $(patsubst %,%.xml,$(ELEMENTS))
plugins-update: $(top_builddir)/elementgen/gsts-xmlinspect
for element in $(ELEMENTS); do \
$(top_builddir)/elementgen/gsts-xmlinspect $$element > inspect/$$element.raw; \
done
EXTRA_DIST = $(CUSTOM_FILES) $(INSPECT_FILES)
CLEANFILES = $(XML_FILES) $(CS_FILES)
all: element-bindings
plugins-update: $(top_builddir)/elementgen/gsts-xmlinspect $(INSPECT_FILES)
inspect/%.raw: $(top_builddir)/elementgen/gsts-xmlinspect
$(top_builddir)/elementgen/gsts-xmlinspect $(patsubst inspect/%.raw,%,$@) > $@
element-bindings: $(srcdir)/../gstreamer-api.xml $(srcdir)/inspect/*.raw
for element in $(ELEMENTS); do \
cp inspect/$$element.raw $$element.xml ; \
if [ -e $$element.metadata ]; then \
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$$element.xml \
--metadata=$$element.metadata ; \
fi ; \
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=Gst.CorePlugins \
--api=$(srcdir)/../gstreamer-api.xml --input=$$element > $$element.cs ; \
done
touch element-bindings
all: $(XML_FILES) $(CS_FILES)
%.cs: $(top_builddir)/elementgen/element-gen.exe $(CUSTOM_FILES) $(XML_FILES)
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst %.cs,%,$@) > $@
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(INSPECT_FILES) $(METADATA_FILES)
cp $(patsubst %.xml,inspect/%.raw,$@) $@
if [ -e $(patsubst %.xml,%.metadata,$@) ]; then \
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ \
--metadata=$(patsubst %.xml,%.metadata,$@) ; \
fi

View file

@ -20,14 +20,14 @@
</interfaces>
<pad-templates>
<pad-template>
<name>src</name>
<direction>src</direction>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<caps>ANY</caps>
</pad-template>
<pad-template>
<name>sink</name>
<direction>sink</direction>
<name>src</name>
<direction>src</direction>
<presence>always</presence>
<caps>ANY</caps>
</pad-template>

View file

@ -18,14 +18,14 @@
</interfaces>
<pad-templates>
<pad-template>
<name>src</name>
<direction>src</direction>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<caps>ANY</caps>
</pad-template>
<pad-template>
<name>sink</name>
<direction>sink</direction>
<name>src</name>
<direction>src</direction>
<presence>always</presence>
<caps>ANY</caps>
</pad-template>