From 33d93e8e87e80125305841ffa42e1fcad8b04d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 27 May 2009 20:58:19 +0200 Subject: [PATCH] Fix build system for the new element binding generator --- gstreamer-sharp/Makefile.am | 9 +++- gstreamer-sharp/baseplugins/Makefile.am | 41 +++++++++++-------- .../baseplugins/inspect/xvimagesink.raw | 2 +- gstreamer-sharp/coreplugins/Makefile.am | 41 +++++++++++-------- .../coreplugins/inspect/capsfilter.raw | 8 ++-- .../coreplugins/inspect/typefind.raw | 8 ++-- 6 files changed, 62 insertions(+), 47 deletions(-) diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 2fed011fac..5736885641 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -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 diff --git a/gstreamer-sharp/baseplugins/Makefile.am b/gstreamer-sharp/baseplugins/Makefile.am index f5206d199d..44a4ab5701 100644 --- a/gstreamer-sharp/baseplugins/Makefile.am +++ b/gstreamer-sharp/baseplugins/Makefile.am @@ -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 diff --git a/gstreamer-sharp/baseplugins/inspect/xvimagesink.raw b/gstreamer-sharp/baseplugins/inspect/xvimagesink.raw index c6d8bb1826..839274aa71 100644 --- a/gstreamer-sharp/baseplugins/inspect/xvimagesink.raw +++ b/gstreamer-sharp/baseplugins/inspect/xvimagesink.raw @@ -19,11 +19,11 @@ - + diff --git a/gstreamer-sharp/coreplugins/Makefile.am b/gstreamer-sharp/coreplugins/Makefile.am index a18b4a3fc5..8cf6ad6faa 100644 --- a/gstreamer-sharp/coreplugins/Makefile.am +++ b/gstreamer-sharp/coreplugins/Makefile.am @@ -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 diff --git a/gstreamer-sharp/coreplugins/inspect/capsfilter.raw b/gstreamer-sharp/coreplugins/inspect/capsfilter.raw index 0d108c7af0..123d3ad10e 100644 --- a/gstreamer-sharp/coreplugins/inspect/capsfilter.raw +++ b/gstreamer-sharp/coreplugins/inspect/capsfilter.raw @@ -20,14 +20,14 @@ - src - src + sink + sink always ANY - sink - sink + src + src always ANY diff --git a/gstreamer-sharp/coreplugins/inspect/typefind.raw b/gstreamer-sharp/coreplugins/inspect/typefind.raw index 319e5835b1..9dce9a765d 100644 --- a/gstreamer-sharp/coreplugins/inspect/typefind.raw +++ b/gstreamer-sharp/coreplugins/inspect/typefind.raw @@ -18,14 +18,14 @@ - src - src + sink + sink always ANY - sink - sink + src + src always ANY