Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/yaz
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 17 Nov 2008 14:41:35 +0000 (15:41 +0100)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 17 Nov 2008 14:41:35 +0000 (15:41 +0100)
Makefile.am
TODO [deleted file]
configure.ac
include/yaz/.gitignore
include/yaz/Makefile.am
include/yaz/yaz-version.h [deleted file]
include/yaz/yaz-version.h.in [new file with mode: 0644]
win/version.nsi.in [new file with mode: 0644]
win/yaz.nsi

index 97d78c6..2a4ae90 100644 (file)
@@ -15,12 +15,12 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = yaz.pc
 
 SPEC_FILE=$(PACKAGE).spec
-EXTRA_DIST=$(SPEC_FILE) README LICENSE NEWS TODO \
+EXTRA_DIST=$(SPEC_FILE) README LICENSE NEWS \
        yaz-config.in yaz.pc.in m4/yaz.m4 m4/yaz_libxml2.m4 buildconf.sh \
        Doxyfile.in m4/acx_pthread.m4 m4/ac_check_icu.m4
 
 dist-hook:
        if test -x /usr/bin/git -a -d .git; then git log >ChangeLog ; cp ChangeLog $(distdir); fi
-       mkdir $(distdir)/win
+       test -d $(distdir)/win || mkdir $(distdir)/win
        -cp $(srcdir)/win/* $(distdir)/win
 
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index e2026a0..0000000
--- a/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
-YAZ TODO
-
-Versions to be put automatically in
-   configure.ac
-   include/yaz/yaz-version.h
-   debian/changelog
-   NEWS
-   win/yaz.nsi
-   debian/rules (dh_makeshlibs line if API has been extended)
-
index fcc9d14..b8b1e37 100644 (file)
@@ -387,9 +387,13 @@ AC_SUBST([YAZ_SRC_ROOT])
 AC_SUBST([YAZ_BUILD_ROOT])
 YAZ_SRC_ROOT=`cd ${srcdir}; pwd`
 YAZ_BUILD_ROOT=`pwd`
-
-dnl ------ windows version files
-WIN_FILEVERSION=`echo $PACKAGE_VERSION|tr . ,`.1
+dnl
+dnl ------ versioning
+dnl
+WIN_FILEVERSION=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { m = $4; printf "%d,%d,%d,%d", $1, $2, $3 == "" ? "0" : $3, $4 == "" ? "1" : $4;}'`
+AC_SUBST([WIN_FILEVERSION])
+YAZ_VERSION_HEX=`echo $PACKAGE_VERSION | awk 'BEGIN { FS = "."; } { printf "%x", ($1 * 256 + $2) * 256 + $3;}'`
+AC_SUBST([YAZ_VERSION_HEX])
 dnl
 dnl ------ Makefiles
 dnl
@@ -412,6 +416,8 @@ etc/Makefile
 yaz-config
 yaz.pc
 Doxyfile
+win/version.nsi
+include/yaz/yaz-version.h
 ],[
        sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config > util/yaz-config && chmod +x yaz-config util/yaz-config
     ]
index e41989a..674b615 100644 (file)
@@ -10,3 +10,4 @@ diagsrw.h
 diagsru_update.h
 oid_std.h
 oclc-ill-req-ext.h
+yaz-version.h
index 4251deb..054ea2f 100644 (file)
@@ -21,3 +21,5 @@ pkginclude_HEADERS= backend.h ccl.h ccl_xml.h cql.h rpn2cql.h comstack.h \
  zes-psched.h zes-admin.h zes-pset.h zes-update.h zes-update0.h \
  zoom.h z-charneg.h charneg.h soap.h srw.h zgdu.h matchstr.h
 
+EXTRA_DIST = yaz-version.h.in
+
diff --git a/include/yaz/yaz-version.h b/include/yaz/yaz-version.h
deleted file mode 100644 (file)
index d5ed578..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data.
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of Index Data nor the names of its contributors
- *       may be used to endorse or promote products derived from this
- *       software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-/**
- * \file yaz-version.h
- * \brief Defines YAZ version.
- */
-#ifndef YAZ_VERSION
-
-#include <yaz/yconfig.h>
-
-#define YAZ_VERSION "3.0.38"
-#define YAZ_VERSIONL 0x030026
-
-#define YAZ_FILEVERSION 3,0,38,1
-
-#define YAZ_DATE 1
-
-
-#ifdef WIN32
-#ifdef NDEBUG
-#define YAZ_OS "WIN32 Release"
-#else
-#define YAZ_OS "WIN32 Debug"
-#endif
-#endif
-
-YAZ_BEGIN_CDECL
-
-YAZ_EXPORT unsigned long yaz_version(char *version_str, char *sys_str);
-
-YAZ_END_CDECL
-
-#endif
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
diff --git a/include/yaz/yaz-version.h.in b/include/yaz/yaz-version.h.in
new file mode 100644 (file)
index 0000000..a56cc0a
--- /dev/null
@@ -0,0 +1,66 @@
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data.
+ * All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Index Data nor the names of its contributors
+ *       may be used to endorse or promote products derived from this
+ *       software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * \file yaz-version.h
+ * \brief Defines YAZ version.
+ */
+#ifndef YAZ_VERSION
+
+#include <yaz/yconfig.h>
+
+#define YAZ_VERSION "@VERSION@"
+#define YAZ_VERSIONL 0x@YAZ_VERSION_HEX@
+
+#define YAZ_FILEVERSION @WIN_FILEVERSION@
+
+#define YAZ_DATE 1
+
+
+#ifdef WIN32
+#ifdef NDEBUG
+#define YAZ_OS "WIN32 Release"
+#else
+#define YAZ_OS "WIN32 Debug"
+#endif
+#endif
+
+YAZ_BEGIN_CDECL
+
+YAZ_EXPORT unsigned long yaz_version(char *version_str, char *sys_str);
+
+YAZ_END_CDECL
+
+#endif
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
diff --git a/win/version.nsi.in b/win/version.nsi.in
new file mode 100644 (file)
index 0000000..5fa481b
--- /dev/null
@@ -0,0 +1,2 @@
+!define VERSION "@PACKAGE_VERSION@"
+
index 25b41f6..e67b81a 100644 (file)
@@ -1,7 +1,7 @@
 ; This file is part of the YAZ toolkit.
 ; Copyright (C) 1995-2008 Index Data
 
-!define VERSION "3.0.38"
+!include version.nsi
 
 ; Microsoft runtime CRT 
 ; Uncomment exactly ONE section of the three below