Revision: 89391d935701
Author:   Muneyuki Noguchi <[email protected]>
Date:     Sat Mar 31 21:26:58 2012
Log:      Set UIM_VERSION_{MAJOR,MINOR,PATCHLEVEL} in configure.ac.

* .gitignore
  - Add /uim/version.h.
* configure.ac
  - Set UIM_VERSION_{MAJOR,MINOR,PATCHLEVEL}.
  - (AC_CONFIG_FILES): Add version.h.
* doc/RELEASING
  - Update.
* uim/Makefile.am
  - Add version.h.in to EXTRA_DIST.
* uim/uim.h
  - (UIM_VERSION_MAJOR, UIM_VERSION_MINOR, UIM_VERSION_PATCHLEVEL)
    Move to version.h.in.
* uim/version.h.in
  - New file.

http://code.google.com/p/uim/source/detail?r=89391d935701

Added:
 /uim/version.h.in
Modified:
 /.gitignore
 /configure.ac
 /doc/RELEASING
 /uim/Makefile.am
 /uim/uim.h

=======================================
--- /dev/null
+++ /uim/version.h.in   Sat Mar 31 21:26:58 2012
@@ -0,0 +1,41 @@
+/*
+
+  Copyright (c) 2012 uim Project http://code.google.com/p/uim/
+
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. 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.
+  3. Neither the name of authors 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDERS OR 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.
+
+*/
+
+#ifndef UIM_VERSION_H
+#define UIM_VERSION_H
+
+#define UIM_VERSION_MAJOR      (@UIM_VERSION_MAJOR@)
+#define UIM_VERSION_MINOR      (@UIM_VERSION_MINOR@)
+#define UIM_VERSION_PATCHLEVEL (@UIM_VERSION_PATCHLEVEL@)
+
+#endif /* UIM_VERSION_H */
=======================================
--- /.gitignore Sun Mar 11 06:50:21 2012
+++ /.gitignore Sat Mar 31 21:26:58 2012
@@ -543,6 +543,7 @@
 /uim/uim-module-manager
 /uim/uim-sh
 /uim/uim-help
+/uim/version.h
 /uim/*.la
 /uim/*.lo
 /uim/*.o
=======================================
--- /configure.ac       Tue Mar 13 07:25:09 2012
+++ /configure.ac       Sat Mar 31 21:26:58 2012
@@ -1,9 +1,19 @@
+m4_define([UIM_MAJOR_VERSION], [1])
+m4_define([UIM_MINOR_VERSION], [8])
+m4_define([UIM_PATCHLEVEL_VERSION], [0])
+m4_define([UIM_VERSION],
+    UIM_MAJOR_VERSION.UIM_MINOR_VERSION.UIM_PATCHLEVEL_VERSION)
+
 AC_PREREQ(2.60b)
-AC_INIT([uim], [1.8.0], [[email protected]])
+AC_INIT([uim], [UIM_VERSION], [[email protected]])
 AC_CONFIG_SRCDIR([uim/uim.c])
 AC_CONFIG_HEADERS([uim/config.h])
 AM_INIT_AUTOMAKE([1.10 dist-bzip2])

+AC_SUBST(UIM_VERSION_MAJOR, UIM_MAJOR_VERSION)
+AC_SUBST(UIM_VERSION_MINOR, UIM_MINOR_VERSION)
+AC_SUBST(UIM_VERSION_PATCHLEVEL, UIM_PATCHLEVEL_VERSION)
+
 # Enable GNU extensions such as asprintf(3), BSD-originated functions,
 # POSIX features and more on glibc (and some other
 # implementations). See features.h. This macro should be placed here.
@@ -1914,6 +1924,7 @@
                 m4/Makefile
                 doc/Makefile
                 uim/Makefile
+                uim/version.h
                 scm/Makefile
                 gtk2/Makefile
                 gtk2/candwin/Makefile
=======================================
--- /doc/RELEASING      Fri Mar 30 05:58:51 2012
+++ /doc/RELEASING      Sat Mar 31 21:26:58 2012
@@ -31,13 +31,9 @@
    $ vi NEWS
    $ vi RELNOTE

-4. Increment the version numbers in:
-
-   - configure.ac
-   - uim.h
+4. Increment the version numbers in configure.ac

    $ vi configure.ac
-   $ vi uim.h

    And increment libtool-version.mk too if API/ABI is updated.

=======================================
--- /uim/Makefile.am    Mon May 23 23:36:02 2011
+++ /uim/Makefile.am    Sat Mar 31 21:26:58 2012
@@ -4,7 +4,7 @@

 AUTOMAKE_OPTIONS = foreign

-EXTRA_DIST = encoding-table.c test-gc.c
+EXTRA_DIST = encoding-table.c test-gc.c version.h.in

 uim_defs = -DSCM_FILES=\"$(datadir)/uim\"
 # FIXME: $(UIM_SCM_CFLAGS) should only affect on uim-scm.c
=======================================
--- /uim/uim.h  Sat Feb 25 22:21:36 2012
+++ /uim/uim.h  Sat Mar 31 21:26:58 2012
@@ -37,13 +37,12 @@

 #include <stdlib.h>

+#include "version.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif

-#define UIM_VERSION_MAJOR      (1)
-#define UIM_VERSION_MINOR      (8)
-#define UIM_VERSION_PATCHLEVEL (0)
 #define UIM_VERSION_REQUIRE(major, minor, patchlevel)                       \
   ((major) < UIM_VERSION_MAJOR                                                 
  \
    || ((major) == UIM_VERSION_MAJOR && (minor) < UIM_VERSION_MINOR)      \

Reply via email to