72
72
void vala_ccode_compiler_unref (gpointer instance);
73
73
GParamSpec* vala_param_spec_ccode_compiler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
74
74
void vala_value_set_ccode_compiler (GValue* value, gpointer v_object);
75
void vala_value_take_ccode_compiler (GValue* value, gpointer v_object);
75
76
gpointer vala_value_get_ccode_compiler (const GValue* value);
76
77
GType vala_ccode_compiler_get_type (void);
139
if (_inner_error_ != NULL) {
141
142
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
142
143
g_clear_error (&_inner_error_);
212
213
if (use_pkgconfig) {
214
215
gint exit_status = 0;
217
217
char* _tmp7_ = NULL;
218
_tmp8_ = g_spawn_command_line_sync (pc, &_tmp7_, NULL, &exit_status, &_inner_error_);
219
pkgflags = (_tmp9_ = _tmp7_, _g_free0 (pkgflags), _tmp9_);
218
g_spawn_command_line_sync (pc, &_tmp7_, NULL, &exit_status, &_inner_error_);
219
pkgflags = (_tmp8_ = _tmp7_, _g_free0 (pkgflags), _tmp8_);
221
220
if (_inner_error_ != NULL) {
222
221
if (_inner_error_->domain == G_SPAWN_ERROR) {
223
222
goto __catch1_g_spawn_error;
266
265
cmdline = g_strdup (cc_command);
267
266
if (vala_code_context_get_debug (context)) {
268
cmdline = (_tmp10_ = g_strconcat (cmdline, " -g", NULL), _g_free0 (cmdline), _tmp10_);
270
if (vala_code_context_get_compile_only (context)) {
269
cmdline = (_tmp11_ = g_strconcat (cmdline, " -g", NULL), _g_free0 (cmdline), _tmp11_);
271
if (vala_code_context_get_compile_only (context)) {
273
cmdline = (_tmp12_ = g_strconcat (cmdline, " -c", NULL), _g_free0 (cmdline), _tmp12_);
272
cmdline = (_tmp11_ = g_strconcat (cmdline, " -c", NULL), _g_free0 (cmdline), _tmp11_);
275
274
if (vala_code_context_get_output (context) != NULL) {
276
gboolean _tmp12_ = FALSE;
277
277
gboolean _tmp13_ = FALSE;
278
gboolean _tmp14_ = FALSE;
282
281
output = g_strdup (vala_code_context_get_output (context));
283
282
if (vala_code_context_get_directory (context) != NULL) {
284
_tmp14_ = _vala_strcmp0 (vala_code_context_get_directory (context), "") != 0;
289
_tmp13_ = !g_path_is_absolute (vala_code_context_get_output (context));
283
_tmp13_ = _vala_strcmp0 (vala_code_context_get_directory (context), "") != 0;
295
output = (_tmp15_ = g_strdup_printf ("%s%c%s", vala_code_context_get_directory (context), (gint) G_DIR_SEPARATOR, vala_code_context_get_output (context)), _g_free0 (output), _tmp15_);
297
cmdline = (_tmp18_ = g_strconcat (cmdline, _tmp17_ = g_strconcat (" -o ", _tmp16_ = g_shell_quote (output), NULL), NULL), _g_free0 (cmdline), _tmp18_);
288
_tmp12_ = !g_path_is_absolute (vala_code_context_get_output (context));
294
output = (_tmp14_ = g_strdup_printf ("%s%c%s", vala_code_context_get_directory (context), (gint) G_DIR_SEPARATOR, vala_code_context_get_output (context)), _g_free0 (output), _tmp14_);
296
cmdline = (_tmp17_ = g_strconcat (cmdline, _tmp16_ = g_strconcat (" -o ", _tmp15_ = g_shell_quote (output), NULL), NULL), _g_free0 (cmdline), _tmp17_);
299
297
_g_free0 (_tmp16_);
300
299
_g_free0 (output);
312
311
file = (ValaSourceFile*) vala_iterator_get (_file_it);
313
312
if (!vala_source_file_get_external_package (file)) {
318
cmdline = (_tmp22_ = g_strconcat (cmdline, _tmp21_ = g_strconcat (" ", _tmp20_ = g_shell_quote (_tmp19_ = vala_source_file_get_csource_filename (file)), NULL), NULL), _g_free0 (cmdline), _tmp22_);
317
cmdline = (_tmp21_ = g_strconcat (cmdline, _tmp20_ = g_strconcat (" ", _tmp19_ = g_shell_quote (_tmp18_ = vala_source_file_get_csource_filename (file)), NULL), NULL), _g_free0 (cmdline), _tmp21_);
320
318
_g_free0 (_tmp20_);
321
319
_g_free0 (_tmp19_);
323
322
_vala_source_file_unref0 (file);
330
329
_file_it = vala_iterable_iterator ((ValaIterable*) c_source_files);
336
335
if (!vala_iterator_next (_file_it)) {
339
338
file = (char*) vala_iterator_get (_file_it);
340
cmdline = (_tmp25_ = g_strconcat (cmdline, _tmp24_ = g_strconcat (" ", _tmp23_ = g_shell_quote (file), NULL), NULL), _g_free0 (cmdline), _tmp25_);
339
cmdline = (_tmp24_ = g_strconcat (cmdline, _tmp23_ = g_strconcat (" ", _tmp22_ = g_shell_quote (file), NULL), NULL), _g_free0 (cmdline), _tmp24_);
342
340
_g_free0 (_tmp23_);
345
344
_vala_collection_object_unref0 (_file_it);
347
cmdline = (_tmp28_ = g_strconcat (cmdline, _tmp27_ = g_strconcat (" ", _tmp26_ = string_strip (pkgflags), NULL), NULL), _g_free0 (cmdline), _tmp28_);
346
cmdline = (_tmp27_ = g_strconcat (cmdline, _tmp26_ = g_strconcat (" ", _tmp25_ = string_strip (pkgflags), NULL), NULL), _g_free0 (cmdline), _tmp27_);
349
347
_g_free0 (_tmp26_);
351
350
char** cc_option_collection;
352
351
int cc_option_collection_length1;
358
357
cc_option = g_strdup (cc_option_collection[cc_option_it]);
363
cmdline = (_tmp31_ = g_strconcat (cmdline, _tmp30_ = g_strconcat (" ", _tmp29_ = g_shell_quote (cc_option), NULL), NULL), _g_free0 (cmdline), _tmp31_);
362
cmdline = (_tmp30_ = g_strconcat (cmdline, _tmp29_ = g_strconcat (" ", _tmp28_ = g_shell_quote (cc_option), NULL), NULL), _g_free0 (cmdline), _tmp30_);
365
363
_g_free0 (_tmp29_);
366
365
_g_free0 (cc_option);
425
424
file = (ValaSourceFile*) vala_iterator_get (_file_it);
426
425
if (!vala_source_file_get_external_package (file)) {
427
426
if (!vala_code_context_get_save_csources (context)) {
429
g_unlink (_tmp33_ = vala_source_file_get_csource_filename (file));
428
g_unlink (_tmp32_ = vala_source_file_get_csource_filename (file));
433
432
_vala_source_file_unref0 (file);
537
void vala_value_take_ccode_compiler (GValue* value, gpointer v_object) {
538
ValaCCodeCompiler* old;
539
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_TYPE_CCODE_COMPILER));
540
old = value->data[0].v_pointer;
542
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_TYPE_CCODE_COMPILER));
543
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
544
value->data[0].v_pointer = v_object;
546
value->data[0].v_pointer = NULL;
549
vala_ccode_compiler_unref (old);
538
554
static void vala_ccode_compiler_class_init (ValaCCodeCompilerClass * klass) {
539
555
vala_ccode_compiler_parent_class = g_type_class_peek_parent (klass);
540
556
VALA_CCODE_COMPILER_CLASS (klass)->finalize = vala_ccode_compiler_finalize;
555
571
GType vala_ccode_compiler_get_type (void) {
556
static GType vala_ccode_compiler_type_id = 0;
557
if (vala_ccode_compiler_type_id == 0) {
572
static volatile gsize vala_ccode_compiler_type_id__volatile = 0;
573
if (g_once_init_enter (&vala_ccode_compiler_type_id__volatile)) {
558
574
static const GTypeValueTable g_define_type_value_table = { vala_value_ccode_compiler_init, vala_value_ccode_compiler_free_value, vala_value_ccode_compiler_copy_value, vala_value_ccode_compiler_peek_pointer, "p", vala_value_ccode_compiler_collect_value, "p", vala_value_ccode_compiler_lcopy_value };
559
575
static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeCompilerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_compiler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeCompiler), 0, (GInstanceInitFunc) vala_ccode_compiler_instance_init, &g_define_type_value_table };
560
576
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
577
GType vala_ccode_compiler_type_id;
561
578
vala_ccode_compiler_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaCCodeCompiler", &g_define_type_info, &g_define_type_fundamental_info, 0);
579
g_once_init_leave (&vala_ccode_compiler_type_id__volatile, vala_ccode_compiler_type_id);
563
return vala_ccode_compiler_type_id;
581
return vala_ccode_compiler_type_id__volatile;