[all] Build a single executable
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "base/error_state.h"
|
||||
#include "base/nested_output.h"
|
||||
#include "caching/commands.h"
|
||||
#include "caching/metadata.h"
|
||||
#include "persistent-data/block.h"
|
||||
#include "persistent-data/file_utils.h"
|
||||
@@ -322,7 +323,7 @@ namespace {
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cache_check_main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
flags fs;
|
||||
@@ -384,4 +385,6 @@ int main(int argc, char **argv)
|
||||
return check_with_exception_handling(argv[optind], fs);
|
||||
}
|
||||
|
||||
base::command caching::cache_check_cmd("cache_check", cache_check_main);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "version.h"
|
||||
#include "caching/commands.h"
|
||||
#include "caching/mapping_array.h"
|
||||
#include "caching/metadata.h"
|
||||
#include "caching/metadata_dump.h"
|
||||
@@ -66,7 +67,7 @@ namespace {
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cache_dump_main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
flags fs;
|
||||
@@ -114,4 +115,6 @@ int main(int argc, char **argv)
|
||||
return dump(argv[optind], output, fs);
|
||||
}
|
||||
|
||||
base::command caching::cache_dump_cmd("cache_dump", cache_dump_main);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "caching/commands.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <iostream>
|
||||
@@ -132,7 +134,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cache_metadata_size_main(int argc, char **argv)
|
||||
{
|
||||
flags fs;
|
||||
|
||||
@@ -156,4 +158,6 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
base::command caching::cache_metadata_size_cmd("cache_metadata_size", cache_metadata_size_main);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include <getopt.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "caching/commands.h"
|
||||
#include "caching/metadata.h"
|
||||
#include "caching/metadata_dump.h"
|
||||
#include "caching/restore_emitter.h"
|
||||
@@ -52,7 +53,7 @@ namespace {
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cache_repair_main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
boost::optional<string> input_path, output_path;
|
||||
@@ -105,4 +106,6 @@ int main(int argc, char **argv)
|
||||
return repair(*input_path, *output_path);
|
||||
}
|
||||
|
||||
base::command caching::cache_repair_cmd("cache_repair", cache_repair_main);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "caching/commands.h"
|
||||
#include "caching/metadata.h"
|
||||
#include "caching/restore_emitter.h"
|
||||
#include "caching/xml_format.h"
|
||||
@@ -95,7 +96,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int cache_restore_main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
flags fs;
|
||||
@@ -169,4 +170,6 @@ int main(int argc, char **argv)
|
||||
return restore(fs);
|
||||
}
|
||||
|
||||
base::command caching::cache_restore_cmd("cache_restore", cache_restore_main);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
18
caching/commands.h
Normal file
18
caching/commands.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef CACHING_COMMANDS_H
|
||||
#define CACHING_COMMANDS_H
|
||||
|
||||
#include "base/application.h"
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace caching {
|
||||
extern base::command cache_check_cmd;
|
||||
extern base::command cache_dump_cmd;
|
||||
extern base::command cache_metadata_size_cmd;
|
||||
extern base::command cache_restore_cmd;
|
||||
extern base::command cache_repair_cmd;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user