X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Ftools%2Fclam_tools%2Fwrite_build_config.cpp;h=6713ed637077cd82b0a1745f55dd1bc94dcd5ca0;hb=0d8e705a6a2a756c52cf8ad1d9c4d2b77d182d8b;hp=d3b9a812cad979196255538871c937366b474f36;hpb=b51411a29f1a751a09e69f5676afeea24a94ac83;p=feisty_meow.git diff --git a/nucleus/tools/clam_tools/write_build_config.cpp b/nucleus/tools/clam_tools/write_build_config.cpp index d3b9a812..6713ed63 100644 --- a/nucleus/tools/clam_tools/write_build_config.cpp +++ b/nucleus/tools/clam_tools/write_build_config.cpp @@ -206,12 +206,15 @@ if (read < 1) LOG("why is existing header contentless?"); if (write_header) { // we actually want to blast out a new file. byte_filer build_header(filename, "wb"); - if (!build_header.good()) - non_continuable_error(static_class_name(), func, astring("failed to create " + if (!build_header.good()) { + continuable_error(static_class_name(), func, astring("could not create " "build header file in ") + build_header.name()); - build_header.write(new_contents); - LOG(astring(static_class_name()) + ": wrote config to " - + build_header.name()); + return false; + } else { + build_header.write(new_contents); + LOG(astring(static_class_name()) + ": wrote config to " + + build_header.name()); + } } else { // nothing has changed. // LOG(astring(static_class_name()) + ": config already up to date in " @@ -226,7 +229,7 @@ int write_build_config::execute() SETUP_CONSOLE_LOGGER; // override the file_logger from app_shell. // find our build ini file. - astring repodir = environment::get("FEISTY_MEOW_DIR"); + astring repodir = environment::get("FEISTY_MEOW_APEX"); // the below code should never be needed for a properly configured build. #ifdef __WIN32__ @@ -245,8 +248,10 @@ int write_build_config::execute() // find our storage area for the build headers. we know a couple build // configurations by now, but this should really be coming out of a config // file instead. - astring library_directory = repodir + "/nucleus/library"; - if (!filename(library_directory).good()) { + astring versions_directory = environment::get("FEISTY_MEOW_GENERATED_STORE"); + // we keep our version files one level below the top of the generated store. + versions_directory += "/versions"; + if (!filename(versions_directory).good()) { non_continuable_error(static_class_name(), func, astring("failed to locate the library folder storing the generated files.")); } @@ -254,10 +259,8 @@ int write_build_config::execute() // these are very specific paths, but they really are where we expect to // see the headers. - astring cfg_header_filename = library_directory + "/" - "__build_configuration.h"; - astring ver_header_filename = library_directory + "/" - "__build_version.h"; + astring cfg_header_filename = versions_directory + "/__build_configuration.h"; + astring ver_header_filename = versions_directory + "/__build_version.h"; // open the ini file for reading. byte_filer ini(fname, "r"); @@ -289,7 +292,7 @@ int write_build_config::execute() astring buffer; while (!ini.eof()) { int chars = ini.getline(buffer, MAX_LINE_SIZE); - if (!chars) continue; // hmmm. + if (!chars) continue; // hmmm: what does no chars mean? variable_tokenizer t; t.parse(buffer); @@ -389,9 +392,11 @@ HOOPLE_MAIN(write_build_config, ) // static dependencies found by buildor_gen_deps.sh: #include #include + #include #include #include #include + #include #include #include #include