From: Daniel Elstner Date: Wed, 12 Aug 2015 22:38:47 +0000 (+0200) Subject: Consistently use SR_PACKAGE_VERSION instead of VERSION X-Git-Tag: libsigrok-0.4.0~441 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b9eb8e1a8cdb4ac6449cfa881da96bcf9bc687ad;p=libsigrok.git Consistently use SR_PACKAGE_VERSION instead of VERSION --- diff --git a/bindings/cxx/libsigrokcxx.pc.in b/bindings/cxx/libsigrokcxx.pc.in index 0abc2e5e..10a92f2d 100644 --- a/bindings/cxx/libsigrokcxx.pc.in +++ b/bindings/cxx/libsigrokcxx.pc.in @@ -7,8 +7,7 @@ Name: libsigrokcxx Description: C++ bindings for libsigrok URL: http://www.sigrok.org Requires: libsigrok glibmm-2.4 -Version: @VERSION@ +Version: @SR_PACKAGE_VERSION@ Libs: -L${libdir} -lsigrokcxx Libs.private: -lm Cflags: -I${includedir} - diff --git a/configure.ac b/configure.ac index 46ed9de3..68e642f2 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AC_CONFIG_MACRO_DIR([autostuff]) AC_CONFIG_AUX_DIR([autostuff]) # We require at least automake 1.11 (needed for 'silent rules'). -AM_INIT_AUTOMAKE([1.11 -Wall -Werror subdir-objects check-news color-tests]) +AM_INIT_AUTOMAKE([1.11 -Wall -Werror no-define subdir-objects check-news color-tests]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) diff --git a/libsigrok.pc.in b/libsigrok.pc.in index 219f7c3b..a0616c88 100644 --- a/libsigrok.pc.in +++ b/libsigrok.pc.in @@ -8,8 +8,7 @@ Description: Backend library of the sigrok logic analyzer software URL: http://www.sigrok.org Requires: glib-2.0 Requires.private: @SR_PKGLIBS@ -Version: @VERSION@ +Version: @SR_PACKAGE_VERSION@ Libs: -L${libdir} -lsigrok Libs.private: -lm Cflags: -I${includedir} - diff --git a/src/output/ascii.c b/src/output/ascii.c index f45081f1..1f60c680 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -107,7 +107,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s\n", PACKAGE_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/bits.c b/src/output/bits.c index eb134b4e..79146adf 100644 --- a/src/output/bits.c +++ b/src/output/bits.c @@ -101,7 +101,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s\n", PACKAGE_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/csv.c b/src/output/csv.c index 36cf2e86..d3f99664 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -21,7 +21,6 @@ #include #include #include -#include "config.h" /* Needed for PACKAGE_STRING and others. */ #include #include "libsigrok-internal.h" @@ -118,8 +117,8 @@ static GString *gen_header(const struct sr_output *o) /* Some metadata */ t = time(NULL); - g_string_append_printf(header, "; CSV, generated by %s on %s", - PACKAGE_STRING, ctime(&t)); + g_string_append_printf(header, "; CSV, generated by %s %s on %s", + PACKAGE_NAME, SR_PACKAGE_VERSION_STRING, ctime(&t)); /* Columns / channels */ num_channels = g_slist_length(o->sdi->channels); diff --git a/src/output/gnuplot.c b/src/output/gnuplot.c index 111dcadf..c9290739 100644 --- a/src/output/gnuplot.c +++ b/src/output/gnuplot.c @@ -21,7 +21,6 @@ #include #include #include -#include "config.h" /* Needed for PACKAGE_STRING and others. */ #include #include "libsigrok-internal.h" @@ -107,8 +106,8 @@ static GString *gen_header(const struct sr_output *o) t = time(NULL); header = g_string_sized_new(512); g_string_printf(header, "%s", gnuplot_header); - g_string_append_printf(header, "# Generated by %s on %s", - PACKAGE_STRING, ctime(&t)); + g_string_append_printf(header, "# Generated by %s %s on %s", + PACKAGE_NAME, SR_PACKAGE_VERSION_STRING, ctime(&t)); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "# Acquisition with %d/%d channels", diff --git a/src/output/hex.c b/src/output/hex.c index 52c33a10..10e4d0cc 100644 --- a/src/output/hex.c +++ b/src/output/hex.c @@ -106,7 +106,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s\n", PACKAGE_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/srzip.c b/src/output/srzip.c index ae066cde..e52fec87 100644 --- a/src/output/srzip.c +++ b/src/output/srzip.c @@ -96,7 +96,7 @@ static int zip_create(const struct sr_output *o) close(tmpfile); meta = g_fopen(metafile, "wb"); fprintf(meta, "[global]\n"); - fprintf(meta, "sigrok version = %s\n", PACKAGE_VERSION); + fprintf(meta, "sigrok version = %s\n", SR_PACKAGE_VERSION_STRING); fprintf(meta, "[device 1]\ncapturefile = logic-1\n"); fprintf(meta, "total probes = %d\n", g_slist_length(o->sdi->channels)); s = sr_samplerate_string(outc->samplerate); diff --git a/src/output/vcd.c b/src/output/vcd.c index 8dd503a2..fd7b9123 100644 --- a/src/output/vcd.c +++ b/src/output/vcd.c @@ -22,7 +22,6 @@ #include #include #include -#include "config.h" /* Needed for PACKAGE and others. */ #include #include "libsigrok-internal.h" @@ -104,7 +103,7 @@ static GString *gen_header(const struct sr_output *o) /* generator */ g_string_append_printf(header, "$version %s %s $end\n", - PACKAGE, PACKAGE_VERSION); + PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); g_string_append_printf(header, "$comment\n Acquisition with " "%d/%d channels", ctx->num_enabled_channels, num_channels); @@ -135,7 +134,7 @@ static GString *gen_header(const struct sr_output *o) g_free(frequency_s); /* scope */ - g_string_append_printf(header, "$scope module %s $end\n", PACKAGE); + g_string_append_printf(header, "$scope module %s $end\n", PACKAGE_NAME); /* Wires / channels */ for (i = 0, l = o->sdi->channels; l; l = l->next, i++) { diff --git a/src/session_file.c b/src/session_file.c index e0c544bf..5aed89b8 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -26,7 +26,6 @@ #include #include #include -#include "config.h" /* Needed for PACKAGE_VERSION and others. */ #include #include "libsigrok-internal.h" @@ -351,7 +350,7 @@ SR_API int sr_session_save_init(struct sr_session *session, close(tmpfile); meta = g_fopen(metafile, "wb"); fprintf(meta, "[global]\n"); - fprintf(meta, "sigrok version = %s\n", PACKAGE_VERSION); + fprintf(meta, "sigrok version = %s\n", SR_PACKAGE_VERSION_STRING); /* metadata */ fprintf(meta, "[device 1]\n");