Make glib-compile-resources a little smarter

glib-compile-resources was guessing a filename ending
in .c when generating sources, but did not do the same
for headers. Fix it so it generates a .h file when
guessing the filename for headers.

https://bugzilla.gnome.org/show_bug.cgi?id=746753
This commit is contained in:
alex94puchades 2015-03-25 15:26:07 +01:00 committed by Matthias Clasen
parent 61a105b883
commit 1f1fa69375

View File

@ -669,6 +669,12 @@ main (int argc, char **argv)
base[strlen(base) - strlen (".gresource")] = 0;
target_basename = g_strconcat (base, ".c", NULL);
}
else if (generate_header)
{
if (g_str_has_suffix (base, ".gresource"))
base[strlen(base) - strlen (".gresource")] = 0;
target_basename = g_strconcat (base, ".h", NULL);
}
else
{
if (g_str_has_suffix (base, ".gresource"))