MCPcopy Create free account
hub / github.com/Entware/Entware / conf_write_autoconf

Function conf_write_autoconf

scripts/config/confdata.c:1199–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199int 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
1247static bool conf_changed;
1248static void (*conf_changed_callback)(void);

Callers 5

saveConfigMethod · 0.85
saveConfigAsMethod · 0.85
do_exitFunction · 0.85
handle_exitFunction · 0.85
mainFunction · 0.85

Calls 8

conf_get_autoconfig_nameFunction · 0.85
is_presentFunction · 0.85
conf_write_autoconf_cmdFunction · 0.85
conf_touch_depsFunction · 0.85
sym_calc_valueFunction · 0.85
__conf_write_autoconfFunction · 0.85
conf_get_autoheader_nameFunction · 0.85
conf_get_rustccfg_nameFunction · 0.85

Tested by

no test coverage detected