aboutsummaryrefslogtreecommitdiff
path: root/src/make_pixelmap.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-29 15:44:02 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commit42898f7d59e215434fa2aead84223f64b30fcee8 (patch)
tree5cdfb4c0c279c766efcbbc6c455ee58a5c8741f1 /src/make_pixelmap.c
parent6105a7797b96418d940ced7d88c6cf2b308b9711 (diff)
New way of injecting version information
Also, this fixes some incorrect headers and adds --version flags to programs which didn't yet have them.
Diffstat (limited to 'src/make_pixelmap.c')
-rw-r--r--src/make_pixelmap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/make_pixelmap.c b/src/make_pixelmap.c
index eedcb439..cb5afcac 100644
--- a/src/make_pixelmap.c
+++ b/src/make_pixelmap.c
@@ -43,9 +43,11 @@
#include <assert.h>
#include <hdf5.h>
-#include "utils.h"
-#include "datatemplate.h"
-#include "detgeom.h"
+#include <utils.h>
+#include <datatemplate.h>
+#include <detgeom.h>
+
+#include "version.h"
static void show_help(const char *s)
@@ -190,6 +192,7 @@ int main(int argc, char *argv[])
{"badmap", 0, &badmap, 1},
{"good-pixel", 1, NULL, 301},
{"bad-pixel", 1, NULL, 302},
+ {"version", 0, NULL, 2},
{0, 0, NULL, 0}
};
@@ -207,6 +210,13 @@ int main(int argc, char *argv[])
output_file = strdup(optarg);
break;
+ case 2 :
+ printf("CrystFEL: %s\n",
+ crystfel_version_string());
+ printf("%s\n",
+ crystfel_licence_string());
+ return 0;
+
case 301:
if (sscanf(optarg, "%d", &good_pixel_val) != 1)
{