[libgdamm] Convert tools/ and libgda/ to new infrastructure



commit 2f30da4add8b6de8a93652f4f0e7f8dffdb2eeb8
Author: Daniel Elstner <danielk openismus com>
Date:   Thu Aug 20 15:30:27 2009 +0200

    Convert tools/ and libgda/ to new infrastructure
    
    * Makefile.am (SUBDIRS): Skip the libgda/ subdirectory and recurse
    directly into libgda/src/ and libgda/libgdamm/.
    (EXTRA_DIST): Remove the old build_shared/ include files.
    * configure.ac (AC_CONFIG_FILES): Remove files libgda/Makefile.am,
    libgda/libgdamm/private/Makefile.am, tools/m4/Makefile.am and
    tools/extra_defs_gen/Makefile.am from the list of output files.
    (GTHREAD_CFLAGS): Remove substitution again, as libgda-4.0 itself
    already pulls in gthread-2.0.
    (MM_INIT_MODULE): Add missing macro call.
    (MM_ARG_ENABLE_DOCUMENTATION): Call macro to get the Perl check.
    * libgda/src/filelist.am: Rename Makefile_list_of_hg.am_fragment
    and adapt to new mm-common Automake include files.
    * libgda/libgdamm/filelist.am: New file, defining the list of
    source code files to compile.
    * libgda/libgdamm/private/Makefile.am: Delete obsolete file.
    * libgda/src/Makefile.am: Rewrite to use new mm-common build
    infrastructure.
    * libgda/libgdamm/Makefile.am: ditto,
    * tools/Makefile.am: ditto.
    * tools/m4/filelist.am: Rename Makefile_list_of_sources.am_fragment
    and adapt to new mm-common Automake include files.
    * tools/m4/Makefile.am: Delete obsolete file.
    * tools/extra_defs_gen/Makefile.am: ditto.
    * build_shared/*.am_fragment: Delete obsolete build support files.

 ChangeLog                                      |   27 ++++++++++
 Makefile.am                                    |   35 +++++-------
 build_shared/Makefile_build.am_fragment        |   48 -----------------
 build_shared/Makefile_build_gensrc.am_fragment |   26 ---------
 build_shared/Makefile_gensrc.am_fragment       |   67 ------------------------
 configure.ac                                   |   21 ++++---
 libgda/Makefile.am                             |   15 -----
 libgda/libgdamm/Makefile.am                    |   44 +++++++++------
 libgda/libgdamm/filelist.am                    |    8 +++
 libgda/libgdamm/private/Makefile.am            |   12 ----
 libgda/src/Makefile.am                         |   32 ++++++++----
 libgda/src/Makefile_list_of_hg.am_fragment     |   20 -------
 libgda/src/filelist.am                         |   46 ++++++++++++++++
 tools/Makefile.am                              |   35 +++++++++++--
 tools/Makefile_list_of_sources.am_fragment     |    4 --
 tools/extra_defs_gen/Makefile.am               |    8 ---
 tools/m4/Makefile.am                           |    9 ---
 tools/m4/Makefile_list_of_sources.am_fragment  |    1 -
 tools/m4/filelist.am                           |    3 +
 19 files changed, 189 insertions(+), 272 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index edc482a..90ba5eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,32 @@
 2009-08-20  Daniel Elstner  <danielk openismus com>
 
+	Convert tools/ and libgda/ to new infrastructure
+
+	* Makefile.am (SUBDIRS): Skip the libgda/ subdirectory and recurse
+	directly into libgda/src/ and libgda/libgdamm/.
+	(EXTRA_DIST): Remove the old build_shared/ include files.
+	* configure.ac (AC_CONFIG_FILES): Remove files libgda/Makefile.am,
+	libgda/libgdamm/private/Makefile.am, tools/m4/Makefile.am and
+	tools/extra_defs_gen/Makefile.am from the list of output files.
+	(GTHREAD_CFLAGS): Remove substitution again, as libgda-4.0 itself
+	already pulls in gthread-2.0.
+	* libgda/src/filelist.am: Rename Makefile_list_of_hg.am_fragment
+	and adapt to new mm-common Automake include files.
+	* libgda/libgdamm/filelist.am: New file, defining the list of
+	source code files to compile.
+	* libgda/libgdamm/private/Makefile.am: Delete obsolete file.
+	* libgda/src/Makefile.am: Rewrite to use new mm-common build
+	infrastructure.
+	* libgda/libgdamm/Makefile.am: ditto,
+	* tools/Makefile.am: ditto.
+	* tools/m4/filelist.am: Rename Makefile_list_of_sources.am_fragment
+	and adapt to new mm-common Automake include files.
+	* tools/m4/Makefile.am: Delete obsolete file.
+	* tools/extra_defs_gen/Makefile.am: ditto.
+	* build_shared/*.am_fragment: Delete obsolete build support files.
+
+2009-08-20  Daniel Elstner  <danielk openismus com>
+
 	Begin transition to mm-common build system
 
 	* autogen.sh: Replace with minimal version using mm-common-prepare
diff --git a/Makefile.am b/Makefile.am
index de3f968..7d0c0f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,27 +18,20 @@
 ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
 DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
 
-SUBDIRS		= tools libgda docs examples
+if MAINTAINER_MODE
+src_subdirs = tools libgda/src
+else
+src_subdirs =
+endif
+SUBDIRS = $(src_subdirs) libgda/libgdamm examples docs
 
-EXTRA_DIST	=  \
-		  build_shared/Makefile_build.am_fragment \
-		  build_shared/Makefile_build_gensrc.am_fragment \
-		  build_shared/Makefile_gensrc.am_fragment \
-		  COPYING.examples		
+libgdamm_includedir = $(includedir)/$(LIBGDAMM_MODULE_NAME)
+libgdamm_include_HEADERS = libgda/libgdamm.h
+libgdamm_libincludedir = $(libdir)/$(LIBGDAMM_MODULE_NAME)/include
+nodist_libgdamm_libinclude_HEADERS = libgda/libgdammconfig.h
 
+pkgconfigdir = $(libdir)/pkgconfig
+nodist_pkgconfig_DATA = libgda/$(LIBGDAMM_MODULE_NAME).pc
 
-all-local:
-	@echo "*** Everything completed ***"
-
-dist-hook:
-	@echo; echo; \
-	echo "**********************************************************"; \
-	echo "* IMPORTANT NOTICE:                                      *"; \
-	echo "*                                                        *"; \
-	echo "* Be sure you have done a complete build before running  *"; \
-	echo "* 'make dist' or 'make distcheck', because otherwise     *"; \
-	echo "* the tarball will _not_ contain the dependency rules    *"; \
-	echo "* generated by the compiler.                             *"; \
-	echo "**********************************************************"; \
-	echo; echo
-
+dist_noinst_DATA = COPYING.examples
+dist_noinst_SCRIPTS = autogen.sh
diff --git a/configure.ac b/configure.ac
index 61de00f..00c9ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,9 @@ AC_CONFIG_AUX_DIR([build])
 AC_CONFIG_MACRO_DIR([build])
 AC_CONFIG_HEADERS([build/config.h libgda/libgdammconfig.h])
 
+MM_PREREQ([0.6])
+MM_INIT_MODULE([libgdamm-4.0])
+
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 AC_SUBST([LIBGDAMM_SO_VERSION], [11:0:0])
 
@@ -44,27 +47,27 @@ AS_IF([test "x$libgdamm_have_bdb" = xyes],
       [AC_DEFINE([HAVE_BDB], [1], [Define if the libgda-bdb plugin is available.])])
 AM_CONDITIONAL([HAVE_BDB], [test "x$libgdamm_have_bdb" = xyes])
 
-MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
 MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.4])
 
-# Temporary dummies
-AC_SUBST([GMM_PROCDIR], ['$(GMMPROC_DIR)'])
-AC_SUBST([GMM_PROC], ['$(GMMPROC_DIR)/gmmproc'])
+AC_LANG([C++])
+MM_ARG_ENABLE_WARNINGS([LIBGDAMM_WXXFLAGS],
+                       [-Wall],
+                       [-pedantic -Wall -Wextra],
+                       [G GDA])
+
+MM_ARG_ENABLE_DOCUMENTATION
+
+# Temporary dummy
 AM_CONDITIONAL([BUILD_REFERENCE], [false])
-AM_CONDITIONAL([PLATFORM_WIN32], [false])
 
 AC_CONFIG_FILES([
   Makefile
 
-  libgda/Makefile
   libgda/libgdamm-4.0.pc
   libgda/src/Makefile
   libgda/libgdamm/Makefile
-  libgda/libgdamm/private/Makefile
 
   tools/Makefile
-    tools/extra_defs_gen/Makefile
-    tools/m4/Makefile
 
   docs/Makefile
   docs/reference/Makefile
diff --git a/libgda/libgdamm/Makefile.am b/libgda/libgdamm/Makefile.am
index 791fde7..3108341 100644
--- a/libgda/libgdamm/Makefile.am
+++ b/libgda/libgdamm/Makefile.am
@@ -1,23 +1,31 @@
-## Copyright (c) 2001
-## The libgdamm development team.
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of libgdamm.
+##
+## libgdamm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## libgdamm 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 Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-SUBDIRS			= private
+lib_LTLIBRARIES = libgdamm- LIBGDAMM_API_VERSION@.la
 
-sublib_name		= libgdamm
-sublib_libname = libgdamm-4.0
-sublib_libversion = $(LIBGDAMM_SO_VERSION)
-sublib_namespace	= Gda
-sublib_cflags		= $(LIBGDAMM_CFLAGS)
-sublib_topdir = libgda
+include $(srcdir)/../src/filelist.am
+include $(srcdir)/filelist.am
+include $(top_srcdir)/build/compile-binding.am
 
+local_cppflags = $(binding_includes) $(binding_cppflags) -DLIBGDAMM_BUILD=1
 
-files_extra_h	= init.h wrap_init.h value.h
-files_extra_cc = init.cc value.cc
-
-include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
-
-lib_LTLIBRARIES			= libgdamm-4.0.la
-libgdamm_4_0_la_SOURCES	= $(files_all_cc)
-libgdamm_4_0_la_LDFLAGS	= $(common_ldflags)
-libgdamm_4_0_la_LIBADD	= $(LIBGDAMM_LIBS)
+AM_CPPFLAGS = $(local_cppflags) $(LIBGDAMM_CFLAGS)
+AM_CXXFLAGS = $(LIBGDAMM_WXXFLAGS)
 
+libgdamm_ LIBGDAMM_API_VERSION@_la_SOURCES = $(binding_sources)
+libgdamm_ LIBGDAMM_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(LIBGDAMM_SO_VERSION)
+libgdamm_ LIBGDAMM_API_VERSION@_la_LIBADD  = $(LIBGDAMM_LIBS)
diff --git a/libgda/libgdamm/filelist.am b/libgda/libgdamm/filelist.am
new file mode 100644
index 0000000..6589ecb
--- /dev/null
+++ b/libgda/libgdamm/filelist.am
@@ -0,0 +1,8 @@
+## This file is part of libgdamm.
+
+files_built_cc	= $(files_hg:.hg=.cc) wrap_init.cc
+files_built_h	= $(files_hg:.hg=.h)
+files_built_ph	= $(patsubst %.hg,private/%_p.h,$(files_hg))
+files_extra_cc	= init.cc throw_exception.cc value.cc
+files_extra_h	= init.h throw_exception.h value.h wrap_init.h
+files_extra_ph	=
diff --git a/libgda/src/Makefile.am b/libgda/src/Makefile.am
index a877f53..22f16fc 100644
--- a/libgda/src/Makefile.am
+++ b/libgda/src/Makefile.am
@@ -1,12 +1,24 @@
-## Copyright (c) 2001
-## The libgdamm development team.
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of libgdamm.
+##
+## libgdamm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## libgdamm 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 Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-sublib_name	= libgdamm
-sublib_namespace = Gda
-sublib_parentdir = libgdamm
-files_defs	= libgda.defs libgda_methods.defs libgda_signals.defs \
-                  libgda_enums.defs libgda_others.defs libgda_docs.xml \
-                  libgda_docs_override.xml
-
-include $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment
+binding_name    = libgdamm
+wrap_init_flags = --namespace=Gnome --namespace=Gda --parent_dir=libgdamm
+codegen_srcdir  = $(top_srcdir)/tools
 
+include $(srcdir)/filelist.am
+include $(top_srcdir)/tools/m4/filelist.am
+include $(top_srcdir)/build/generate-binding.am
diff --git a/libgda/src/filelist.am b/libgda/src/filelist.am
new file mode 100644
index 0000000..860f867
--- /dev/null
+++ b/libgda/src/filelist.am
@@ -0,0 +1,46 @@
+## This file is part of libgdamm.
+
+files_defs =			\
+	libgda.defs		\
+	libgda_enums.defs	\
+	libgda_methods.defs	\
+	libgda_others.defs	\
+	libgda_signals.defs	\
+	libgda_docs.xml		\
+	libgda_docs_override.xml
+
+files_hg =			\
+	batch.hg		\
+	blob.hg			\
+	blobop.hg		\
+	column.hg		\
+	config.hg		\
+	connection.hg		\
+	connectionevent.hg	\
+	dataaccesswrapper.hg	\
+	datacomparator.hg	\
+	datahandler.hg		\
+	datamodel.hg		\
+	datamodelarray.hg	\
+	datamodelimport.hg	\
+	datamodeliter.hg	\
+	dataproxy.hg		\
+	dataselect.hg		\
+	handlerbin.hg		\
+	handlerboolean.hg	\
+	handlernumerical.hg	\
+	handlerstring.hg	\
+	handlertime.hg		\
+	handlertype.hg		\
+	holder.hg		\
+	metastore.hg		\
+	metastruct.hg		\
+	quarklist.hg		\
+	row.hg			\
+	serveroperation.hg	\
+	serverprovider.hg	\
+	set.hg			\
+	sqlparser.hg		\
+	statement.hg		\
+	transactionstatus.hg	\
+	xatransaction.hg
diff --git a/tools/Makefile.am b/tools/Makefile.am
index b5f04a2..43bc610 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,7 +1,34 @@
-SUBDIRS = extra_defs_gen m4
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of libgdamm.
+##
+## libgdamm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## libgdamm 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 Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment
+AUTOMAKE_OPTIONS = subdir-objects
 
-EXTRA_DIST = $(files_tools_perl) $(files_tools_pm) \
-	     Makefile_list_of_sources.am_fragment
+include $(srcdir)/m4/filelist.am
 
+dist_noinst_DATA = $(addprefix m4/,$(files_codegen_m4))
+noinst_PROGRAMS  = extra_defs_gen/generate_extra_defs
+
+extra_defs_gen_generate_extra_defs_SOURCES = extra_defs_gen/generate_defs_gda.cc
+extra_defs_gen_generate_extra_defs_LDADD   = $(LIBGDAMM_LIBS) -lglibmm_generate_extra_defs-2.4
+extra_defs_gen_generate_extra_defs_LDFLAGS = -no-undefined -avoid-version
+
+AM_CPPFLAGS = -I$(top_builddir) $(LIBGDAMM_CFLAGS)
+AM_CXXFLAGS = $(LIBGDAMM_WXXFLAGS)
+
+# Instruct GNU make to delete the targets of a rule after it failed, in
+# order to avoid the complication of handling that situation manually.
+.DELETE_ON_ERROR:
diff --git a/tools/m4/filelist.am b/tools/m4/filelist.am
new file mode 100644
index 0000000..2a3e018
--- /dev/null
+++ b/tools/m4/filelist.am
@@ -0,0 +1,3 @@
+## This file is part of libgdamm.
+
+files_codegen_m4 = convert.m4 convert_libgdamm.m4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]