summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-11-15 23:37:47 +0100
committerBert Vermeulen <bert@biot.com>2013-11-15 23:37:47 +0100
commit2b628af1e5f816b96683a5a140642a97fe0ef8e1 (patch)
treed05ab734e27451e988d1c2559350b8455110c5cd
parenta929afa618be52072786b51f1b9ea7be03edcd49 (diff)
downloadlibsigrokdecode-2b628af1e5f816b96683a5a140642a97fe0ef8e1.tar.gz
libsigrokdecode-2b628af1e5f816b96683a5a140642a97fe0ef8e1.zip
Move versioning info out to separate header
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--libsigrokdecode.h (renamed from libsigrokdecode.h.in)34
-rw-r--r--version.h.in70
5 files changed, 75 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index d6001a5..2016020 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,12 +17,12 @@ map
missing
stamp-h1
autostuff/
-libsigrokdecode.h
ChangeLog
INSTALL
tests/check_main
tests/check_main.*
tests/test-suite.log
+version.h
# recursive autoconf leftovers
.deps
diff --git a/Makefile.am b/Makefile.am
index 784562e..7311fae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,7 @@ libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \
libsigrokdecode_la_LDFLAGS = $(SRD_LIB_LDFLAGS) $(LDFLAGS_PYTHON)
library_includedir = $(includedir)/libsigrokdecode
-library_include_HEADERS = libsigrokdecode.h
+library_include_HEADERS = libsigrokdecode.h version.h
noinst_HEADERS = libsigrokdecode-internal.h
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index f56803b..e6916f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,7 +157,7 @@ AC_SUBST(SRD_PACKAGE_VERSION_MICRO)
AC_SUBST(SRD_PACKAGE_VERSION)
AC_CONFIG_FILES([Makefile
- libsigrokdecode.h
+ version.h
libsigrokdecode.pc
contrib/Makefile
decoders/Makefile
diff --git a/libsigrokdecode.h.in b/libsigrokdecode.h
index b759428..032d944 100644
--- a/libsigrokdecode.h.in
+++ b/libsigrokdecode.h
@@ -49,38 +49,6 @@ struct srd_session;
*/
/*
- * Package version macros (can be used for conditional compilation).
- */
-
-/** The libsigrokdecode package 'major' version number. */
-#define SRD_PACKAGE_VERSION_MAJOR @SRD_PACKAGE_VERSION_MAJOR@
-
-/** The libsigrokdecode package 'minor' version number. */
-#define SRD_PACKAGE_VERSION_MINOR @SRD_PACKAGE_VERSION_MINOR@
-
-/** The libsigrokdecode package 'micro' version number. */
-#define SRD_PACKAGE_VERSION_MICRO @SRD_PACKAGE_VERSION_MICRO@
-
-/** The libsigrokdecode package version ("major.minor.micro") as string. */
-#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 SRD_LIB_VERSION_CURRENT @SRD_LIB_VERSION_CURRENT@
-
-/** The libsigrokdecode libtool 'revision' version number. */
-#define SRD_LIB_VERSION_REVISION @SRD_LIB_VERSION_REVISION@
-
-/** The libsigrokdecode libtool 'age' version number. */
-#define SRD_LIB_VERSION_AGE @SRD_LIB_VERSION_AGE@
-
-/** The libsigrokdecode libtool version ("current:revision:age") as string. */
-#define SRD_LIB_VERSION_STRING "@SRD_LIB_VERSION@"
-
-/*
* All possible return codes of libsigrokdecode functions must be listed here.
* Functions should never return hardcoded numbers as status, but rather
* use these enum values. All error codes are negative numbers.
@@ -367,6 +335,8 @@ SRD_API const char *srd_lib_version_string_get(void);
SRD_API const char *srd_strerror(int error_code);
SRD_API const char *srd_strerror_name(int error_code);
+#include "version.h"
+
#ifdef __cplusplus
}
#endif
diff --git a/version.h.in b/version.h.in
new file mode 100644
index 0000000..5e78711
--- /dev/null
+++ b/version.h.in
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBSIGROKDECODE_VERSION_H
+#define LIBSIGROKDECODE_VERSION_H
+
+/**
+ * @file
+ *
+ * Version number definitions and macros.
+ */
+
+/**
+ * @ingroup grp_versions
+ *
+ * @{
+ */
+
+/*
+ * Package version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode package 'major' version number. */
+#define SRD_PACKAGE_VERSION_MAJOR @SRD_PACKAGE_VERSION_MAJOR@
+
+/** The libsigrokdecode package 'minor' version number. */
+#define SRD_PACKAGE_VERSION_MINOR @SRD_PACKAGE_VERSION_MINOR@
+
+/** The libsigrokdecode package 'micro' version number. */
+#define SRD_PACKAGE_VERSION_MICRO @SRD_PACKAGE_VERSION_MICRO@
+
+/** The libsigrokdecode package version ("major.minor.micro") as string. */
+#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 SRD_LIB_VERSION_CURRENT @SRD_LIB_VERSION_CURRENT@
+
+/** The libsigrokdecode libtool 'revision' version number. */
+#define SRD_LIB_VERSION_REVISION @SRD_LIB_VERSION_REVISION@
+
+/** The libsigrokdecode libtool 'age' version number. */
+#define SRD_LIB_VERSION_AGE @SRD_LIB_VERSION_AGE@
+
+/** The libsigrokdecode libtool version ("current:revision:age") as string. */
+#define SRD_LIB_VERSION_STRING "@SRD_LIB_VERSION@"
+
+/** @} */
+
+#endif