| 1197 | } |
| 1198 | |
| 1199 | int conf_write_autoconf(int overwrite) |
| 1200 | { |
| 1201 | struct symbol *sym; |
| 1202 | const char *autoconf_name = conf_get_autoconfig_name(); |
| 1203 | int ret, i; |
| 1204 | |
| 1205 | #ifndef OPENWRT_DOES_NOT_WANT_THIS |
| 1206 | return 0; |
| 1207 | #endif |
| 1208 | if (!overwrite && is_present(autoconf_name)) |
| 1209 | return 0; |
| 1210 | |
| 1211 | ret = conf_write_autoconf_cmd(autoconf_name); |
| 1212 | if (ret) |
| 1213 | return -1; |
| 1214 | |
| 1215 | if (conf_touch_deps()) |
| 1216 | return 1; |
| 1217 | |
| 1218 | for_all_symbols(i, sym) |
| 1219 | sym_calc_value(sym); |
| 1220 | |
| 1221 | ret = __conf_write_autoconf(conf_get_autoheader_name(), |
| 1222 | print_symbol_for_c, |
| 1223 | &comment_style_c); |
| 1224 | if (ret) |
| 1225 | return ret; |
| 1226 | |
| 1227 | ret = __conf_write_autoconf(conf_get_rustccfg_name(), |
| 1228 | print_symbol_for_rustccfg, |
| 1229 | NULL); |
| 1230 | if (ret) |
| 1231 | return ret; |
| 1232 | |
| 1233 | /* |
| 1234 | * Create include/config/auto.conf. This must be the last step because |
| 1235 | * Kbuild has a dependency on auto.conf and this marks the successful |
| 1236 | * completion of the previous steps. |
| 1237 | */ |
| 1238 | ret = __conf_write_autoconf(conf_get_autoconfig_name(), |
| 1239 | print_symbol_for_autoconf, |
| 1240 | &comment_style_pound); |
| 1241 | if (ret) |
| 1242 | return ret; |
| 1243 | |
| 1244 | return 0; |
| 1245 | } |
| 1246 | |
| 1247 | static bool conf_changed; |
| 1248 | static void (*conf_changed_callback)(void); |
no test coverage detected