Commit 1c5e87d3 authored by Daniel Elstner's avatar Daniel Elstner

Switch to non-recursive build process

* macros/mm-pkg.m4: New file, defining the MM_PKG_CONFIG_SUBST macro.
* macros/mm-python.m4: New file, defining the MM_CHECK_MODULE_PYTHON
macro to replace the old and messy AM_CHECK_PYTHON_HEADERS.
* acinclude.m4: Remove file which defined AM_CHECK_PYTHON_HEADERS.

* Makefile.am: Merge the contents of the Makefile.am files from all
subdirectories into a single top-level Makefile.am, with the exception
of docs/user-guide/Makefile.am.  Add the full subdirectory prefix to
all listed files and change the Automake variable names accordingly.
Get rid of the intermediate static libraries previously created for
each source subdirectory, and list the source files directly in the
toplevel target's SOURCES variable.  Overall, refactor and modernize
the build rules and organization.
* **/Makefile.am: Except for docs/user-guide/Makefile.am, remove the
Makefile.am files recursively from all subdirectories.

* config.h.in: Remove file, and use autoheader to generate it.
* autogen.sh: Replace with a modern minimalistic script which lets
autoreconf do the bulk of the work.
* configure.ac: Massive refactoring.  Adapt to the new non-recursive
build organization.  Modernize the M4 and shell code, and make use of
newer Autoconf and Automake constructs to simplify many checks.  Also
make minor corrections to a number of tests and definitions.

* glom/application.cc: Remove the need for GLOM_ICON_DIR by setting
the window icon by name instead of loading the image file directly.
Use PACKAGE_VERSION in place of VERSION.
* glom/dialog_existing_or_new.cc: Use a subdirectory of GLOM_DOCDIR
in place of GLOM_EXAMPLES_DIR.  Remove GLOM_EXAMPLES_DIR_ALTERNATIVE.

* glom/utils_ui.cc: Replace DATADIR by GLOM_DATADIR.
* glom/libglom/connectionpool.cc: Remove GLOM_SAVE_DATADIR hack, which
is not necessary anymore as DATADIR is not globally defined anymore.
* glom/libglom/connectionpool_backends/postgres_self.cc: ditto,
* glom/libglom/spawn_with_feedback.cc: ditto,
* glom/main.cc: ditto. Also replace LOCALEDIR by GLOM_LOCALEDIR, and
output PACKAGE_STRING instead of VERSION in response to the --version
command-line option.  Replace PACKAGE and VERSION by their modern
Automake equivalents.
* glom/xsl_utils.cc: Remove GLOM_SAVE_DATADIR hack, and replace
GLOM_XSLTDIR with a subdirectory of GLOM_PKGDATADIR.

* glom/mode_data/box_data_calendar_related.cc: Replace GLOM_GLADEDIR
by a combination of GLOM_PKGDATADIR and a subdirectory name.
* glom/mode_design/print_layouts/print_layout_toolbar_button.cc: Use
a subdirectory of GLOM_PKGDATADIR in place of GLOM_ICON_DIR.
* glom/utility_widgets/layouttoolbar.cc: ditto,
* glom/utility_widgets/layouttoolbarbutton.cc: ditto.

