| 1226 | } |
| 1227 | |
| 1228 | int conf_write_autoconf(int overwrite) |
| 1229 | { |
| 1230 | struct symbol *sym; |
| 1231 | const char *autoconf_name = conf_get_autoconfig_name(); |
| 1232 | int ret, i; |
| 1233 | |
| 1234 | if (!overwrite && is_present(autoconf_name)) |
| 1235 | return 0; |
| 1236 | |
| 1237 | ret = conf_write_autoconf_cmd(autoconf_name); |
| 1238 | if (ret) |
| 1239 | return -1; |
| 1240 | |
| 1241 | if (conf_touch_deps()) |
| 1242 | return 1; |
| 1243 | |
| 1244 | for_all_symbols(i, sym) |
| 1245 | sym_calc_value(sym); |
| 1246 | |
| 1247 | ret = __conf_write_autoconf(conf_get_autoheader_name(), |
| 1248 | print_symbol_for_c, |
| 1249 | &comment_style_c); |
| 1250 | if (ret) |
| 1251 | return ret; |
| 1252 | |
| 1253 | ret = __conf_write_autoconf(conf_get_rustccfg_name(), |
| 1254 | print_symbol_for_rustccfg, |
| 1255 | NULL); |
| 1256 | if (ret) |
| 1257 | return ret; |
| 1258 | |
| 1259 | /* |
| 1260 | * Create include/config/auto.conf. This must be the last step because |
| 1261 | * Kbuild has a dependency on auto.conf and this marks the successful |
| 1262 | * completion of the previous steps. |
| 1263 | */ |
| 1264 | ret = __conf_write_autoconf(conf_get_autoconfig_name(), |
| 1265 | print_symbol_for_autoconf, |
| 1266 | &comment_style_pound); |
| 1267 | if (ret) |
| 1268 | return ret; |
| 1269 | |
| 1270 | return 0; |
| 1271 | } |
| 1272 | |
| 1273 | static bool conf_changed; |
| 1274 | static void (*conf_changed_callback)(void); |
no test coverage detected