Move the subversion revision number to a private header.

This commit is contained in:
Jef Driesen 2010-05-03 14:20:05 +00:00
parent 2cd09fd525
commit 996bfb2b48
4 changed files with 6 additions and 13 deletions

View File

@ -67,6 +67,7 @@ AC_CONFIG_FILES([
libdivecomputer.pc
Makefile
src/Makefile
src/version.h
src/libdivecomputer.rc
examples/Makefile
])

View File

@ -125,14 +125,9 @@ $(top_srcdir)/revision: FORCE
if ! test -f $@; then touch $@; fi; \
fi
version.h: $(top_srcdir)/revision version.h.in Makefile.am
$(AM_V_GEN) sed \
-e 's/\@DC_VERSION_MAJOR\@/@DC_VERSION_MAJOR@/' \
-e 's/\@DC_VERSION_MINOR\@/@DC_VERSION_MINOR@/' \
-e 's/\@DC_VERSION_MICRO\@/@DC_VERSION_MICRO@/' \
-e 's/\@DC_VERSION_EXTRA\@/'`cat $(top_srcdir)/revision`'/' \
$(srcdir)/version.h.in > $@
revision.h: $(top_srcdir)/revision Makefile.am
$(AM_V_GEN) echo "#define DC_VERSION_REVISION \""`cat $(top_srcdir)/revision`"\"" > $@
BUILT_SOURCES = version.h
EXTRA_DIST = libdivecomputer.symbols $(top_srcdir)/revision version.h.in
CLEANFILES = libdivecomputer.exp revision-t
BUILT_SOURCES = revision.h
EXTRA_DIST = libdivecomputer.symbols $(top_srcdir)/revision
CLEANFILES = libdivecomputer.exp revision.h revision-t

View File

@ -28,7 +28,6 @@ dc_version (dc_version_t *version)
version->major = DC_VERSION_MAJOR;
version->minor = DC_VERSION_MINOR;
version->micro = DC_VERSION_MICRO;
version->extra = DC_VERSION_EXTRA;
}
return DC_VERSION;

View File

@ -30,7 +30,6 @@ extern "C" {
#define DC_VERSION_MAJOR @DC_VERSION_MAJOR@
#define DC_VERSION_MINOR @DC_VERSION_MINOR@
#define DC_VERSION_MICRO @DC_VERSION_MICRO@
#define DC_VERSION_EXTRA "@DC_VERSION_EXTRA@"
#define DC_VERSION_CHECK(major,minor,micro) \
(DC_VERSION_MAJOR > (major) || \
@ -42,7 +41,6 @@ typedef struct dc_version_t {
unsigned int major;
unsigned int minor;
unsigned int micro;
const char *extra;
} dc_version_t;
const char *