* glom/python_embed/glom_python.cc: Include generated config.h for the
definition of GLOM_ABI_VERSION_UNDERLINED.
* glom/python_embed/python_module/py_glom_module.cc: ditto.
parent 2ade6174
2009-07-23 Daniel Elstner <danielk@openismus.com>
Switch to non-recursive build process
* macros/mm-pkg.m4: New file, defining the MM_PKG_CONFIG_SUBST macro.
* macros/mm-python.m4: New file, defining the MM_CHECK_MODULE_PYTHON
macro to replace the old and messy AM_CHECK_PYTHON_HEADERS.
* acinclude.m4: Remove file which defined AM_CHECK_PYTHON_HEADERS.
* Makefile.am: Merge the contents of the Makefile.am files from all
subdirectories into a single top-level Makefile.am, with the exception
of docs/user-guide/Makefile.am. Add the full subdirectory prefix to
all listed files and change the Automake variable names accordingly.
Get rid of the intermediate static libraries previously created for
each source subdirectory, and list the source files directly in the
toplevel target's SOURCES variable. Overall, refactor and modernize
the build rules and organization.
* **/Makefile.am: Except for docs/user-guide/Makefile.am, remove the
Makefile.am files recursively from all subdirectories.
* config.h.in: Remove file, and use autoheader to generate it.
* autogen.sh: Replace with a modern minimalistic script which lets
autoreconf do the bulk of the work.
* configure.ac: Massive refactoring. Adapt to the new non-recursive
build organization. Modernize the M4 and shell code, and make use of
newer Autoconf and Automake constructs to simplify many checks. Also
make minor corrections to a number of tests and definitions.
* glom/application.cc: Remove the need for GLOM_ICON_DIR by setting
the window icon by name instead of loading the image file directly.
Use PACKAGE_VERSION in place of VERSION.
* glom/dialog_existing_or_new.cc: Use a subdirectory of GLOM_DOCDIR
in place of GLOM_EXAMPLES_DIR. Remove GLOM_EXAMPLES_DIR_ALTERNATIVE.
* glom/utils_ui.cc: Replace DATADIR by GLOM_DATADIR.
* glom/libglom/connectionpool.cc: Remove GLOM_SAVE_DATADIR hack, which
is not necessary anymore as DATADIR is not globally defined anymore.
* glom/libglom/connectionpool_backends/postgres_self.cc: ditto,
* glom/libglom/spawn_with_feedback.cc: ditto,
* glom/main.cc: ditto. Also replace LOCALEDIR by GLOM_LOCALEDIR, and
output PACKAGE_STRING instead of VERSION in response to the --version
command-line option. Replace PACKAGE and VERSION by their modern
Automake equivalents.
* glom/xsl_utils.cc: Remove GLOM_SAVE_DATADIR hack, and replace
GLOM_XSLTDIR with a subdirectory of GLOM_PKGDATADIR.
* glom/mode_data/box_data_calendar_related.cc: Replace GLOM_GLADEDIR
by a combination of GLOM_PKGDATADIR and a subdirectory name.
* glom/mode_design/print_layouts/print_layout_toolbar_button.cc: Use
a subdirectory of GLOM_PKGDATADIR in place of GLOM_ICON_DIR.
* glom/utility_widgets/layouttoolbar.cc: ditto,
* glom/utility_widgets/layouttoolbarbutton.cc: ditto.
* glom/python_embed/glom_python.cc: Include generated config.h for the
definition of GLOM_ABI_VERSION_UNDERLINED.
* glom/python_embed/python_module/py_glom_module.cc: ditto.
2009-07-22 David King <davidk@openismus.com>
* glom/libglom/glom-1.0.pc.in: Add libxml++ dependency, needed for
......
This diff is collapsed.
## this one is commonly used with AM_PATH_PYTHONDIR ...
dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
dnl Check if a module containing a given symbol is visible to python.
AC_DEFUN(AM_CHECK_PYMOD,
[AC_REQUIRE([AM_PATH_PYTHON])
py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
ifelse([$2],[], [prog="
import sys
try:
import $1
except ImportError:
sys.exit(1)
except:
sys.exit(0)
sys.exit(0)"], [prog="
import $1
$1.$2"])
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
eval "py_cv_mod_$py_mod_var=yes"
else
eval "py_cv_mod_$py_mod_var=no"
fi
])
py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
if test "x$py_val" != xno; then
AC_MSG_RESULT(yes)
ifelse([$3], [],, [$3
])dnl
else
AC_MSG_RESULT(no)
ifelse([$4], [],, [$4
])dnl
fi
])
dnl a macro to check for ability to create python extensions
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_TRY_CPP([#include <Python.h>],dnl
[AC_MSG_RESULT(found)
$1],dnl
[AC_MSG_RESULT(not found)
$2])
CPPFLAGS="$save_CPPFLAGS"
# This bit is copied from Planner. murrayc.
# Check for Python library path
AC_MSG_CHECKING([for Python library path])
# Win32 has libpython25.a instead of libpython2.5.a, so we look
# for both. TODO: Only look for libpython25.a on Windows, and for
# libpython2.5.a on unix.
WIN32_PYTHON_VERSION=`echo $PYTHON_VERSION | sed "s,\.,,"`
python_path=`dirname $PYTHON | sed "s,/bin.*$,,"`
for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
if test -e "$i"; then
python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
if test -n "$python_path" ; then
python_lib="python$PYTHON_VERSION"
break
fi
# Additionally test WIN32_PYTHON_VERSION
python_path=`find $i -type f -name libpython$WIN32_PYTHON_VERSION.* -print | sed "1q"`
if test -n "$python_path" ; then
python_lib="python$WIN32_PYTHON_VERSION"
break
fi
fi
done
python_path=`echo $python_path | sed "s,/libpython.*$,,"`
AC_MSG_RESULT([$python_path])
if test -z "$python_path" ; then
AC_MSG_ERROR([cannot find Python library path])
fi
AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -l$python_lib"])
])
dnl
dnl JH_ADD_CFLAG(FLAG)
dnl checks whether the C compiler supports the given flag, and if so, adds
dnl it to $CFLAGS. If the flag is already present in the list, then the
dnl check is not performed.
AC_DEFUN([JH_ADD_CFLAG],
[
case " $CFLAGS " in
*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
;;
*)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_MSG_CHECKING([whether [$]CC understands $1])
AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
AC_MSG_RESULT($jh_has_option)
if test $jh_has_option = no; then
CFLAGS="$save_CFLAGS"
fi
;;
esac])
#! /bin/sh
# $Id$
#
# Copyright (c) 2002 Daniel Elstner <daniel.elstner@gmx.net>,
# 2003 Murray Cumming <murrayc@usa.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License VERSION 2 as
# published by the Free Software Foundation. You are not allowed to
# use any other version of the license; unless you got the explicit
# permission from the author to do so.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This is meant to be a well-documented, good example of an autogen.sh script
# Please email gnome-devel-list@gnome.org if you think it isn't.
dir=`echo "$0" | sed 's,[^/]*$,,'`
test "x${dir}" = "x" && dir='.'
if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`"
then
echo "This script must be executed directly from the source directory."
exit 1
fi
# This might not be necessary with newer autotools:
rm -f config.cache
enable_warnings=
srcdir=`dirname $0`
case "$*" in
*--enable-warnings*|*--disable-warnings*)
;;
*) # enable -Werror by default when building with gcc3
${CXX:-"g++"} --version 2>/dev/null | grep '(GCC) 3\.[0-9]\+\.[0-9]' >/dev/null 2>&1 \
&& enable_warnings='--enable-warnings=hardcore'
;;
esac
# We use glib-gettextize, which apparently does not add the intl directory
# (containing a local copy of libintl code), and therefore has a slightly different Makefile.
echo "- glib-gettextize." && \
glib-gettextize --copy --force && \
echo "- intltoolize." && \
intltoolize --copy --force && \
echo "- libtoolize." && \
libtoolize --copy --force --automake && \
echo "- gnome-doc-prepare." && \
gnome-doc-prepare --force --copy && \
echo "- aclocal-1.9" && \
aclocal-1.9 -I "$srcdir/macros" $ACLOCAL_FLAGS && \
echo "- autoconf" && \
autoconf && \
echo "- automake-1.9." && \
automake-1.9 --add-missing --gnu && \
echo "- configure --enable-maintainer-mode" $enable_warnings "$@" && \
./configure --enable-maintainer-mode $enable_warnings "$@" && exit 0
exit 1
#! /bin/sh -e
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
gnome-doc-prepare --copy --force &&
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install
) || exit
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
/* Include libglom_config.h so we also get the prefixed definitions */
#include "glom/libglom/libglom_config.h"
/* Whether to enable support for PostgreSQL databases. */
#undef GLOM_ENABLE_POSTGRESQL
/* Whether to enable support for SQLite databases. */
#undef GLOM_ENABLE_SQLITE
/* Whether to disable support for self-hosting and developer mode */
#undef GLOM_ENABLE_CLIENT_ONLY
/* Whether to enable support for the maemo platform */
#undef GLOM_ENABLE_MAEMO
/* config.h.in. Generated from configure.ac by autoheader. */
/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS
/* The domain name to use with gettext. */
#undef GETTEXT_PACKAGE
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Defined when libgettextpo has the new po_xerror_handler error handling
struct. */
#undef HAVE_GETTEXTPO_XERROR
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to the file extension of executables on the target. */
#undef EXEEXT
/* Define to 1 if you have the `strptime' function. */
#undef HAVE_STRPTIME
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* ISO codes prefix */
#undef ISO_CODES_PREFIX
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the gettext package name. */
#undef GETTEXT_PACKAGE
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the Glom ABI version string. */
#undef GLOM_ABI_VERSION
/* Path to the postgres utilities, such as postgres, pg_ctl, etc. */
#undef POSTGRES_UTILS_PATH
/* Define to the Glom ABI version with '.' replaced by '_'. */
#undef GLOM_ABI_VERSION_UNDERLINED
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to disable support for self-hosting and developer mode. */
#undef GLOM_ENABLE_CLIENT_ONLY
/* Version number of package */
#undef VERSION
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to enable support for the Maemo platform. */
#undef GLOM_ENABLE_MAEMO
/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS
/* Whether to enable support for PostgreSQL databases. */
#undef GLOM_ENABLE_POSTGRESQL
/* The domain name to use with gettext. */
#undef GETTEXT_PACKAGE
/* Whether to enable support for SQLite databases. */
#undef GLOM_ENABLE_SQLITE
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
......@@ -125,8 +39,7 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Defined when libgettextpo has the new po_xerror_handler error handling
struct. */
/* Define if libgettextpo provides the new po_xerror_handler struct. */
#undef HAVE_GETTEXTPO_XERROR
/* Define to 1 if you have the <inttypes.h> header file. */
......@@ -165,15 +78,15 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* ISO codes prefix */
/* Define to the installation prefix of the iso-codes module. */
#undef ISO_CODES_PREFIX
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
......@@ -190,11 +103,8 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Path to the postgres utilities, such as postgres, pg_ctl, etc. */
/* Define to the location of the PostgreSQL utilities. */
#undef POSTGRES_UTILS_PATH
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
This diff is collapsed.
SUBDIRS = user-guide
EXTRA_DIST = overview.txt developer_documentation.txt postgres_test.c postgres_gda_test.c
AUTOMAKE_OPTIONS = -Wno-portability
include $(top_srcdir)/gnome-doc-utils.make
dist-hook: doc-dist-hook
......
#Install the examples:
glomdatadir = $(pkgdatadir)/doc/examples
glomdata_DATA = example_smallbusiness.glom example_film_manager.glom example_project_manager.glom example_music_collection.glom example_lesson_planner.glom
EXTRA_DIST = README \
$(glomdata_DATA)
SUBDIRS = libglom bakery mode_data mode_find navigation utility_widgets python_embed reports
if !GLOM_ENABLE_CLIENT_ONLY
SUBDIRS += layout_item_dialogs mode_design translation relationships_overview
endif
gladedir = $(datadir)/glom/glade
glomxsltdir = $(datadir)/glom/xslt/
glom_examples_dir = $(pkgdatadir)/doc/examples/
glom_examples_dir_alternative = $(datadir)/doc/glom/examples/
glom_icon_dir = $(datadir)/icons/hicolor/48x48/apps
bin_PROGRAMS = glom
noinst_PROGRAMS = test_pyembed
# We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
# We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
AM_CPPFLAGS = -I@top_srcdir@/ -I@top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
$(MAEMO_LAUNCHER_CFLAGS) \
-DGLOM_GLADEDIR=\""$(gladedir)/"\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DGLOM_XSLTDIR=\""$(glomxsltdir)/"\" \
-DGLOM_EXAMPLES_DIR=\""$(glom_examples_dir)"\" \
-DGLOM_EXAMPLES_DIR_ALTERNATIVE=\""$(glom_examples_dir_alternative)"\" \
-DGLOM_ICON_DIR=\""$(glom_icon_dir)"\" \
-DGLOM_ABI_VERSION=\""$(GLOM_ABI_VERSION)\"" \
-DGLOM_ABI_VERSION_UNDERLINED=\""$(GLOM_ABI_VERSION_UNDERLINED)\""
glom_SOURCES = main.cc \
application.cc application.h \
base_db.h base_db.cc \
base_db_table.h base_db_table.cc \
base_db_table_data.h base_db_table_data.cc \
box_withbuttons.h box_withbuttons.cc \
box_db_table.h box_db_table.cc \
glom_postgres.h glom_postgres.cc \
glom_privs.h glom_privs.cc \
dialog_glom.h dialog_glom.cc \
frame_glom.h frame_glom.cc \
notebook_glom.h notebook_glom.cc \
combobox_fields.h combobox_fields.cc \
combobox_relationship.h combobox_relationship.cc \
dialog_connection.h dialog_connection.cc \
dialog_import_csv.h dialog_import_csv.cc \
dialog_import_csv_progress.h dialog_import_csv_progress.cc \
dialog_existing_or_new.h dialog_existing_or_new.cc \
dialog_invalid_data.h dialog_invalid_data.cc \
filechooser_export.h filechooser_export.cc \
dialog_progress_creating.h dialog_progress_creating.cc \
box_reports.h box_reports.cc \
xsl_utils.h xsl_utils.cc \
utils_ui.h utils_ui.cc \
variablesmap.h variablesmap.cc \
signal_reemitter.h glade_utils.h glade_utils.cc
if !GLOM_ENABLE_CLIENT_ONLY
glom_SOURCES += dialog_new_self_hosted_connection.h \
dialog_new_self_hosted_connection.cc \
dialog_database_preferences.h \
dialog_database_preferences.cc \
printoperation_printlayout.h \
printoperation_printlayout.cc
endif
# Note that the order in which libraries are linked seems to be important.
glom_LDADD = reports/libreports.a \
mode_data/libmode_data.a \
mode_find/libmode_find.a
if !GLOM_ENABLE_CLIENT_ONLY
glom_LDADD += layout_item_dialogs/liblayoutitemdialogs.a \
mode_design/libmode_design.a \
mode_design/fields/libmode_design_fields.a \
mode_design/print_layouts/libmode_design_print_layouts.a \
mode_design/users/libmode_design_users.a \
mode_design/script_library/libmode_design_script_library.a \
translation/libtranslation.a \
relationships_overview/librelationshipsoverview.a
endif
glom_LDADD += bakery/libbakery_app.a \
navigation/libnavigation.a \
utility_widgets/libutility_widgets.a \
utility_widgets/adddel/libutility_widgets_adddel.a \
utility_widgets/db_adddel/libutility_widgets_db_adddel.a \
utility_widgets/canvas/libutility_widgets_canvas.a \
utility_widgets/cellrendererlist/libutility_widgets_cellrendererlist.a \
utility_widgets/egg/toolpalette/libeggtoolpalette.la \
utility_widgets/egg/util/libeggutil.la
glom_LDADD += python_embed/libpython_embed.a \
$(top_builddir)/glom/libglom/libglom-$(GLOM_ABI_VERSION).la \
$(GLOM_LIBS) $(PYTHON_LDFLAGS) $(MAEMO_LAUNCHER_LIBS)
if !WIN32
glom_LDADD += -lutil
endif
glom_LDADD += -lgettextpo
#python_embed/python_module/glom.la
# python_embed/boost/config/libpython_embed_boost_config.a
# python_embed/boost/python/libpython_embed_boost_python.a
# python_embed/boost/python/detail/libpython_embed_boost_python_detail.a
# python_embed/boost/mpl/libpython_embed_boost_mpl.a
# python_embed/boost/mpl/aux_/libpython_embed_boost_mpl_aux.a
#libutil seems to be a fairly standard GNU library, and python needs it for openpty() and forkpty().
test_pyembed_SOURCES = test_pyembed.cc
test_pyembed_LDADD = $(GLOM_LIBS) $(PYTHON_LDFLAGS)
if !WIN32
test_pyembed_LDADD += -lutil
endif
# Icon on Windows
if WIN32
glom.res: glom.rc
$(WINDRES) -i glom.rc --input-format=rc -o glom.res -O coff
BUILT_SOURCES = glom.res
CLEANFILES = glom.res
glom_LDADD += glom.res
# Suppress console window
glom_LDFLAGS = -mwindows
endif
#Install the .dtd file:
glomdatadir = $(pkgdatadir)
glomdata_DATA = glom_document.dtd
# Install the glade file:
# The glade prefix of glade_DATA seems to cause it to be installed in <appname>/glade/
# Because that's how gladedir is defined.
glade_DATA = glom.glade glom_developer.glade
EXTRA_DIST = glom_document.dtd glom.rc $(glade_DATA)
......@@ -107,29 +107,8 @@ App_Glom::App_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& bu
#endif // !GLOM_ENABLE_CLIENT_ONLY
m_show_sql_debug(false)
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
#else
std::auto_ptr<Glib::Error> error;
#endif
{
//Show the icon in the window manager's window title bar and in the list of running applications:
#ifdef GLIBMM_EXCEPTIONS_ENABLED
set_icon_from_file(GLOM_ICON_DIR "/glom.png");
#else
set_icon_from_file(GLOM_ICON_DIR "/glom.png", error);
#endif
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch(const Glib::Error& ex)
{
#else
if(error.get() != NULL)
{
const Glib::Error& ex = *error.get();
#endif
std::cerr << "App_Glom::App_Glom(): Could not set icon: " << ex.what() << std::endl;
}
// TODO: Wrap missing method in gtkmm
gtk_window_set_icon_name(gobj(), "glom");
//Load widgets from glade file:
builder->get_widget("bakery_vbox", m_pBoxTop);
......@@ -206,7 +185,7 @@ bool App_Glom::init(const Glib::ustring& document_uri)
{
type_vec_strings vecAuthors;
vecAuthors.push_back("Murray Cumming <murrayc@murrayc.com>");
set_about_information(VERSION, vecAuthors, _("(C) 2000-2005 Murray Cumming"), _("A Database GUI"));
set_about_information(PACKAGE_VERSION, vecAuthors, _("(C) 2000-2005 Murray Cumming"), _("A Database GUI"));
type_base::init(); //calls init_menus() and init_toolbars()
......
AM_CPPFLAGS = -I@top_srcdir@/ -I@top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
h_sources = app_withdoc.h app.h app_withdoc_gtk.h dialog_offersave.h busy_cursor.h
cc_sources = app_withdoc.cc app.cc app_withdoc_gtk.cc dialog_offersave.cc busy_cursor.cc
noinst_LIBRARIES = libbakery_app.a
libbakery_app_a_SOURCES = $(h_sources) $(cc_sources)
......@@ -155,25 +155,19 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
#ifndef GLOM_ENABLE_CLIENT_ONLY
#ifdef G_OS_WIN32
gchar* dir = g_win32_get_package_installation_directory_of_module(NULL);
std::string path = Glib::build_filename(dir, "share/glom/doc/examples");
gchar* dir = g_win32_get_package_installation_directory_of_module(0);
std::string path = Glib::build_filename(dir, "share" G_DIR_SEPARATOR_S "doc"
G_DIR_SEPARATOR_S "glom"
G_DIR_SEPARATOR_S "examples");
g_free(dir);
if(!Glib::file_test(path, Glib::FILE_TEST_EXISTS))
path = GLOM_EXAMPLES_DIR;
path = GLOM_DOCDIR G_DIR_SEPARATOR_S "examples";
#else
const char* path = GLOM_EXAMPLES_DIR;
const char *const path = GLOM_DOCDIR G_DIR_SEPARATOR_S "examples";
#endif //G_OS_WIN32
if(!list_examples_at_path(path))
{
// If that directory did not exist, then try this one instead:
// (An Ubuntu package puts the example files here for some reason.
// TODO: Find out what Makefile.am variable to use to just use this automatically instead.
#ifndef G_OS_WIN32
list_examples_at_path(GLOM_EXAMPLES_DIR_ALTERNATIVE);
#endif //G_OS_WIN32
}
list_examples_at_path(path);
#endif //!GLOM_ENABLE_CLIENT_ONLY
......
......@@ -39,7 +39,7 @@ inline std::string get_glade_file_path(const std::string& filename)
g_free(directory);
return result;
#else
return GLOM_GLADEDIR + filename;
return Glib::build_filename(GLOM_PKGDATADIR G_DIR_SEPARATOR_S "glade", filename);
#endif
}
......
gladedir = $(datadir)/glom/glade/
glomxsltdir = $(datadir)/glom/xslt/
# We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
AM_CPPFLAGS = -I@top_srcdir@/ -I@top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
-DGLOM_GLADEDIR=\""$(gladedir)/"\" \
-DGLOM_XSLTDIR=\""$(glomxsltdir)/"\"
noinst_LIBRARIES = liblayoutitemdialogs.a
liblayoutitemdialogs_a_SOURCES = \
dialog_buttonscript.cc dialog_buttonscript.h \
dialog_field_layout.cc dialog_field_layout.h \
dialog_imageobject.cc dialog_imageobject.h \
dialog_notebook.cc dialog_notebook.h \
dialog_group_by.cc dialog_group_by.h \
dialog_field_summary.cc dialog_field_summary.h \
dialog_textobject.cc dialog_textobject.h \
combo_summarytype.h combo_summarytype.cc \
comboentry_borderwidth.h comboentry_borderwidth.cc \
dialog_groupby_secondaryfields.h dialog_groupby_secondaryfields.cc \
dialog_groupby_sortfields.h dialog_groupby_sortfields.cc \
box_formatting.h box_formatting.cc
SUBDIRS = connectionpool_backends data_structure document python_embed
gladedir = $(datadir)/glom/glade/
glomxsltdir = $(datadir)/glom/xslt/
glom_examples_dir = $(pkgdatadir)/doc/examples/
glom_icon_dir = $(datadir)/icons/hicolor/48x48/apps
# We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
# We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
AM_CPPFLAGS = -I@top_srcdir@/ -I@top_srcdir@/glom $(LIBGLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
-DGLOM_GLADEDIR=\""$(gladedir)/"\" \