From: Uwe Hermann Date: Sat, 31 Mar 2012 09:31:14 +0000 (+0200) Subject: srd: SRD_PACKAGE_VERSION_* for consistency. X-Git-Tag: libsigrokdecode-0.1.0~15 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=14b42dad483c98b3dbf7b389e60b9cede1cd122f;p=libsigrokdecode.git srd: SRD_PACKAGE_VERSION_* for consistency. No need to use the LIBSIGROKDECODE_ prefix here when we use SRD_ everywhere else. Also, better distinction between package version and lib version. --- diff --git a/Makefile.am b/Makefile.am index fd5e004..58ed252 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,8 +29,7 @@ libsigrokdecode_la_SOURCES = controller.c decoder.c log.c util.c exception.c \ libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \ -DDECODERS_DIR='"$(DECODERS_DIR)"' -libsigrokdecode_la_LDFLAGS = $(LIBSIGROKDECODE_LT_LDFLAGS) \ - $(LDFLAGS_PYTHON) +libsigrokdecode_la_LDFLAGS = $(SRD_LIB_LDFLAGS) $(LDFLAGS_PYTHON) include_HEADERS = sigrokdecode.h noinst_HEADERS = sigrokdecode-internal.h diff --git a/configure.ac b/configure.ac index 8fbfd45..b3e3b60 100644 --- a/configure.ac +++ b/configure.ac @@ -21,13 +21,12 @@ AC_PREREQ([2.63]) # libsigrokdecode package version number (NOT the same as shared lib version!). -m4_define([libsigrokdecode_major_version], [0]) -m4_define([libsigrokdecode_minor_version], [1]) -m4_define([libsigrokdecode_micro_version], [0]) -m4_define([libsigrokdecode_version], - [libsigrokdecode_major_version.libsigrokdecode_minor_version.libsigrokdecode_micro_version]) +m4_define([srd_package_version_major], [0]) +m4_define([srd_package_version_minor], [1]) +m4_define([srd_package_version_micro], [0]) +m4_define([srd_package_version], [srd_package_version_major.srd_package_version_minor.srd_package_version_micro]) -AC_INIT([libsigrokdecode], [libsigrokdecode_version], +AC_INIT([libsigrokdecode], [srd_package_version], [sigrok-devel@lists.sourceforge.net], [libsigrokdecode], [http://www.sigrok.org]) AC_CONFIG_HEADER([config.h]) @@ -38,9 +37,9 @@ AC_CONFIG_AUX_DIR([autostuff]) AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign std-options]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AH_TOP([#ifndef LIBSIGROKDECODE_CONFIG_H -#define LIBSIGROKDECODE_CONFIG_H /* To stop multiple inclusions. */]) -AH_BOTTOM([#endif /* LIBSIGROKDECODE_CONFIG_H */]) +AH_TOP([#ifndef SRD_CONFIG_H +#define SRD_CONFIG_H /* To stop multiple inclusions. */]) +AH_BOTTOM([#endif /* SRD_CONFIG_H */]) CFLAGS="-g -Wall -Wextra" @@ -62,16 +61,16 @@ PKG_PROG_PKG_CONFIG([0.22]) # Carefully read the libtool docs before updating these numbers! # The algorithm for determining which number to change (and how) is nontrivial! # http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info -LIBSIGROKDECODE_LT_CURRENT=0 -LIBSIGROKDECODE_LT_REVISION=0 -LIBSIGROKDECODE_LT_AGE=0 -LIBSIGROKDECODE_LT_VERSION="$LIBSIGROKDECODE_LT_CURRENT:$LIBSIGROKDECODE_LT_REVISION:$LIBSIGROKDECODE_LT_AGE" -LIBSIGROKDECODE_LT_LDFLAGS="-version-info $LIBSIGROKDECODE_LT_VERSION" -AC_SUBST(LIBSIGROKDECODE_LT_CURRENT) -AC_SUBST(LIBSIGROKDECODE_LT_REVISION) -AC_SUBST(LIBSIGROKDECODE_LT_AGE) -AC_SUBST(LIBSIGROKDECODE_LT_VERSION) -AC_SUBST(LIBSIGROKDECODE_LT_LDFLAGS) +SRD_LIB_VERSION_CURRENT=0 +SRD_LIB_VERSION_REVISION=0 +SRD_LIB_VERSION_AGE=0 +SRD_LIB_VERSION="$SRD_LIB_VERSION_CURRENT:$SRD_LIB_VERSION_REVISION:$SRD_LIB_VERSION_AGE" +SRD_LIB_LDFLAGS="-version-info $SRD_LIB_VERSION" +AC_SUBST(SRD_LIB_VERSION_CURRENT) +AC_SUBST(SRD_LIB_VERSION_REVISION) +AC_SUBST(SRD_LIB_VERSION_AGE) +AC_SUBST(SRD_LIB_VERSION) +AC_SUBST(SRD_LIB_LDFLAGS) # Checks for libraries. @@ -134,15 +133,15 @@ AC_SUBST(DECODERS_DIR, "$datadir/libsigrokdecode/decoders") AC_SUBST(MAKEFLAGS, '--no-print-directory') AC_SUBST(AM_LIBTOOLFLAGS, '--silent') -LIBSIGROKDECODE_MAJOR_VERSION=libsigrokdecode_major_version -LIBSIGROKDECODE_MINOR_VERSION=libsigrokdecode_minor_version -LIBSIGROKDECODE_MICRO_VERSION=libsigrokdecode_micro_version -LIBSIGROKDECODE_VERSION=libsigrokdecode_version +SRD_PACKAGE_VERSION_MAJOR=srd_package_version_major +SRD_PACKAGE_VERSION_MINOR=srd_package_version_minor +SRD_PACKAGE_VERSION_MICRO=srd_package_version_micro +SRD_PACKAGE_VERSION=srd_package_version -AC_SUBST(LIBSIGROKDECODE_MAJOR_VERSION) -AC_SUBST(LIBSIGROKDECODE_MINOR_VERSION) -AC_SUBST(LIBSIGROKDECODE_MICRO_VERSION) -AC_SUBST(LIBSIGROKDECODE_VERSION) +AC_SUBST(SRD_PACKAGE_VERSION_MAJOR) +AC_SUBST(SRD_PACKAGE_VERSION_MINOR) +AC_SUBST(SRD_PACKAGE_VERSION_MICRO) +AC_SUBST(SRD_PACKAGE_VERSION) AC_CONFIG_FILES([Makefile sigrokdecode.h @@ -169,8 +168,8 @@ AC_OUTPUT echo echo "libsigrokdecode configuration summary:" echo -echo " - Package version (major.minor.micro): $LIBSIGROKDECODE_VERSION" -echo " - Library version (current:revision:age): $LIBSIGROKDECODE_LT_VERSION" +echo " - Package version (major.minor.micro): $SRD_PACKAGE_VERSION" +echo " - Library version (current:revision:age): $SRD_LIB_VERSION" echo " - Prefix: $prefix" echo echo "Detected libraries:" diff --git a/sigrokdecode.h.in b/sigrokdecode.h.in index 37a2257..7a435bc 100644 --- a/sigrokdecode.h.in +++ b/sigrokdecode.h.in @@ -35,32 +35,32 @@ extern "C" { */ /** The libsigrokdecode package 'major' version number. */ -#define LIBSIGROKDECODE_MAJOR_VERSION @LIBSIGROKDECODE_MAJOR_VERSION@ +#define SRD_PACKAGE_VERSION_MAJOR @SRD_PACKAGE_VERSION_MAJOR@ /** The libsigrokdecode package 'minor' version number. */ -#define LIBSIGROKDECODE_MINOR_VERSION @LIBSIGROKDECODE_MINOR_VERSION@ +#define SRD_PACKAGE_VERSION_MINOR @SRD_PACKAGE_VERSION_MINOR@ /** The libsigrokdecode package 'micro' version number. */ -#define LIBSIGROKDECODE_MICRO_VERSION @LIBSIGROKDECODE_MICRO_VERSION@ +#define SRD_PACKAGE_VERSION_MICRO @SRD_PACKAGE_VERSION_MICRO@ /** The libsigrokdecode package version ("major.minor.micro") as string. */ -#define LIBSIGROKDECODE_VERSION_STRING "@LIBSIGROKDECODE_VERSION@" +#define SRD_PACKAGE_VERSION_STRING "@SRD_PACKAGE_VERSION@" /* * Library/libtool version macros (can be used for conditional compilation). */ /** The libsigrokdecode libtool 'current' version number. */ -#define LIBSIGROKDECODE_LT_CURRENT @LIBSIGROKDECODE_LT_CURRENT@ +#define SRD_LIB_VERSION_CURRENT @SRD_LIB_VERSION_CURRENT@ /** The libsigrokdecode libtool 'revision' version number. */ -#define LIBSIGROKDECODE_LT_REVISION @LIBSIGROKDECODE_LT_REVISION@ +#define SRD_LIB_VERSION_REVISION @SRD_LIB_VERSION_REVISION@ /** The libsigrokdecode libtool 'age' version number. */ -#define LIBSIGROKDECODE_LT_AGE @LIBSIGROKDECODE_LT_AGE@ +#define SRD_LIB_VERSION_AGE @SRD_LIB_VERSION_AGE@ /** The libsigrokdecode libtool version ("current:revision:age") as string. */ -#define LIBSIGROKDECODE_LT_VERSION_STRING "@LIBSIGROKDECODE_LT_VERSION@" +#define SRD_LIB_VERSION_STRING "@SRD_LIB_VERSION@" /* * Status/error codes returned by libsigrokdecode functions.