Guile 2 pre-compilation improvements

1. Tell the engine to look in the build dir for the backend modules
   Guile compilation loads the engine libraries for
   some guile modules. This triggers the engine
   initialization code which tries to load the xml backend module
   and optionally the dbi module as well.
   By default it looks for these modules in the installed directory
   but during build they are not installed yet, so use a few
   environment variables to tell the engine to look in the build
   dir instead.

2. Wait for the c library to be linked before attempting to
   compile the guile files. Some guile files need the library
   to be available.

Note that neither fix is necessary for all directories that has
scheme files to compile. For consistency between makefiles, I have
chosen to add them to all, which won't hurt.
This commit is contained in:
Geert Janssens
2014-10-30 17:54:36 +01:00
parent 97f8f39dc6
commit be0e3581c2
16 changed files with 51 additions and 16 deletions

View File

@@ -214,7 +214,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -130,7 +130,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -116,7 +116,9 @@ if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/core-utils
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -196,7 +196,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -69,7 +69,9 @@ if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -283,7 +283,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/gnome-utils
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -108,7 +108,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -50,6 +50,7 @@ GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/src/gnome-utils \
--gnc-module-dir ${top_builddir}/src/html \
--gnc-module-dir ${top_builddir}/src/report/report-system \
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
--guile-load-dir ${top_builddir}/src/app-utils \
--guile-load-dir ${top_builddir}/src/core-utils \
--guile-load-dir ${top_builddir}/src/engine \
@@ -62,7 +63,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -72,7 +72,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/gnome-utils
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -120,7 +120,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnome-utils \
--library-dir ${top_builddir}/src/report/report-gnome
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -125,7 +125,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/report/report-system
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -93,7 +93,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/report/report-system
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -80,7 +80,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/gnome-utils
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -50,12 +50,14 @@ if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/src/app-utils \
--gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_builddir}/src/gnome-utils \
--gnc-module-dir ${top_builddir}/src/html \
--gnc-module-dir ${top_builddir}/src/report/report-system \
--guile-load-dir ${top_builddir}/src/app-utils \
--guile-load-dir ${top_builddir}/src/core-utils \
--guile-load-dir ${top_builddir}/src/engine \
--guile-load-dir ${top_builddir}/src/gnc-module \
--guile-load-dir ${top_builddir}/src/gnome-utils \
--guile-load-dir ${top_builddir}/src/report/report-system \
--guile-load-dir ${top_builddir}/src/scm \
--library-dir ${top_builddir}/src/app-utils \
@@ -63,7 +65,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/report/report-system
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -56,7 +56,9 @@ GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<

View File

@@ -101,7 +101,9 @@ if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/src/test-core
%.go : %.scm .scm-links
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
GNC_UNINSTALLED=yes \
GNC_BUILDDIR=${top_builddir} \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GUILE_COMPILE_ENV}) \
$(GUILD) compile -o $@ $<