summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Remove gidl support.Johan Dahlin2008-08-291-3/+1
| | | | | | | | | | | | | 2008-08-29 Johan Dahlin <johan@gnome.org> * giscanner/Makefile.am: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * tools/g-ir-scanner: Remove gidl support. svn path=/trunk/; revision=516
* Fix --includedir handlingColin Walters2008-08-281-2/+3
| | | | | | | | | | | * tests/scanner/Makefile.am: Pass the right --includedir args. Add a Makefile dep. * tools/compiler.c: Pass includedirs down. * girepository/girparser.c: Actually put includedirs in context, pass down. Fix locate_gir. svn path=/trunk/; revision=514
* Expand aliases when generating typelibsColin Walters2008-08-281-0/+2
| | | | | | | | | | | * gir/Makefile.am: Use --includedir * girepository/girparser.c: Recursively parse includes to pull in aliases and expand them. We need this to avoid putting unknown names in the typelibs. * tools/compiler.c: Add --includedir option. svn path=/trunk/; revision=512
* Use binary mode for output file on Windows.Tor Lillqvist2008-08-281-2/+12
| | | | | | | | | | | | | | | | | | | 2008-08-28 Tor Lillqvist <tml@novell.com> * tools/compiler.c (write_out_typelib): Use binary mode for output file on Windows. * girepository/girnode.c: Don't print NULL strings. * tests/invoke/Makefile.am * tests/scanner/Makefile.am: Use -no-undefined on Windows to convince libtool to build shared libraries. * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use g_assert() instead of printing out expected errors. svn path=/trunk/; revision=509
* Include g-ir-scanner in the tarballJohan Dahlin2008-08-281-0/+1
| | | | svn path=/trunk/; revision=506
* Make g-ir-scanner work on Windows. Still problems with the typelib code.Tor Lillqvist2008-08-272-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-27 Tor Lillqvist <tml@novell.com> Make g-ir-scanner work on Windows. Still problems with the typelib code. Changes okayed by jdahlin. * configure.ac: Check for Windows, set Automake conditional OS_WIN32. Change backslashes to forward slashes in pyexecdir to avoid shell quoting issues * girepository/Makefile.am: Use -no-undefined so that libtool agrees to build a shared library on Windows. * girepository/girparser.c (backtrace_stderr): No backtrace() on Windows. Empty implementation on Windows so far. * girepository/gtypelib.c (g_typelib_check_sanity): Give more informative error message for the assertion failures. Tell also what the expected size of the struct is. Check all sizes first and fail afterwards if at least one size was different from expected. * tools/Makefile.am: Reorder libraries into proper logical dependency order. * tools/generate.c: Don't include <dlfcn.h>, not used. * giscanner/Makefile.am: On Windows, link with the Python library, and install the module DLL as _giscanner.pyd. Remove the unnecessary import library and libtool library that libtool has installed. * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax and just skip it. Recognize also two "l" suffixes for long long constants. Recognize also __inline__. * giscanner/grealpath.h (g_realpath): Implement on Windows, using GetFullPathName(). As such, GetFullPathName() does more than the UNIX realpath(). It also changes relative paths into absolute paths. But for our purposes that shouldn't matter. * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On Windows the file descriptor passed to us is from Python. Python Python2.5 uses the msvcr71.dll C library, while mingw-built code uses msvcrt.dll. On Windows, file descriptors are specific to which C library is used. So we must find out what underlying OS handle corresponds to the file descriptor Python passes us, and then make that into a file descriptor valid for the C library this code uses. * giscanner/sourcescanner.py (_parse): Don't need to bypass __attribute__ as the lexer now handles it. The definition as empty was ineffective for mingw anyway, as mingw's _mingw.h undefines __attribute__. Close the temp file before unlinking it. * giscanner/cgobject.py: Use correct library name for the gobject DLL on Windows. * gir/Makefile.am: Must pass the full basename of the DLLs on Windows to g-ir-scanner. It's a bit ugly that we have to "know" that the names of the GLib DLLs are like libglib-2.0-0.dll, but in reality they won't change, until there is a GLib 3, and then also the Unix code here needs changing. Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that libintl.h is found. svn path=/trunk/; revision=503
* Parse new implements syntax, drop gapi one. Update. Generate new syntax.Colin Walters2008-08-251-3/+1
| | | | | | | | | | | 2008-08-25 Colin Walters <walters@verbum.org> * girepository/girparser.c: Parse new implements syntax, drop gapi one. * tests/object.gir: Update. * tools/generate.c: Generate new syntax. svn path=/trunk/; revision=492
* Filter out unknown options from pkg-config files.Colin Walters2008-08-251-2/+14
| | | | | | | | | 2008-08-24 Colin Walters <walters@verbum.org> * tools/g-ir-scanner: Filter out unknown options from pkg-config files. svn path=/trunk/; revision=488
* Use subprocess instead of commands, works on Windows and avoids the evilColin Walters2008-08-241-4/+5
| | | | | | | | | | 2008-08-24 Colin Walters <walters@verbum.org> * tools/g-ir-scanner: Use subprocess instead of commands, works on Windows and avoids the evil shell on Unix. svn path=/trunk/; revision=486
* Ignore <include>. Parse them. Generate them. Process <include>Colin Walters2008-08-231-1/+1
| | | | | | | | | | | | | | | | | 2008-08-22 Colin Walters <walters@verbum.org> * girepository/girparser.c: Ignore <include>. * giscanner/girparser.py: Parse them. * giscanner/girwriter.py: Generate them. * giscanner/transformer.py: Process <include> recursively. Don't require full path for includes, look in {$XDG_DATA_DIRS}/gir. * tools/g-ir-scanner: Pass through includes. * Makefile.am: Remove extra --include args for scanner. * *-expected.gir: Add expected includes. svn path=/trunk/; revision=467
* Default to --raw. Update.Colin Walters2008-08-222-7/+6
| | | | | | | | | | 2008-08-22 Colin Walters <walters@verbum.org> * tools/generate.c, tools/compiler.c: Default to --raw. * all Makefile.am: Update. svn path=/trunk/; revision=462
* Install config.py, better error handling if we forget --rawColin Walters2008-08-221-0/+7
| | | | svn path=/trunk/; revision=461
* Pass through recursive types. Avoid overwriting errors. Always write theColin Walters2008-08-222-16/+31
| | | | | | | | | | | | | | | | | | | | 2008-08-22 Colin Walters <walters@verbum.org> * girepository/girparser.c: Pass through recursive types. Avoid overwriting errors. * giscanner/xmlwriter.py: Always write the XML header. * tests/*.gir: Adjust. * tests/scanner/Makefile.am: Build typelibs, and generate XML from those. Once we have a good diff mechanism... * tests/scanner/*-expected.gir: Add XML header. * tools/g-ir-scanner: Accept --typelib-xml option. * tools/generate.c: Better defaults for transfer. svn path=/trunk/; revision=457
* Don't put * in types, suppress transfer="none"Colin Walters2008-08-221-11/+1
| | | | svn path=/trunk/; revision=453
* Fix unref sequence.Colin Walters2008-08-221-2/+1
| | | | | | | | | 2008-08-22 Colin Walters <walters@verbum.org> * tools/generate.c (write_callable_info): Fix unref sequence. svn path=/trunk/; revision=449
* Add g-ir-generate. Support $(DEBUG) Do immediate close tags if noColin Walters2008-08-221-17/+26
| | | | | | | | | | | 2008-08-22 Colin Walters <walters@verbum.org> * gobject-introspection-1.0.pc.in: Add g-ir-generate. * tests/Makefile.am: Support $(DEBUG) * tools/generate.c: Do immediate close tags if no sub-elements. svn path=/trunk/; revision=448
* Do not hard-core library names in the Makefile, reuse ctypes find_libraryJohan Dahlin2008-08-211-0/+8
| | | | | | | | | | | | | 2008-08-21 Johan Dahlin <johan@gnome.org> * gir/Makefile.am: * giscanner/glibtransformer.py: * tools/g-ir-scanner: Do not hard-core library names in the Makefile, reuse ctypes find_library instead. svn path=/trunk/; revision=432
* Remove g_irepository_register_file in favor of g_irepository_require.Colin Walters2008-08-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-20 Colin Walters <walters@verbum.org> * girepository/girepository.c: Remove g_irepository_register_file in favor of g_irepository_require. There are two possible deployment scenarios for typelibs: First, separate in $DATADIR/gitypelibs/. Second, they may be embedded in shlibs. However since the first is now the normal case, the API is optimized around it. Refactor internals to look up typelibs for namespaces just-in-time, but we expect consumers to call g_irepository_require. Also, add some docs. No one has died from that before. * gir/Makefile.am: Need --library for glib. * giscanner/girwriter.py: Write out shared-library. * tools/g-ir-writer: Take the first --library argument as the target of shared-library. In the future we should make this nicer with pkg-config probably. svn path=/trunk/; revision=426
* Type checking reworkColin Walters2008-08-191-1/+5
| | | | svn path=/trunk/; revision=400
* Move .gir files to -good.gir, tweak build order.Colin Walters2008-08-171-1/+2
| | | | | | | | | | | | * gir/glib-2.0.gir, gir/gobject-2.0.gir: Rename to -good, always generate during build. * gir/Makefile.am: Ensure .gir files dep on all scanner sources. * Makefile.am: Switch build order to ensure the scanner is ready before we do gir/. * tools/g-ir-scanner: Look for .git too. svn path=/trunk/; revision=390
* Fix generator for constant/gobject/structJohan Dahlin2008-08-141-2/+2
| | | | | | | | | | | | | | 2008-08-14 Johan Dahlin <johan@gnome.org> * tests/Makefile.am: * tests/constant.gir: * tests/gobject.gir: * tests/struct.gir: * tools/generate.c (write_struct_info): Fix generator for constant/gobject/struct svn path=/trunk/; revision=379
* Fix generation of enum/bitfieldsJohan Dahlin2008-08-141-5/+5
| | | | | | | | | | | | 2008-08-14 Johan Dahlin <johan@gnome.org> * tests/Makefile.am: * tests/enum.gir: * tools/generate.c (write_enum_info): Fix generation of enum/bitfields svn path=/trunk/; revision=378
* Clear up constant parsingJohan Dahlin2008-08-141-20/+33
| | | | | | | | | | | | | | | | | | | | 2008-08-14 Johan Dahlin <johan@gnome.org> * girepository/girparser.c (start_field), (start_constant), (start_type), (end_element_handler): Clear up constant parsing * tests/object.gir: Update * tools/generate.c (write_callable_info), (write_function_info), (write_callback_info), (write_constant_info), (write_signal_info), (write_vfunc_info), (write_property_info), (write_object_info), (write_interface_info): Constants/Signals are handled now. svn path=/trunk/; revision=377
* Don't require c:type. Test boxed.gir Update, remove parts we don't supportJohan Dahlin2008-08-141-92/+105
| | | | | | | | | | | | | | | | | | | 2008-08-14 Johan Dahlin <johan@gnome.org> * girepository/girparser.c (start_type): Don't require c:type. * tests/Makefile.am: Test boxed.gir * tests/boxed.gir: Update, remove parts we don't support yet * tests/roundtrips.sh: Remove * tools/generate.c (write_type_info), (write_field_info), (write_callable_info), (write_struct_info): Make it emit proper gir. svn path=/trunk/; revision=376
* Allow multiple libraries Rename load_library to add_library, traverse overJohan Dahlin2008-08-131-4/+5
| | | | | | | | | | | | | 2008-08-13 Johan Dahlin <johan@gnome.org> * tools/g-ir-scanner: Allow multiple libraries * giscanner/glibtransformer.py: Rename load_library to add_library, traverse over all libraries when trying to resolve a function svn path=/trunk/; revision=356
* PEP8ifyJohan Dahlin2008-08-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-09 Johan Dahlin <johan@gnome.org> * giscanner/__init__.py: * giscanner/ast.py: * giscanner/cgobject.py: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girparser.py: * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/odict.py: * giscanner/sourcescanner.py: * giscanner/transformer.py: * giscanner/utils.py: * giscanner/xmlwriter.py: * tools/g-ir-scanner: PEP8ify svn path=/trunk/; revision=341
* Rename metadata to typelib in variable names, comments and apis.Johan Dahlin2008-08-092-43/+43
| | | | | | | | | | | 2008-08-09 Johan Dahlin <johan@gnome.org> * *.[ch]: Rename metadata to typelib in variable names, comments and apis. svn path=/trunk/; revision=339
* Remove old C scanner, which got rewritten in python.Johan Dahlin2008-08-092-1855/+0
| | | | | | | | | | 2008-08-09 Johan Dahlin <johan@gnome.org> * tools/scanner.c: * tools/scanner.h: Remove old C scanner, which got rewritten in python. svn path=/trunk/; revision=338
* Move shared *.[ch] files to girepository from toolsJohan Dahlin2008-08-099-5744/+9
| | | | | | | | | | | | | | | | | | | 2008-08-09 Johan Dahlin <johan@gnome.org> * girepository/Makefile.am: * tools/Makefile.am: * tools/girmodule.c: * tools/girmodule.h: * tools/girnode.c: * tools/girnode.h: * tools/girparser.c: * tools/girparser.h: * tools/girwriter.c: * tools/girwriter.h: Move shared *.[ch] files to girepository from tools svn path=/trunk/; revision=337
* Remove debug printColin Walters2008-08-091-1/+0
| | | | svn path=/trunk/; revision=330
* Say explicitly which node was NULLColin Walters2008-08-091-26/+36
| | | | svn path=/trunk/; revision=329
* Merge in the gir-compiler branch. Thanks to Philip and Colin for theirJohan Dahlin2008-08-0812-1208/+1614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-08 Johan Dahlin <johan@gnome.org> * girepository/gtypelib.c (validate_header): * girepository/gtypelib.h: * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/sourcescanner.c (gi_source_symbol_ref), (gi_source_symbol_unref): * tests/array.test: * tests/boxed.test: * tests/constant.test: * tests/enum.test: * tests/errors.test: * tests/function.test: * tests/gobject.test: * tests/interface.test: * tests/invoke/Makefile.am: * tests/invoke/testfns.xml: * tests/object.test: * tests/parser/Makefile.am: * tests/roundtrips.sh: * tests/struct.test: * tests/types.test: * tests/union.test: * tests/xref1.test: * tests/xref2.test: * tools/Makefile.am: * tools/compiler.c (main): * tools/generate.c (write_callable_info), (write_function_info), (write_repository): * tools/gidlmodule.c: * tools/gidlmodule.h: * tools/gidlnode.c: * tools/gidlnode.h: * tools/gidlparser.c: * tools/gidlparser.h: * tools/gidlwriter.c: * tools/gidlwriter.h: * tools/scanner.c (create_node_from_gtype), (create_node_from_ctype), (g_igenerator_process_properties), (g_igenerator_process_signals), (g_igenerator_create_object), (g_igenerator_create_interface), (g_igenerator_create_boxed), (g_igenerator_create_enum), (g_igenerator_create_flags), (g_igenerator_process_function_symbol), (g_igenerator_process_unregistered_struct_typedef), (g_igenerator_process_struct_typedef), (g_igenerator_process_union_typedef), (g_igenerator_process_enum_typedef), (g_igenerator_process_function_typedef), (g_igenerator_process_constant), (g_igenerator_process_symbols), (g_igenerator_add_module), (g_igenerator_add_include_idl): Merge in the gir-compiler branch. Thanks to Philip and Colin for their help. svn path=/trunk/; revision=325
* Install g-idl-compiler and g-idl-generate to go along with how we'reColin Walters2008-07-261-1/+1
| | | | | | | | | | | | 2008-07-26 Colin Walters <walters@verbum.org> * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler and g-idl-generate to go along with how we're changing this module to be installed. * gobject-introspection-1.0.pc.in: Set up Cflags and Libs. svn path=/trunk/; revision=297
* tools/gidlnode.cPhilip Van Hoof2008-06-086-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org> * girepository/girepository.c: * girepository/gtypelib.c: * girepository/ginfo.c: * girepository/ginvoke.c: * girepository/girepository.h: * girepository/gtypelib.h: * girepository/gmetadata.c: * girepository/Makefile.am: * girepository/gmetadata.h: * tools/compiler.c: * tools/gidlmodule.c: * tools/gidlnode.c * tools/generate.c: * tools/gidlmodule.h: * tools/gidlparser.c: Renamed GMetadata to GTypelib svn path=/trunk/; revision=288
* Update sys.path before running the parser so we don't have to setupJohan Dahlin2008-05-311-0/+10
| | | | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * tools/g-ir-scanner: * tests/parser/Makefile.am: Update sys.path before running the parser so we don't have to setup PYTHONPATH ourselves. svn path=/trunk/; revision=278
* Rename pkg-config name to gobject-introspection-1.0, Do not installedJohan Dahlin2008-05-311-16/+2
| | | | | | | | | | | | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * Makefile.am: * configure.ac: * girepository/Makefile.am: * giscanner/transformer.py: * gobject-introspection-1.0.pc.in: * gobject-introspection.pc.in: * tools/Makefile.am: Rename pkg-config name to gobject-introspection-1.0, Do not installed anything which is not using the gir format. Disable compililation the old C scanner, but still keep the source until all the remaning functionallity has been ported. svn path=/trunk/; revision=277
* Move part of the namespace prefix parsing from glibtransformer->transformerJohan Dahlin2008-05-091-5/+4
| | | | svn path=/trunk/; revision=271
* Introduce a namespace ast nodeJohan Dahlin2008-05-081-10/+9
| | | | | | | | | | | | | | 2008-05-08 Johan Dahlin <johan@gnome.org> * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * tools/g-ir-scanner: Introduce a namespace ast node svn path=/trunk/; revision=268
* Format header, Remove dummy sys.path.insertJohan Dahlin2008-05-031-3/+2
| | | | svn path=/trunk/; revision=265
* Refactor and comment scanner frontendJohan Dahlin2008-05-031-18/+30
| | | | svn path=/trunk/; revision=264
* Avoid a tiny bit of duplicationJohan Dahlin2008-05-031-4/+3
| | | | svn path=/trunk/; revision=263
* Handle missing parameters better, allow - and + in .la dlname filenames.Johan Dahlin2008-05-031-3/+11
| | | | | | | | | | | | 2008-05-03 Johan Dahlin <johan@gnome.org> * giscanner/glibtransformer.py: * tools/g-ir-scanner: Handle missing parameters better, allow - and + in .la dlname filenames. svn path=/trunk/; revision=262
* Add a --strip-prefix and sort out confusion between names and symbols forJohan Dahlin2008-04-281-6/+15
| | | | | | | | | | | | | | | | | 2008-04-28 Johan Dahlin <jdahlin@async.com.br> * giscanner/ast.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/transformer.py: * tools/g-ir-scanner: Add a --strip-prefix and sort out confusion between names and symbols for functions and struct + derivaties. Refactor bootstrap of g-ir-scanner, so we can set options on Transformer() before parsing everything. svn path=/trunk/; revision=255
* First steps towards passing distcheckJohan Dahlin2008-04-281-0/+2
| | | | svn path=/trunk/; revision=243
* g-ir-scanner is a script, not a program.Johan Dahlin2008-04-281-3/+2
| | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script, not a program. svn path=/trunk/; revision=240
* Switch over to GIR as the default format. Add a simple GIDL parser. UpdateJohan Dahlin2008-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * configure.ac: * giscanner/Makefile.am: * giscanner/girparser.py: * giscanner/glibtransformer.py: * tests/parser/Foo-expected.gidl: * tests/parser/Foo-expected.gir: * tests/parser/Makefile.am: * tests/parser/utility-expected.gidl: * tests/parser/utility-expected.gir: * tools/g-ir-scanner: Switch over to GIR as the default format. Add a simple GIDL parser. Update tests and fix simplify makefiles by depending on GNU make extensions. svn path=/trunk/; revision=237
* g-ir-scanner has no sources.Johan Dahlin2008-04-271-0/+2
| | | | | | | | | | 2008-04-27 Johan Dahlin <johan@gnome.org> * tools/Makefile.am (g_ir_scanner_SOURCES): g-ir-scanner has no sources. svn path=/trunk/; revision=230
* Rename treebuilder to transformer and gobjectreebuilder toJohan Dahlin2008-04-261-4/+5
| | | | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * giscanner/Makefile.am: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/glibtransformer.py: * giscanner/gobjecttreebuilder.py: * giscanner/transformer.py: * giscanner/treebuilder.py: * tools/g-ir-scanner: Rename treebuilder to transformer and gobjectreebuilder to glibtransformer. svn path=/trunk/; revision=228
* Add LGPLv2 license header and install all python filesJohan Dahlin2008-04-262-1/+20
| | | | | | | | | | | | | | | | | | | | | | 2008-04-25 Johan Dahlin <jdahlin@async.com.br> * giscanner/Makefile.am: * giscanner/__init__.py: * giscanner/cgobject.py: * giscanner/gidlparser.py: * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/gobjecttreebuilder.py: * giscanner/odict.py: * giscanner/sourcescanner.py: * giscanner/treebuilder.py: * giscanner/xmlwriter.py: * tools/Makefile.am: * tools/g-ir-scanner: Add LGPLv2 license header and install all python files svn path=/trunk/; revision=227
* Add support for source/header annotations.Johan Dahlin2008-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | 2008-04-24 Johan Dahlin <jdahlin@async.com.br> * giscanner/gidlwriter.py: * giscanner/girwriter.py: * giscanner/giscannermodule.c (directive_get_name), (directive_get_value), (directive_get_options), (symbol_get_directives), (symbol_set_directives), (pygi_source_scanner_parse_file), (pygi_source_scanner_lex_filename), (pygi_source_scanner_get_directives), (init_giscanner): * giscanner/sourcescanner.c (gi_source_scanner_get_directives): * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: * giscanner/treebuilder.py: * tools/g-ir-scanner: Add support for source/header annotations. svn path=/trunk/; revision=224