File tree Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -827,6 +827,9 @@ int main(int ac, char **av)
827
827
break ;
828
828
}
829
829
830
+ if (conf_errors ())
831
+ exit (1 );
832
+
830
833
if (sync_kconfig ) {
831
834
name = getenv ("KCONFIG_NOSILENTUPDATE" );
832
835
if (name && * name ) {
@@ -890,6 +893,9 @@ int main(int ac, char **av)
890
893
break ;
891
894
}
892
895
896
+ if (sym_dep_errors ())
897
+ exit (1 );
898
+
893
899
if (input_mode == savedefconfig ) {
894
900
if (conf_write_defconfig (defconfig_file )) {
895
901
fprintf (stderr , "n*** Error while saving defconfig to: %s\n\n" ,
Original file line number Diff line number Diff line change @@ -155,6 +155,13 @@ static void conf_message(const char *fmt, ...)
155
155
static const char * conf_filename ;
156
156
static int conf_lineno , conf_warnings ;
157
157
158
+ bool conf_errors (void )
159
+ {
160
+ if (conf_warnings )
161
+ return getenv ("KCONFIG_WERROR" );
162
+ return false;
163
+ }
164
+
158
165
static void conf_warning (const char * fmt , ...)
159
166
{
160
167
va_list ap ;
@@ -365,10 +372,9 @@ int conf_read_simple(const char *name, int def)
365
372
char * p , * val ;
366
373
struct symbol * sym ;
367
374
int i , def_flags ;
368
- const char * warn_unknown , * werror , * sym_name ;
375
+ const char * warn_unknown , * sym_name ;
369
376
370
377
warn_unknown = getenv ("KCONFIG_WARN_UNKNOWN_SYMBOLS" );
371
- werror = getenv ("KCONFIG_WERROR" );
372
378
if (name ) {
373
379
in = zconf_fopen (name );
374
380
} else {
@@ -525,9 +531,6 @@ int conf_read_simple(const char *name, int def)
525
531
free (line );
526
532
fclose (in );
527
533
528
- if (conf_warnings && werror )
529
- exit (1 );
530
-
531
534
return 0 ;
532
535
}
533
536
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ void conf_set_changed(bool val);
15
15
bool conf_get_changed (void );
16
16
void conf_set_changed_callback (void (* fn )(void ));
17
17
void conf_set_message_callback (void (* fn )(const char * s ));
18
+ bool conf_errors (void );
18
19
19
20
/* symbol.c */
20
21
extern struct symbol * symbol_hash [SYMBOL_HASHSIZE ];
@@ -25,6 +26,7 @@ void print_symbol_for_listconfig(struct symbol *sym);
25
26
struct symbol * * sym_re_search (const char * pattern );
26
27
const char * sym_type_name (enum symbol_type type );
27
28
void sym_calc_value (struct symbol * sym );
29
+ bool sym_dep_errors (void );
28
30
enum symbol_type sym_get_type (struct symbol * sym );
29
31
bool sym_tristate_within_range (struct symbol * sym ,tristate tri );
30
32
bool sym_set_tristate_value (struct symbol * sym ,tristate tri );
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ struct symbol symbol_no = {
31
31
32
32
struct symbol * modules_sym ;
33
33
static tristate modules_val ;
34
+ static int sym_warnings ;
34
35
35
36
enum symbol_type sym_get_type (struct symbol * sym )
36
37
{
@@ -311,6 +312,14 @@ static void sym_warn_unmet_dep(struct symbol *sym)
311
312
" Selected by [m]:\n" );
312
313
313
314
fputs (str_get (& gs ), stderr );
315
+ sym_warnings ++ ;
316
+ }
317
+
318
+ bool sym_dep_errors (void )
319
+ {
320
+ if (sym_warnings )
321
+ return getenv ("KCONFIG_WERROR" );
322
+ return false;
314
323
}
315
324
316
325
void sym_calc_value (struct symbol * sym )
You can’t perform that action at this time.
0 commit comments