Fix: git version build system integration (v2)
[lttng-tools.git] / src / bin / lttng / lttng.c
index bad57fd9a8a41487e33482ba5ad5e49187c4abd3..2df8b8740225afc831c5769779473c0db5140f51 100644 (file)
@@ -90,7 +90,8 @@ static struct cmd_struct commands[] =  {
 
 static void usage(FILE *ofp)
 {
-       fprintf(ofp, "LTTng Trace Control " FULL_VERSION" - " VERSION_NAME"\n\n");
+       fprintf(ofp, "LTTng Trace Control " VERSION " - " VERSION_NAME "%s\n\n",
+               GIT_VERSION[0] == '\0' ? "" : " - " GIT_VERSION);
        fprintf(ofp, "usage: lttng [OPTIONS] <COMMAND> [<ARGS>]\n");
        fprintf(ofp, "\n");
        fprintf(ofp, "Options:\n");
@@ -134,8 +135,9 @@ static void usage(FILE *ofp)
 
 static void version(FILE *ofp)
 {
-       fprintf(ofp, "%s (LTTng Trace Control) " FULL_VERSION" - " VERSION_NAME"\n",
-                       progname);
+       fprintf(ofp, "%s (LTTng Trace Control) " VERSION" - " VERSION_NAME "%s\n",
+                       progname,
+                       GIT_VERSION[0] == '\0' ? "" : " - " GIT_VERSION);
 }
 
 /*
This page took 0.025604 seconds and 4 git commands to generate.