Default to --raw. Update.
authorColin Walters <walters@verbum.org>
Fri, 22 Aug 2008 21:14:31 +0000 (21:14 +0000)
committerColin Walters <walters@src.gnome.org>
Fri, 22 Aug 2008 21:14:31 +0000 (21:14 +0000)
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

ChangeLog
tests/Makefile.am
tests/invoke/Makefile.am
tests/scanner/Makefile.am
tools/compiler.c
tools/generate.c

index 0c4a00e..66305e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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
index d690bab..37df1c2 100644 (file)
@@ -25,8 +25,8 @@ GIRTESTS =                    \
 
 %.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)
index f9c87eb..6e92251 100644 (file)
@@ -16,8 +16,8 @@ testfns_la_LIBADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.
 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
index 028cf66..efc7122 100644 (file)
@@ -84,7 +84,7 @@ check-%.gir: %.gir
        @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
index c515ddf..a3f5e72 100644 (file)
@@ -29,7 +29,7 @@
 #include "girparser.h"
 #include "gtypelib.h"
 
-gboolean raw = FALSE;
+gboolean code = FALSE;
 gboolean no_init = FALSE;
 gchar **input = NULL;
 gchar *output = NULL;
@@ -119,7 +119,7 @@ write_out_typelib (gchar *prefix,
       g_free (filename);
     }
 
-  if (raw)
+  if (!code)
     fwrite (typelib->data, 1, typelib->len, file);
   else
     {
@@ -148,8 +148,7 @@ static void log_handler (const gchar *log_domain,
 
 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" }, 
index 05c1a07..52e1c84 100644 (file)
@@ -1159,7 +1159,7 @@ load_typelib (const gchar  *filename,
 int 
 main (int argc, char *argv[])
 {  
-  gboolean raw = FALSE;
+  gboolean shlib = FALSE;
   gchar **input = NULL;
   GOptionContext *context;
   GError *error = NULL;
@@ -1168,7 +1168,7 @@ main (int argc, char *argv[])
   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, }
@@ -1195,7 +1195,7 @@ main (int argc, char *argv[])
       const guchar *typelib;
       gsize len;
 
-      if (raw)
+      if (!shlib)
        {
          if (!g_file_get_contents (input[i], (gchar **)&typelib, &len, &error))
            {