mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 19:06:33 +00:00
Fix out-of-tree builds for real now
This commit is contained in:
parent
45f07c6ed1
commit
9e75855156
4 changed files with 45 additions and 42 deletions
|
@ -466,8 +466,8 @@ public class ElementGen {
|
|||
}
|
||||
|
||||
public static int Main (string[] args) {
|
||||
if (args.Length != 3) {
|
||||
Console.Error.WriteLine ("Usage: element-gen --namespace=<namespace> --api=<api> --input=<in-filename>");
|
||||
if (args.Length != 4) {
|
||||
Console.Error.WriteLine ("Usage: element-gen --namespace=<namespace> --api=<api> --input=<in-filename> --customfile=<custom-file>");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -475,6 +475,8 @@ public class ElementGen {
|
|||
XmlDocument api_doc = new XmlDocument ();
|
||||
XmlDocument introspect_doc = new XmlDocument ();
|
||||
string filename = null;
|
||||
string customfile = null;
|
||||
StreamReader custom_code = null;
|
||||
|
||||
foreach (string arg in args) {
|
||||
|
||||
|
@ -482,13 +484,19 @@ public class ElementGen {
|
|||
filename = arg.Substring (8);
|
||||
|
||||
try {
|
||||
Stream stream = File.OpenRead (filename + ".xml");
|
||||
Stream stream = File.OpenRead (filename);
|
||||
introspect_doc.Load (stream);
|
||||
stream.Close ();
|
||||
} catch (Exception e) {
|
||||
Console.Error.WriteLine ("Failed to load introspection XML:\n" + e.ToString ());
|
||||
return -2;
|
||||
}
|
||||
} else if (arg.StartsWith ("--customfile=")) {
|
||||
customfile = arg.Substring (13);
|
||||
|
||||
try {
|
||||
custom_code = System.IO.File.OpenText (customfile);
|
||||
} catch (Exception) { } // No custom file is OK
|
||||
} else if (arg.StartsWith ("--api=")) {
|
||||
|
||||
string api_filename = arg.Substring (6);
|
||||
|
@ -525,11 +533,6 @@ public class ElementGen {
|
|||
return -2;
|
||||
}
|
||||
|
||||
StreamReader custom_code = null;
|
||||
try {
|
||||
custom_code = System.IO.File.OpenText (filename + ".custom");
|
||||
} catch (Exception) {} // No custom file is OK
|
||||
|
||||
if (IsHidden (introspect_doc.DocumentElement))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ customs = \
|
|||
ControlSource.custom \
|
||||
VideoUtil.custom
|
||||
|
||||
plugin_csfiles = coreplugins/generated/*.cs \
|
||||
baseplugins/generated/*.cs
|
||||
plugin_csfiles = $(builddir)/coreplugins/generated/*.cs \
|
||||
$(builddir)/baseplugins/generated/*.cs
|
||||
|
||||
build_customs = $(addprefix $(srcdir)/, $(customs))
|
||||
|
||||
|
@ -147,12 +147,12 @@ generated-stamp: $(API) $(build_customs) $(overrides)
|
|||
&& mv generated/ObjectManager.cs.tmp generated/ObjectManager.cs \
|
||||
&& touch generated-stamp
|
||||
|
||||
coreplugins/generated/*.cs: coreplugins/generated
|
||||
coreplugins/generated: $(API) coreplugins/*.metadata coreplugins/inspect/*.raw
|
||||
coreplugins/generated/*.cs: $(API) $(builddir)/coreplugins/generated
|
||||
coreplugins/generated: $(API) $(srcdir)/coreplugins/*.metadata $(srcdir)/coreplugins/inspect/*.raw
|
||||
$(MAKE) -C coreplugins
|
||||
|
||||
baseplugins/generated/*.cs: baseplugins/generated
|
||||
baseplugins/generated: $(API) baseplugins/*.custom baseplugins/*.metadata baseplugins/inspect/*.raw
|
||||
baseplugins/generated/*.cs: $(API) $(builddir)/baseplugins/generated
|
||||
baseplugins/generated: $(API) $(srcdir)/baseplugins/*.custom $(srcdir)/baseplugins/*.metadata $(srcdir)/baseplugins/inspect/*.raw
|
||||
$(MAKE) -C baseplugins
|
||||
|
||||
$(KEYFILE): $(top_srcdir)/gstreamer-sharp.snk
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
ELEMENTS = decodebin playbin xvimagesink decodebin2 playbin2
|
||||
|
||||
NAMESPACE = Gst.BasePlugins
|
||||
INSPECT_FILES = $(patsubst %,inspect/%.raw,$(ELEMENTS))
|
||||
CUSTOM_FILES = playbin.custom
|
||||
METADATA_FILES = decodebin.metadata playbin.metadata decodebin2.metadata playbin2.metadata
|
||||
CS_FILES = $(patsubst %,generated/%.cs,$(ELEMENTS))
|
||||
XML_FILES = $(patsubst %,%.xml,$(ELEMENTS))
|
||||
INSPECT_FILES = $(patsubst %,$(srcdir)/inspect/%.raw,$(ELEMENTS))
|
||||
CUSTOM_FILES = $(srcdir)/playbin.custom
|
||||
METADATA_FILES = $(srcdir)/decodebin.metadata $(srcdir)/playbin.metadata $(srcdir)/decodebin2.metadata $(srcdir)/playbin2.metadata
|
||||
CS_FILES = $(patsubst %,$(builddir)/generated/%.cs,$(ELEMENTS))
|
||||
XML_FILES = $(patsubst %,$(builddir)/%.xml,$(ELEMENTS))
|
||||
|
||||
EXTRA_DIST = $(METADATA_FILES) $(CUSTOM_FILES) $(INSPECT_FILES)
|
||||
CLEANFILES = $(XML_FILES) $(CS_FILES)
|
||||
|
@ -17,15 +17,15 @@ inspect-%:
|
|||
all: $(XML_FILES) $(CS_FILES)
|
||||
touch generated
|
||||
|
||||
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) %.xml
|
||||
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) $(builddir)/%.xml
|
||||
@mkdir -p generated
|
||||
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
|
||||
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,%,$@) > $@
|
||||
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,$(builddir)/%.xml,$@) --customfile=$(patsubst generated/%.cs,$(srcdir)/%.custom,$@) > $@
|
||||
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe inspect/%.raw %.metadata
|
||||
cp $(patsubst %.xml,inspect/%.raw,$@) $@
|
||||
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ --metadata=$(patsubst %.xml,%.metadata,$@)
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(srcdir)/inspect/%.raw $(srcdir)/%.metadata
|
||||
cp $(patsubst %.xml,$(srcdir)/inspect/%.raw,$@) $@
|
||||
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ --metadata=$(patsubst %.xml,$(srcdir)/%.metadata,$@)
|
||||
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe inspect/%.raw
|
||||
cp $(patsubst %.xml,inspect/%.raw,$@) $@
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(srcdir)/inspect/%.raw
|
||||
cp $(patsubst %.xml,$(srcdir)/inspect/%.raw,$@) $@
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
ELEMENTS = capsfilter fakesrc fakesink fdsrc fdsink filesrc filesink identity queue tee typefind multiqueue
|
||||
|
||||
NAMESPACE = Gst.CorePlugins
|
||||
INSPECT_FILES = $(patsubst %,inspect/%.raw,$(ELEMENTS))
|
||||
INSPECT_FILES = $(patsubst %,$(srcdir)/inspect/%.raw,$(ELEMENTS))
|
||||
CUSTOM_FILES =
|
||||
METADATA_FILES = typefind.metadata \
|
||||
fakesrc.metadata \
|
||||
fakesink.metadata \
|
||||
identity.metadata
|
||||
CS_FILES = $(patsubst %,generated/%.cs,$(ELEMENTS))
|
||||
OTHER_CS_FILES = memindex.cs \
|
||||
fileindex.cs
|
||||
XML_FILES = $(patsubst %,%.xml,$(ELEMENTS))
|
||||
METADATA_FILES = $(srcdir)/typefind.metadata \
|
||||
$(srcdir)/fakesrc.metadata \
|
||||
$(srcdir)/fakesink.metadata \
|
||||
$(srcdir)/identity.metadata
|
||||
CS_FILES = $(patsubst %,$(builddir)/generated/%.cs,$(ELEMENTS))
|
||||
OTHER_CS_FILES = $(srcdir)/memindex.cs \
|
||||
$(srcdir)/fileindex.cs
|
||||
XML_FILES = $(patsubst %,$(builddir)/%.xml,$(ELEMENTS))
|
||||
|
||||
EXTRA_DIST = $(METADATA_FILES) $(CUSTOM_FILES) $(INSPECT_FILES) $(OTHER_CS_FILES)
|
||||
CLEANFILES = $(XML_FILES) $(CS_FILES)
|
||||
|
@ -22,15 +22,15 @@ inspect-%:
|
|||
all: $(XML_FILES) $(CS_FILES)
|
||||
touch generated
|
||||
|
||||
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) %.xml
|
||||
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) $(builddir)/%.xml
|
||||
@mkdir -p generated
|
||||
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
|
||||
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,%,$@) > $@
|
||||
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,$(builddir)/%.xml,$@) --customfile=$(patsubst generated/%.cs,$(srcdir)/%.custom,$@) > $@
|
||||
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe inspect/%.raw %.metadata
|
||||
cp $(patsubst %.xml,inspect/%.raw,$@) $@
|
||||
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ --metadata=$(patsubst %.xml,%.metadata,$@)
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(srcdir)/inspect/%.raw $(srcdir)/%.metadata
|
||||
cp $(patsubst %.xml,$(srcdir)/inspect/%.raw,$@) $@
|
||||
$(MONO) $(top_builddir)/parser/gst-gapi-fixup.exe --api=$@ --metadata=$(patsubst %.xml,$(srcdir)/%.metadata,$@)
|
||||
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe inspect/%.raw
|
||||
cp $(patsubst %.xml,inspect/%.raw,$@) $@
|
||||
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(srcdir)/inspect/%.raw
|
||||
cp $(patsubst %.xml,$(srcdir)/inspect/%.raw,$@) $@
|
||||
|
||||
|
|
Loading…
Reference in a new issue