diff options
Diffstat (limited to 'tools/generate.c')
-rw-r--r-- | tools/generate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/generate.c b/tools/generate.c index 36e1d05a..143f01fd 100644 --- a/tools/generate.c +++ b/tools/generate.c @@ -41,6 +41,7 @@ main (int argc, char *argv[]) GOptionContext *context; GError *error = NULL; gboolean needs_prefix; + gboolean show_version = FALSE; gint i; GOptionEntry options[] = { @@ -48,6 +49,7 @@ main (int argc, char *argv[]) { "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" }, { "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, "include directories in GIR search path", NULL }, { "all", 0, 0, G_OPTION_ARG_NONE, &show_all, "show all available information", NULL, }, + { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "show program's version number and exit", NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL }, { NULL, } }; @@ -67,6 +69,13 @@ main (int argc, char *argv[]) return 1; } + if (show_version) + { + g_printf ("g-ir-generate %u.%u.%u\n", + GI_MAJOR_VERSION, GI_MINOR_VERSION, GI_MICRO_VERSION); + return 0; + } + if (!input) { g_fprintf (stderr, "no input files\n"); |