summaryrefslogtreecommitdiff
path: root/src/libctor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-11-18 22:02:57 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-11-18 22:02:57 +0100
commit3c29644d3bc8c4daad68ab92003a9e754f39de2a (patch)
tree38a03929b6c773131677a7c08cda868769495423 /src/libctor.cc
parentdbd68011363b01f22ab85e11ad52a8e90da9611a (diff)
Refactor configure and the way it generates its cache.
Diffstat (limited to 'src/libctor.cc')
-rw-r--r--src/libctor.cc14
1 files changed, 10 insertions, 4 deletions
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";
}