summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-18 20:44:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-18 20:44:26 (GMT)
commit5c2de222219de09ea0baf4f078915ee2f747bf4f (patch)
treefc10b780531fe15f0fb59c3bd1fb2507708aa7e6 /Swiften
parent7d0e9c3d963ffcb3f7d6d313dfa55466beb742b9 (diff)
downloadswift-5c2de222219de09ea0baf4f078915ee2f747bf4f.zip
swift-5c2de222219de09ea0baf4f078915ee2f747bf4f.tar.bz2
Tweak help documentation and add manpages.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Config/swiften-config.cpp10
-rw-r--r--Swiften/SConscript1
2 files changed, 11 insertions, 0 deletions
diff --git a/Swiften/Config/swiften-config.cpp b/Swiften/Config/swiften-config.cpp
index b3875cb..b616711 100644
--- a/Swiften/Config/swiften-config.cpp
+++ b/Swiften/Config/swiften-config.cpp
@@ -15,6 +15,7 @@
#include <Swiften/Base/Platform.h>
#include <Swiften/Base/Paths.h>
+#include <Swiften/Version.h>
#include "swiften-config.h"
@@ -34,6 +35,7 @@ int main(int argc, char* argv[]) {
boost::program_options::options_description desc;
desc.add_options()
("help", "Show this help message")
+ ("version", "Show version information")
("libs", "List the library flags")
("cflags", "List the compiler & preprocessor flags")
;
@@ -55,9 +57,17 @@ int main(int argc, char* argv[]) {
}
if (vm.count("help") > 0) {
+ std::cout << "swiften-config outputs the Swiften build options." << std::endl;
+ std::cout << std::endl;
+ std::cout << "Usage: swiften-config [OPTIONS]..." << std::endl;
+ std::cout << std::endl;
std::cout << desc << "\n";
return 0;
}
+ if (vm.count("version") > 0) {
+ std::cout << "swiften-config " << SWIFTEN_VERSION_STRING << std::endl;
+ return 0;
+ }
// Read in all variables
std::vector<std::string> libs;
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 30fd9b6..12c7456 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -362,6 +362,7 @@ if env["SCONS_STAGE"] == "build" :
version_header = "#pragma once\n\n"
version_header += "#define SWIFTEN_VERSION 0x%02X%02X%02X\n" % (swiften_env["SWIFTEN_VERSION_MAJOR"], swiften_env["SWIFTEN_VERSION_MINOR"], swiften_env["SWIFTEN_VERSION_PATCH"])
+ version_header += "#define SWIFTEN_VERSION_STRING \"%s\"\n" % swiften_env["SWIFTEN_VERSION"]
swiften_env.WriteVal("Version.h", swiften_env.Value(version_header))
swiften_includes.append("Swiften/Version.h")