summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general/gr_constants.i
diff options
context:
space:
mode:
authorjcorgan2009-07-11 02:34:31 +0000
committerjcorgan2009-07-11 02:34:31 +0000
commit3b0db38361d6ff50d62d814e72eb1fdd0e5d762d (patch)
tree983040f540446c50eb68367d3bb576600ee8fc89 /gnuradio-core/src/lib/general/gr_constants.i
parent214874a64800ccf0ed74646a3ea6812856e12673 (diff)
downloadgnuradio-3b0db38361d6ff50d62d814e72eb1fdd0e5d762d.tar.gz
gnuradio-3b0db38361d6ff50d62d814e72eb1fdd0e5d762d.tar.bz2
gnuradio-3b0db38361d6ff50d62d814e72eb1fdd0e5d762d.zip
Implements ticket:401 and ticket:402.
Adds several API functions to determine build constants at runtime, and a convenience command line program to display them: From C++: const std::string gr_prefix(); const std::string gr_sysconfdir(); const std::string gr_prefsdir(); const std::string gr_build_date(); const std::string gr_svn_date(); const std::string gr_svn_version(); const std::string gr_version(); From Python: gr.prefix() gr.sysconfdir() gr.prefsdir() gr.build_date() gr.svn_date() gr.svn_version() gr.version() The new binary is 'gnuradio' and installed on the path: $ gnuradio Program options: gnuradio [options]: -h [ --help ] print help message --prefix print gnuradio installation prefix --sysconfdir print gnuradio system configuration directory --prefsdir print gnuradio preferences directory --builddate print gnuradio build date (RFC2822 format) -v [ --version ] print gnuradio version --svnversion print SVN repository version (SVN format) --svndate print SVN repository date $ git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11418 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/general/gr_constants.i')
-rw-r--r--gnuradio-core/src/lib/general/gr_constants.i17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/general/gr_constants.i b/gnuradio-core/src/lib/general/gr_constants.i
new file mode 100644
index 000000000..156af4a36
--- /dev/null
+++ b/gnuradio-core/src/lib/general/gr_constants.i
@@ -0,0 +1,17 @@
+/* -*- c++ -*- */
+
+%rename(prefix) gr_prefix;
+%rename(sysconfdir) gr_sysconfdir;
+%rename(prefsdir) gr_prefsdir;
+%rename(build_date) gr_build_date;
+%rename(svn_date) gr_svn_date;
+%rename(svn_version) gr_svn_version;
+%rename(version) gr_version;
+
+const std::string gr_prefix();
+const std::string gr_sysconfdir();
+const std::string gr_prefsdir();
+const std::string gr_build_date();
+const std::string gr_svn_date();
+const std::string gr_svn_version();
+const std::string gr_version();