diff --git a/ChangeLog b/ChangeLog index 8f9a9c70a5..762109cbe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-11-22 Edward Hervey + + * codegen/override.py: + Fix the lookup of override files in the specified search directories. + * gst/Makefile.am: + Don't distribute gstversion.override + Fixup .defs => .c make instructions + All the above fixes the cases where you're building in a directory + different from the source directory. + 2006-11-15 Michael Smith * gst/extend/discoverer.py: diff --git a/codegen/override.py b/codegen/override.py index 4940876f1c..2e8c6a4c30 100644 --- a/codegen/override.py +++ b/codegen/override.py @@ -44,7 +44,7 @@ class Overrides: self.defines = {} self.functions = {} self.newstyle_constructors = {} - self.path = path + self.path = [os.path.abspath(x) for x in path] if filename: self.handle_file(filename) @@ -54,15 +54,16 @@ class Overrides: fp = None for path in self.path: os.chdir(oldpath) - os.chdir(os.path.abspath(path)) + os.chdir(path) try: fp = open(filename, 'r') + break except: - continue + os.chdir(oldpath) if not fp: raise Exception, "Couldn't find file %s" % filename - dirname = os.path.dirname(os.path.abspath(filename)) + dirname = path if dirname != oldpath: os.chdir(dirname) diff --git a/gst/Makefile.am b/gst/Makefile.am index 087faa0ac7..0f87b27a4f 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -51,7 +51,6 @@ _gst_la_SOURCES = \ nodist__gst_la_SOURCES = gst.c GST_OVERRIDES = \ gst.override \ - gstversion.override \ gstbin.override \ gstbuffer.override \ gstbus.override \ @@ -87,13 +86,13 @@ EXTRA_DIST += $(INTERFACES_DEFS) $(INTERFACES_OVERRIDES) interfaces.c: $(INTERFACES_DEFS) $(INTERFACES_OVERRIDES) $(GEN_FILES) .defs.c: - (cd $(srcdir) \ - && python $(top_srcdir)/codegen/codegen.py \ + ($(PYTHON) $(top_srcdir)/codegen/codegen.py \ --load-types $(srcdir)/arg-types.py \ --register $(srcdir)/gst-types.defs \ - --override $*.override \ + --override $(srcdir)/$*.override \ --extendpath $(top_builddir)/gst/ \ - --prefix py$* $*.defs) > gen-$*.c \ + --extendpath $(srcdir)/ \ + --prefix py$* $<) > gen-$*.c \ && cp gen-$*.c $*.c \ && rm -f gen-$*.c