From 3c29644d3bc8c4daad68ab92003a9e754f39de2a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 18 Nov 2021 22:02:57 +0100 Subject: Refactor configure and the way it generates its cache. --- src/libctor.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/libctor.cc') diff --git a/src/libctor.cc b/src/libctor.cc index 1fe1298..fcd3a95 100644 --- a/src/libctor.cc +++ b/src/libctor.cc @@ -39,6 +39,11 @@ int main(int argc, char* argv[]) return configure(settings, argc, argv); } + if(argc > 1 && std::string(argv[1]) == "reconfigure") + { + return reconfigure(settings, argc, argv); + } + bool write_compilation_database{false}; std::string compilation_database; bool print_configure_cmd{false}; @@ -154,9 +159,10 @@ int main(int argc, char* argv[]) std::cout << "Usage: " << argv[0] << " [options] [target] ...\n"; std::cout << R"_( where target can be either: - configure - run configuration step (cannot be used with other targets). - clean - clean all generated files. - all - build all targets (default) + configure - run configuration step (cannot be used with other targets). + reconfigure - rerun configuration step with the same arguments as last (cannot be used with other targets). + clean - clean all generated files. + all - build all targets (default) or the name of a target which will be built along with its dependencies. Use '-l' to see a list of possible target names. @@ -264,7 +270,7 @@ Options: { no_default_build = true; const auto& c = configuration(); - for(const auto& config : c) + for(const auto& config : c.tools) { std::cout << config.first << ": " << config.second << "\n"; } -- cgit v1.2.3