]> Kevux Git Server - fll/commitdiff
Update: add project name when calling featureless make in build mode.
authorKevin Day <thekevinday@gmail.com>
Sat, 19 Sep 2020 03:29:53 +0000 (22:29 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 19 Sep 2020 03:29:53 +0000 (22:29 -0500)
The downside is that the settings must first be loaded.

level_3/fake/c/private-build.c

index 0e9476809d941d7cd3e02e6e9d9b2bc388aa17af..7028e2a0fa54d15db02635834412103a15783b01 100644 (file)
@@ -2424,11 +2424,6 @@ extern "C" {
       return F_signal;
     }
 
-    if (data.verbosity != fake_verbosity_quiet) {
-      printf("%c", f_string_eol[0]);
-      fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Building project.");
-    }
-
     f_status_t status = F_none;
     f_mode_t mode = f_mode_t_initialize;
 
@@ -2439,6 +2434,21 @@ extern "C" {
 
     fake_build_load_setting(data, setting_file, &data_build.setting, &status);
 
+    if (F_status_is_fine(status)) {
+      if (data.verbosity != fake_verbosity_quiet) {
+        printf("%c", f_string_eol[0]);
+        fl_color_print(f_type_output, data.context.important, data.context.reset, "Building project%c", data_build.setting.project_name.used ? ' ' : 0);
+
+        if (data_build.setting.project_name.used) {
+          fl_color_print_code(f_type_output, data.context.notable);
+          f_print_string_dynamic(f_type_output, data_build.setting.project_name);
+          fl_color_print_code(f_type_output, data.context.reset);
+        }
+
+        fl_color_print_line(f_type_output, data.context.important, data.context.reset, ".");
+      }
+    }
+
     fake_build_load_stage(data, setting_file, &stage, &status);
 
     fake_build_load_environment(data, data_build, &data_build.environment, &status);