2008-08-22 Colin Walters <walters@verbum.org>
+ * tools/generate.c, tools/compiler.c: Default
+ to --raw.
+ * all Makefile.am: Update.
+
+2008-08-22 Colin Walters <walters@verbum.org>
+
* girepository/girparser.c: Pass through
recursive types. Avoid overwriting errors.
* giscanner/xmlwriter.py: Always write the
%.gir.test: %.gir
@echo Testing $<:
- $(DEBUG) $(top_builddir)/tools/g-ir-compiler --raw $< > $<.1; \
- $(DEBUG) $(top_builddir)/tools/g-ir-generate --raw $<.1 > $<.2; \
+ $(DEBUG) $(top_builddir)/tools/g-ir-compiler $< > $<.1; \
+ $(DEBUG) $(top_builddir)/tools/g-ir-generate $<.1 > $<.2; \
diff -u $< $<.2; rm $<.1 $<.2
check-local: $(GIRTESTS)
BUILT_SOURCES = testfns-metadata.c
CLEANFILES = testfns-metadata.c
-testfns-metadata.c: testfns.gir $(top_builddir)/tools/g-ir-compiler
- $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns.gir -o testfns-metadata.c
+testfns-metadata.c: testfns.gir $(top_builddir)/tools/g-ir-compiler Makefile
+ $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns.gir --code -o testfns-metadata.c
invoke_SOURCES = invoke.c
invoke_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
@diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "* $*.gir"
%.typelib: %.gir
- $(top_builddir)/tools/g-ir-compiler $< --raw -o $@
+ $(top_builddir)/tools/g-ir-compiler $< -o $@
$(SCANNER) --typelib-xml $< > $<.tmp && mv $<.tmp $<.txml
check-%.typelib: %.typelib
#include "girparser.h"
#include "gtypelib.h"
-gboolean raw = FALSE;
+gboolean code = FALSE;
gboolean no_init = FALSE;
gchar **input = NULL;
gchar *output = NULL;
g_free (filename);
}
- if (raw)
+ if (!code)
fwrite (typelib->data, 1, typelib->len, file);
else
{
static GOptionEntry options[] =
{
- { "raw", 0, 0, G_OPTION_ARG_NONE, &raw, "emit raw typelib", NULL },
- { "code", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &raw, "emit C code", NULL },
+ { "code", 0, 0, G_OPTION_ARG_NONE, &code, "emit C code", NULL },
{ "no-init", 0, 0, G_OPTION_ARG_NONE, &no_init, "do not create _init() function", NULL },
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
{ "module", 'm', 0, G_OPTION_ARG_STRING, &mname, "module to compile", "NAME" },
int
main (int argc, char *argv[])
{
- gboolean raw = FALSE;
+ gboolean shlib = FALSE;
gchar **input = NULL;
GOptionContext *context;
GError *error = NULL;
GTypelib *data;
GOptionEntry options[] =
{
- { "raw", 0, 0, G_OPTION_ARG_NONE, &raw, "handle raw typelib", NULL },
+ { "shlib", 0, 0, G_OPTION_ARG_NONE, &shlib, "handle typelib embedded in shlib", NULL },
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
{ NULL, }
const guchar *typelib;
gsize len;
- if (raw)
+ if (!shlib)
{
if (!g_file_get_contents (input[i], (gchar **)&typelib, &len, &error))
{