diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-03-11 17:01:46 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-03-11 17:01:46 +0800 |
commit | 3fa6934ac6d4ccc77fffc378861727fe322c95f1 (patch) | |
tree | 3e2ba18b99f9e15f91e051fda148bfcf6f95e0dd /build/win32/gen-win32-cairo-gir.py | |
parent | b25f9436e0e2f3cec88d87eae94f2d55eab0cfcc (diff) | |
download | gobject-introspection-3fa6934ac6d4ccc77fffc378861727fe322c95f1.tar.gz |
MSVC builds: Enhance and simplify build-related scripts
This updates the replace.py script to support replacing multiple items in
a file from GLib's build/win32, which allows us to simplify the script
that is used to create cairo-1.0.gir for Visual Studio builds.
Diffstat (limited to 'build/win32/gen-win32-cairo-gir.py')
-rw-r--r-- | build/win32/gen-win32-cairo-gir.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/build/win32/gen-win32-cairo-gir.py b/build/win32/gen-win32-cairo-gir.py index 464d9849..09a5a506 100644 --- a/build/win32/gen-win32-cairo-gir.py +++ b/build/win32/gen-win32-cairo-gir.py @@ -29,16 +29,11 @@ def main(argv): preset_gir_path = os.path.join(srcroot, 'gir') # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir - replace.replace(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'), - 'cairo-1.0.gir.tmp', - '%CAIRO_GIR_PACKAGE%', - 'cairo-gobject') - - replace.replace('cairo-1.0.gir.tmp', - 'cairo-1.0.gir', - '%CAIRO_SHARED_LIBRARY%', - args.dllname) - os.unlink('cairo-1.0.gir.tmp') + cairo_replace_items = {'%CAIRO_GIR_PACKAGE%': 'cairo-gobject', + '%CAIRO_SHARED_LIBRARY%': args.dllname} + replace.replace_multi(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'), + 'cairo-1.0.gir', + cairo_replace_items) if __name__ == '__main__': sys.exit(main(sys.argv)) |