X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fconf.c;h=567f3b7410098a49d96e67186eb51ea5b195332a;hp=58df1b76b5288ad46661d75cacf88ead9cf456f9;hb=0d4b291764af0651e0c9043d918218a465792c37;hpb=786134321b6ef391f04409de1200482e7693284d diff --git a/config/conf.c b/config/conf.c index 58df1b7..567f3b7 100644 --- a/config/conf.c +++ b/config/conf.c @@ -451,7 +451,7 @@ static struct option long_opts[] = { {"oldaskconfig", no_argument, NULL, oldaskconfig}, {"oldconfig", no_argument, NULL, oldconfig}, {"syncconfig", no_argument, NULL, syncconfig}, - {"defconfig", optional_argument, NULL, defconfig}, + {"defconfig", required_argument, NULL, defconfig}, {"savedefconfig", required_argument, NULL, savedefconfig}, {"allnoconfig", no_argument, NULL, allnoconfig}, {"allyesconfig", no_argument, NULL, allyesconfig}, @@ -488,7 +488,6 @@ int main(int ac, char **av) const char *progname = av[0]; int opt; const char *name, *defconfig_file = NULL /* gcc uninit */; - struct stat tmpstat; int no_conf_write = 0; tty_stdio = isatty(0) && isatty(1); @@ -560,23 +559,9 @@ int main(int ac, char **av) name = av[optind]; conf_parse(name); //zconfdump(stdout); - if (sync_kconfig) { - name = conf_get_configname(); - if (stat(name, &tmpstat)) { - fprintf(stderr, "***\n" - "*** Configuration file \"%s\" not found!\n" - "***\n" - "*** Please run some configurator (e.g. \"make oldconfig\" or\n" - "*** \"make menuconfig\" or \"make xconfig\").\n" - "***\n", name); - exit(1); - } - } switch (input_mode) { case defconfig: - if (!defconfig_file) - defconfig_file = conf_get_default_confname(); if (conf_read(defconfig_file)) { fprintf(stderr, "***\n" @@ -705,6 +690,13 @@ int main(int ac, char **av) * syncconfig always creates or updates auto.conf because it is * used during the build. */ + + /* + * In our cmake case, we always want to update the autogenerated + * files. + */ + sync_kconfig = 1; + if (conf_write_autoconf(sync_kconfig) && sync_kconfig) { fprintf(stderr, "\n*** Error during sync of the configuration.\n\n");