Tools: print full usage info. Also put feature AEC at the top
@@ -20,6 +20,9 @@ extern int optind;
static void usage_and_exit(const char* progname)
{
printf("\nUsage: %s [-v] [-d] [-s]\n", progname);
+ printf("\t-v\tPrint only the version of ecCodes\n");
+ printf("\t-d\tPrint only the definitions path\n");
+ printf("\t-s\tPrint only the samples path\n");
exit(1);
}
@@ -37,14 +40,14 @@ static void print_debug_info(grib_context* context)
#ifdef HAVE_AEC
aec = 1;
#endif
- grib_context_log(context, GRIB_LOG_DEBUG, "Git SHA1=%s", grib_get_git_sha1());
- grib_context_log(context, GRIB_LOG_DEBUG, "Build date=%s", codes_get_build_date());
+ grib_context_log(context, GRIB_LOG_DEBUG, "Git SHA1: %s", grib_get_git_sha1());
+ grib_context_log(context, GRIB_LOG_DEBUG, "Build date: %s", codes_get_build_date());
grib_context_log(context, GRIB_LOG_DEBUG, "Features:");
+ grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_AEC=%d", aec);
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_JPEG=%d", HAVE_JPEG);
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBJASPER=%d", HAVE_LIBJASPER);
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBOPENJPEG=%d", HAVE_JPEG);
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBPNG=%d", HAVE_LIBPNG);
- grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_AEC=%d", aec);
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_ECCODES_THREADS=%d", GRIB_PTHREADS);
#ifdef GRIB_OMP_THREADS
grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_ECCODES_OMP_THREADS=%d", GRIB_OMP_THREADS);
@@ -90,8 +93,7 @@ int main(int argc, char* argv[])
if (print_flags == INFO_PRINT_ALL) {
print_debug_info(context);
printf("\n");
- printf("%s Version %d.%d.%d",
- grib_get_package_name(), major, minor, revision);
+ printf("%s Version %d.%d.%d", grib_get_package_name(), major, minor, revision);
if (ECCODES_MAJOR_VERSION < 1)
printf(" PRE-RELEASE");
