Build system fixes

- Use automake --foreign to silence warnings about gnu extensions.
 - Add gstreamer-api.xml as prerequisite for gstreamer-sharp/*plugins/generated/%.cs
 - Avoid executing $(MAKE) -C {core,base}plugins multiple times when gstreamer-api.xml is changed.
 - Only generate xml for elements with changed metadata
This commit is contained in:
Maarten Bosmans 2009-06-05 07:03:45 +02:00 committed by Sebastian Dröge
parent 055571f20c
commit ff24d7d310
5 changed files with 23 additions and 18 deletions

View file

@ -92,8 +92,8 @@ if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt ||
echo "Running automake --add-missing --foreign $am_opt ..."
automake --add-missing --foreign $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }

View file

@ -7,5 +7,6 @@ gstreamer-sharp.dll.config
gstreamer-sharp.dll.mdb
gstreamer-sharp.pdb
gstreamer-sharp.snk
*plugins/generated/*
*plugins/*.cs
*plugins/*.xml

View file

@ -145,10 +145,12 @@ generated-stamp: $(API) $(build_customs) $(overrides)
&& mv generated/ObjectManager.cs.tmp generated/ObjectManager.cs \
&& touch generated-stamp
coreplugins/generated/*.cs: $(API) coreplugins/*.metadata coreplugins/inspect/*.raw
coreplugins/generated/*.cs: coreplugins/generated
coreplugins/generated: $(API) coreplugins/*.metadata coreplugins/inspect/*.raw
$(MAKE) -C coreplugins
baseplugins/generated/*.cs: $(API) baseplugins/*.custom baseplugins/*.metadata baseplugins/inspect/*.raw
baseplugins/generated/*.cs: baseplugins/generated
baseplugins/generated: $(API) baseplugins/*.custom baseplugins/*.metadata baseplugins/inspect/*.raw
$(MAKE) -C baseplugins
$(KEYFILE): $(top_srcdir)/gstreamer-sharp.snk

View file

@ -15,16 +15,17 @@ inspect-%:
$(top_builddir)/elementgen/gsts-xmlinspect $(patsubst inspect-%,%,$@) > inspect/$(patsubst inspect-%,%,$@).raw
all: $(XML_FILES) $(CS_FILES)
touch generated
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(CUSTOM_FILES) $(XML_FILES)
mkdir -p generated
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) %.xml
@mkdir -p generated
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,%,$@) > $@
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(INSPECT_FILES) $(METADATA_FILES)
%.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 inspect/%.raw
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,16 +20,17 @@ inspect-%:
$(top_builddir)/elementgen/gsts-xmlinspect $(patsubst inspect-%,%,$@) > inspect/$(patsubst inspect-%,%,$@).raw
all: $(XML_FILES) $(CS_FILES)
touch generated
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(CUSTOM_FILES) $(XML_FILES)
mkdir -p generated
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(srcdir)/../gstreamer-api.xml $(CUSTOM_FILES) %.xml
@mkdir -p generated
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
--api=$(srcdir)/../gstreamer-api.xml --input=$(patsubst generated/%.cs,%,$@) > $@
%.xml: $(top_builddir)/parser/gst-gapi-fixup.exe $(INSPECT_FILES) $(METADATA_FILES)
%.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 inspect/%.raw
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