Signed-off-by: Paul Moore <[email protected]>
---
 configure.ac           |   42 ++++++++++++++++++++++++++++++++++--------
 src/Makefile.am        |    3 ++-
 src/python/Makefile.am |    2 +-
 3 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9b3b697..5df8be5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,9 @@
-AC_INIT([libseccomp], [2.1.0])
+
+dnl ####
+dnl libseccomp defines
+dnl ####
+AC_INIT([libseccomp], [0.0.0])
+
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([configure.h])
 AC_CONFIG_MACRO_DIR([m4])
@@ -19,11 +24,12 @@ AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_LDFLAGS])
 
-VERSION_MAJOR="${VERSION%%.*}"
-VERSION_MINOR="${VERSION#*.}"
-VERSION_MICRO="${VERSION_MINOR#*.}"
-VERSION_MINOR="${VERSION_MINOR%%.*}"
-VERSION_MICRO="${VERSION_MICRO%%.*}"
+dnl ####
+dnl version information
+dnl ####
+VERSION_MAJOR=$(echo ${VERSION} | cut -d'.' -f 1)
+VERSION_MINOR=$(echo ${VERSION} | cut -d'.' -f 2)
+VERSION_MICRO=$(echo ${VERSION} | cut -d'.' -f 3)
 AC_SUBST([VERSION_MAJOR])
 AC_SUBST([VERSION_MINOR])
 AC_SUBST([VERSION_MICRO])
@@ -58,6 +64,26 @@ AC_DEFINE_UNQUOTED([ENABLE_PYTHON],
        [$(test "$enable_python" == yes && echo 1 || echo 0)],
        [Python bindings build flag.])
 
-AC_CONFIG_FILES([Makefile src/Makefile src/python/Makefile tools/Makefile
-       tests/Makefile include/seccomp.h libseccomp.pc])
+dnl ####
+dnl version dependent files
+dnl ####
+AC_CONFIG_FILES([
+       libseccomp.pc
+       include/seccomp.h
+])
+
+dnl ####
+dnl makefiles
+dnl ####
+AC_CONFIG_FILES([
+       Makefile
+       src/Makefile
+       src/python/Makefile
+       tools/Makefile
+       tests/Makefile
+])
+
+dnl ####
+dnl done
+dnl ####
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 61e421b..3148e8c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,4 +14,5 @@ libseccomp_la_SOURCES = api.c arch.c arch-x86.c 
arch-x86-syscalls.c \
        \
        arch-mips.h arch-arm.h arch-x32.h arch-x86.h arch-x86_64.h arch.h \
        db.h gen_bpf.h gen_pfc.h hash.h system.h
-libseccomp_la_LDFLAGS = -version-number 2:1:0
+libseccomp_la_LDFLAGS = \
+       -version-number ${VERSION_MAJOR}:${VERSION_MINOR}:${VERSION_MICRO}
diff --git a/src/python/Makefile.am b/src/python/Makefile.am
index c166506..48dcc66 100644
--- a/src/python/Makefile.am
+++ b/src/python/Makefile.am
@@ -3,7 +3,7 @@
 PYTHON = /usr/bin/env python
 
 PY_DISTUTILS = \
-       VERSION_RELEASE="${VERSION_RELEASE}" \
+       VERSION_RELEASE="@PACKAGE_VERSION@" \
        CFLAGS="-I\${top_srcdir}/include ${CFLAGS} ${CPPFLAGS}" \
        LDFLAGS="${LDFLAGS}" \
        ${PYTHON} ./setup.py


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
libseccomp-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libseccomp-discuss

Reply via email to